Tag Archives: Cacti

Openfiler – Monitoring With Cacti

Openfiler – Monitoring With Cacti

Introduction

This article explains how to configure an Openfiler server for SNMP monitoring through Cacti.

The infrastructure used for this article was an Openfiler 2.3 virtual machine being monitored by a Fedora Core 10 64-bit server running Cacti.  Both virtual machines were hosted on a Fedora Core 8 64-bit server running VMware Server 1.0.8.

Pre-requisites

In order to configure an Openfiler 2.3 server for SNMP monitoring in Cacti the following pre-requisites must be met :-

  • An installed Openfiler 2.3 server / appliance with SNMP configured
  • An existing Cacti installation

Adding a device

The following section provides the configuration settings selecting when adding an Openfiler server as a new device in Cacti.  In order to add an Openfiler server in to Cacti as a new device perform the following steps :-

  1. Logon to the Cacti web site as an administrative user
  2. Click on the Console tab if neccesary
  3. Click on the Create devices link in the main pane
  4. Set the Description to the friendly name you wish to use within Cacti – E.G. Openfiler Server
  5. Set the Hostname to the FQDN if DNS is configured or the IP Address of the server
  6. Select the Generic SNMP-enabled Host template
  7. Set the SNMP version to Version 2
  8. Set the community string to the required string for your infrastructure – E.G. public
  9. Set the Downed device detection method to Ping and SNMP
  10. Scroll down to the bottom of the page and click on the Save button
  11. In the Devices list click on the device name and scroll down to the bottom of the page
  12. Confirm that at the top of the page that the general SNMP informatio is displayed for the server

Associate data queries to the device

Once the device has been added to Cacti data queries need to be associated to it so that graphs can be produced.  To associate data queries to the device perform the following steps :-

  1. In the Devices list click on the device name and scroll down to the bottom of the page
  2. In the Associated data queries section change the Add data query drop down box to SNMP – Get Mounted Partitions
  3. Click on the Add button to add the new data query
  4. Once added the query will be shown with a status of Success [xx Items, x Rows] (The amount of Items and Rows will differ depending on how many partitions exist on the server)
  5. Change the Add data query drop down box to SNMP – Get Processor Information
  6. Click on the Add button to add the new data query
  7. Once added the query will be shown with a status of Success [x Items, x Rows] (The amount of Items and Rows will differ depending on how many CPU’s exist in the server)
  8. Change the Add data query drop down box to SNMP – Get Interface Statistics
  9. Click on the Add button to add the new data query
  10. Once added the query will be shown with a status of Success [x Items, x Rows] (The amount of Items and Rows will differ depending on how many network interfaces exist in the server)
  11. Click on the Save button to associate the queries to the device.

Create graphs for the device

The next step in configuring an Openfiler server for monitoring through Cacti is to add the graphs required.  To add new graphs for the Openfiler server perform the following steps :-

  1. In the Devices list click on the device name and scroll down to the bottom of the page
  2. Click on the Create graphs for this host
  3. The create devices page for the device will be shown and list all of the items which have been discovered on the server by the Date query names associated in the previous section
  4. In the SNMP – Get Mounted Partitiions section of the screen all the partitions mounted on the server will be listed including the root partition, swap partition, and physical memory.
  5. Enable the tick box on the right hand side of the screen next to each partition you wish to graph
  6. In the SNMP – Get Processor Information section of the screen all of the CPU’s installed in the server will be listed
  7. Enable the tick box on the right hand side of the screen next to each CPU
  8. In the SNMP – Get Interface Statistics section of the screen all of the network interfaces installed in the server will be listed identified by the IP address associated.
  9. Enable the tick box on the right hand side of the screen next to each network interface you wish to graph
  10. Change the graph type drop down box to In/Out Bytes with Total Bandwidth
  11. Click on the Create button to create the graphs

Cacti W2K3 8 – Initial Configuration Of Cacti

Cacti W2K3 8 – Initial Configuration Of Cacti

Introduction

The final step in the installation of Cacti is to perform the initial configuration through the web page.

To initially configure Cacti through the web page perform the following steps :-

  • In a web browser on the server or from another host which you allowed access to in Apache in the previous page go to :-

http://<Your cacti server IP Address>/cacti/

E.G. http://127.0.0.1/cacti/

  • When presented with the Cacti Initial Configuration Screen click onNext
  • When prompted select New Installation and then click on Next
  • At the next screen ensure that Cacti has found the RRDTool Binary Path, PHP Binary Path, and the Cacti Log File Path

N.B. The SNMP Binaries will show as NOT FOUND as Net-SNMP is not installed

  •  Configure the RRDTool Version as RRDTool 1.2x
  • Next click on Finish to complete the initial configuration
  • When prompted logon with a username and password of admin
  • You will be forced to change the password and when prompted change it to your own password
  • Click on Save

Cacti should now be installed and you will be logged on to the Console screen.

Cacti W2K3 7 – Configuring The Apache Web Server

Cacti W2K3 7 – Configuring The Apache Web Server

Introduction

The following article explains how to install and initially configure MySQL 5.5.19 Community Edition Server on to a Windows 2003 Standard Edition Server.

The environment used for this installation was a Windows 2003 Standard Edition Server Virtual machine attached to an Active Directory Domain and running under a VMware ESXi 4.0 host.

Obtaining The PHP DLL File

In order to configure Apache to run using PHP you also need to download the specific PHP dll from here.

Installing The PHP DLL File

To install the PHP DLL file from http://www.apachelounge.com perform the following steps :-

  • Logon to the server as an Administrative account
  • Navigate to where the PHP DLL file was downloaded
  • Unzip the ZIP file (php5apache2_4.dll-php-5.3.8-win32.zip in my case) to C:\PHP

Configuring Apache

To configure the Apache Web Server perform the following steps :-

  • Logon to the server as an Administrative account
  • Navigate to C:\Apache23\conf
  • Edit the file httpd.conf
  • Search for the line # Dynamic Shared Object (DSO) Support and then at the end of the section add in the line below :-

LoadModule php5_module c:\php\php5apache2_4.dll

PHPIniDir “C:\php”

  • Search for the line <IfModule mime_module> and then at the end of the section add the line below :-

Add Type application/x-httpd-php .php

  • Search for the line DirectoryIndex and change it to the following line below :-

DirectoryIndex index.html index.php

  • Save and Exit the file

Configuring Apache To Run As A Service

To configure Apache to run as a service on the server perform the following steps :-

  • Logon to the server as an Administrative account
  • Open a Command Prompt and navigate to C:\Apache23\bin
  • At the Command Prompt execute the following command :-

httpd -k install

  • To start the service execute the following command :-

httpd -k start

Cacti W2K3 6 – Installing Cacti And Its Dependencies

Cacti W2K3 6 – Installing Cacti And Its Dependencies

Introduction

The following article explains how to install Cacti and its dependencies on to a Windows 2003 Standard Edition Server.

The environment used for this installation was a Windows 2003 Standard Edition Server Virtual machine attached to an Active Directory Domain and running under a VMware ESXi 4.0 host.

Obtaining The Software

To obtain the Cacti software go to here and download the Windows in Zip format.

To obtain the Cacti Spin softwate go to here and download the Windows in Zip format.

To obtain the RRDTool software go to here and download the latest version

Installing The Cacti Software

To install the Cacti software perform the following steps :-

  • Logon as an Administrative user to the server
  • Navigate to where the Cacti Zip file was saved
  • Unzip the Cacti Zip file (cacti-0.8.7i.zip in my case) and copy the contents to C:\Program Files\Apache Group\Apache2\Htdocs

Configuring Cacti

To configure Cacti perform the following steps :-

  • Logon as an Administrative user to the server
  • Navigate to C:\Program Files\Apache Group\Apache2\Htdocs\cacti\include
  • Edit the file config.php and set the $database_hostname,$database_username$database_password, and$database_port :-

$database_hostname = “cacti”;

$database_username = “cactiuser”;

$database_password = “{your password};

$database_port = “3306”;

  • Save and Exit the file

Installing The Cacti Spine Software

To install the Cacti Spine software perform the following steps :-

  • Logon as an Administrative user to the server
  • Navigate to where the Cacti Spine Zip file was saved
  • Unzip the Cacti Zip file (cacti-spine-0.8.7i.zip in my case) and copy the contents to C:\cacti

Configuring Cacti Spine

To configure the CactiSpine software perform the following steps :-

  • Navigate to C:\cacti and open the file spine.conf
  • Locate the line below and then change the DB_HostDB_Database,DB_UserDB_Pass, and DB_Port values to the desired settings :-

DB_Host         127.0.0.1

DB_Database  Cacti

DB_User         cactiuser

DB_Pass        {Password to be used for the MySQL cactiuser account}

DB_Port         3306

  • Save and Exit the file

Installing The RRDTool Software

To install the RRDTool software perform the following steps :-

  • Logon as an Administrative user to the server
  • Navigate to where the RRDTool Zip file was saved
  • Unzip the Cacti Zip file (rrdtool-1.2.15-cygwin-1.5.20.zip in my case) and copy the contents to C:\cacti

Cacti W2K3 5 – Installing Cygwin

Cacti W2K3 5 – Installing Cygwin

Introduction

The following article explains how to install and initially configure Cygwin on a Windows 2003 Standard Edition Server.

The environment used for this installation was a Windows 2003 Standard Edition Server Virtual machine attached to an Active Directory Domain and running under a VMware ESXi 4.0 host.

Installing The Software

In order to install the Cygwin software perform the following steps :-

  • Open a web browser and navigate tohttp://www.cygwin.com/install.html
  • Launch setup.exe from the web page
  • At the Setup Welcome screen click on Next to continue
  • At the Choose A Download Source screen select Install from Internet and then click on Next to continue
  • At the Select Root Install Directory screen set the root directory to C:\Cygwin
  • Select All Users for the Install For option and then click on Next to continue
  • At the Select Local Package Directory screen set the directory where you want to save the installation files and then click on Next to continue
  • At the Select Your Internet Connection screen set the which type of connection you have and then click on Next to continue
  • At the Choose A Download Site screen select a mirror site to use and then click on Next to continue

Cygwin will now download the setup files

  • At the Select Packages screen select the following packages to install

Base – Install all items

Libs – lipart_lgpl, libfreetype26, libpng12, zlib, and openssl

Utils – patch

Web – wget

  • Once you’ve selected the necessary packages click on Next to continue
  • At the Resolving Dependencies screen select Select required packages (RECOMMENDED) and then click on Next to continue

Cygwin will now install

  • At the Create Icons screen select whether you want the Cygwin icons to be added to the Desktop and Start Menu and then click on Finish to complete the installation

Cygwin is now installed and ready for use

Configuring Cygwin

Once installed configure Cygwin by performing the following steps :-

  • Right Click on My Computer and select Properties
  • Click on the Advanced Tab and click on the Environment Variables buttons
  • Prepend C:\Cygwin\bin; to the PATH variable

Cacti W2K3 4 – Installing PHP For Windows 5.3.8

Cacti W2K3 4 – Installing PHP For Windows 5.3.8

Introduction

The following article explains how to install and initially configure PHP For Windows 5.3.8 on to a Windows 2003 Standard Edition Server.

The environment used for this installation was a Windows 2003 Standard Edition Server Virtual machine attached to an Active Directory Domain and running under a VMware ESXi 4.0 host.

Obtaining The Software

As with Apache, the best way to install PHP for use with Apache on Windows and Cact is to download the ZIP file here.

Installing The Software

Once the ZIP file has been downloaded perform the following steps to install it on to the server :-

  • Logon as an Administrative user to the server
  • Navigate to where the PHP ZIP file was saved
  • Unzip the ZIP file (php-5.3.8-Win32-VC9-x86.zip in my case) to the C: drive
  • The ZIP file with create a new folder on the C: drive called C:\PHP

Configuring PHP

To configure PHP once installed perform the following steps :-

  • Right Click on My Computer and select Properties
  • Click on the Advanced Tab and click on the Environment Variables buttons
  • Prepend C:\PHP\; to the PATH variable
  • Create a new syetem variable named PHPRC and set it to C:\PHP\
  • Copy the file C:\PHP\php.ini-production to C:\PHP\php.ini
  • Open the file and search for the text ; extension_dir = “ext” and change it to the following :-

extension_dir = “C:\PHP\ext”

  • Next search for the text ; extension=php_mysql.dll and change it to the following :-

extension=php_mysql.dll

  • Next search for the text ; extension=php_sockets.dll and change it to the following :-

extension=php_sockets.dll

  • Next search for the text ; cgi.force_redirect = 1 and change it to the following :-

cgi.force_redirect = 0

  • Save and Exit the file

PHP is now installed and configured ready for use.

Cacti W2K3 3 – Installing Apache Web Server

Cacti W2K3 3 – Installing Apache Web Server

Introduction

This article provides details of how to install the Apache Web Server version 2.3.16 on to a Windows 2003 Standard Edition Server.

The environment used for this installation was a Windows 2003 Standard Edition Server Virtual machine attached to an Active Directory Domain and running under a VMware ESXi 4.0 host.

Obtaining The Software

The best way to install Apache Server for use with Cacti on Windows is to download the zip file from here.

A prerequisite of the installation is that Visual Studio C++ 2008 is installed on the server which can be downloaded here.

Installing The Software

To install the Apache Web Server software perform the following steps :-

  • Logon as an Administrative user to the server
  • Navigate to where the Apache ZIP file was saved
  • Unzip the apache zip file (httpd-2.3.16-win32.zip in my case) to the C: drive.
  • The zip file will create a new folder on the C: Drive calledC:\Apache23

Apache is now installed on the server and ready for use.

Cacti W2K3 2 – Configuring The MySQL Database

Cacti W2K3 2 – Configuring The MySQL Database

Introduction

The following article explains how to configure the Cacti MySQL Server 5.5.19 database running on Windows 2003 Standard Edition Server.

The environment used for this installation was a Windows 2003 Standard Edition Server Virtual machine attached to an Active Directory Domain and running under a VMware ESXi 4.0 host.

Creating The Cacti Database

To create the Cacti Database perform the following steps :-

  • Logon to the server as an Administrative account
  • Click on Start, Programs, MySQL, MySQL Server 5.5, MySQL 5.5 Command Line
  • When prompted enter the password configured for the root account
  • To create the database execute the following command :-

create database cacti;

  • Open a command prompt and execute the following command to import the default Cacti database

mysql –user=root –password cacti < “C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\cacti\cacti.sql”

  • When prompted enter the password configured for the root account

Create The Cacti Database User

To create the Cacti Database User perform the following steps :-

  • Logon to the server as an Administrative account
  • Click on Start, Programs, MySQL, MySQL Server 5.5, MySQL 5.5 Command Line
  • When prompted enter the password configured for the root account
  • To create the cacti database user execute the following commands :-

GRANT ALL ON cacti.* TO cactiuser@localhost IDENTIFIED BY ‘{Your Password}’;

flush privileges;

Cacti W2K3 1 – Installing MySQL 5.5.19

Cacti W2K3 1 – Installing MySQL 5.5.19

Introduction

The following article explains how to install and initially configure MySQL 5.5.19 Community Edition Server on to a Windows 2003 Standard Edition Server.

The environment used for this installation was a Windows 2003 Standard Edition Server Virtual machine attached to an Active Directory Domain and running under a VMware ESXi 4.0 host.

Obtaining The Software

To obtain the MySQL software MSI package go to here and download the architecture version required.

Installing The Software

Once the MSI package has been downloaded perform the following steps to install it on to the server :-

  • Logon as an Administrative user to the server
  • Navigate to where the MySQL MSI package was saved
  • Double click the MSI package (mysql-5.5.19-win32.msi in my case) to launch its installation
  • At the setup Welcome Screen click on Next to continue
  • At the End User License Agreement Screen tick the box for I accept the terms in this License Agreement and then click on Next to continue
  • At the Choose Setup Type Screen select Typical
  • At the Ready To Install MySQL Server 5.5 Screen click on Install to begin the installation
  • At the MySQL Enterprise Popup screen click on Next to continue
  • At the MySQL Enterprise Popup screen The MySQL Monitoring Service click on Next to continue
  • At the Installation Completed screen click on Finish to complete the installation

The MySQL Instance Configuration Wizard will now launch if you left the option ticked on the Installation Completed screen

  • At the instance tuning Welcome screen click on Next to continue
  • At the Configuration Type screen select the Standard Configurationoption and then click on Next to continue
  • At the Windows Options screen select Install As Windows Serviceand select MySQL for the Service Name
  • Ensure that the Launch the MySQL Server automatically option isselected
  • Select the option Include Bin Directory in Windows PATH and then click on Next to continue
  • At the Modify Security Options screen enter a new Password for theroot user and then click on Next to continue
  • At the Ready To Execute click on Execute to tune the server
  • Once the tuning has completed click on Finish to end tuning the server

The MySQL Server 5.5.19 software is now installed and the Windows Service MySQL is now started on the server