IMG 1010 - Installing Cacti

 

Prerequisite

Upgrade GCEMS to the version 10.5.0 software or above.

Cacti is not supported on a GCEMS server with a 64 bit Red Hat 5 Operating system installed nor is cacti supported in any GCEMS version of software earlier than version 10.5.0.

Related Topics:

IMG 1010 - Overview of Cacti Watcher

IMG 1010 - Upgrade From MRTG to Cacti Watcher

Installation of Cacti:

Update variables in Defaults File

  • If this is the first time using Cacti then a variable in the Defaults file will need to be added. Within Linux open a terminal window and go to /opt/dialogic/IMG/GateControlEMS

  • Open the Defaults file using either vi editor or a text editor like gedit, add the following line to the end of the file:

    CACTI_SUPPORT:1
     

  • Once done the Defaults File should look like the following with the CACTI_SUPPORT:1 variable added.LOG_DIR:/opt/dialogic/common/log

STATS_DIR:/opt/dialogic/common/stats CONFIG_DIR:/opt/dialogic/common/config LICENSE_DIR:/opt/dialogic/common/license BACKUP_DIR:/opt/dialogic/common/backup LLC_SWITCHBACK_MODE:1 LOG_LEVEL:1 STATS_FREQUENCY:5 FILE_MAX_SIZE:25 APP_DISABLED_TIMEOUT:1200 PRODUCT:IMG CACTI_SUPPORT:1

The variable CACTI_SUPPORT:1 in the Defaults file informs you that the Cacti functionality is enabled. In order to disable Cacti change the variable to CACTI_SUPPORT:0. Once variable is set it remains set in the Defaults file unless it is manually deleted. Even when installing a newer build, the variable will stay set.

  • Once the variable is set then MySQL, Apache, and PHP must be installed.

Installation of MySQL:

  • MySQL must be downloaded first. Using a browser go to:
    http://downloads.mysql.com/archives.php?p=mysql-5.0&o=other
    Download mysql-5.0.41.tar.gz to the /cacti-install directory on GCEMS server.

  • Go to /cacti-install directory and run the file install_mysql.sh. This should all be done as a root user.

$su $Password: excel2 (root password) [root]# ./install_mysql.sh
  • The installation of mySQL.sh will take between 15-45 minutes to complete depending on the speed of the PC it is getting installed on.

Installation of Apache:

  • Apache must be downloaded first. Using a browser go to:
    http://archive.apache.org/dist/httpd/httpd-2.2.4.tar.gz
    Download httpd-2.2.4.tar.gz to the /cacti-install directory on GCEMS server. 

  • From the /cacti-install directory run the file install_apache.sh. This should be done as root user

$su $Password: excel2 (root password) [root]# ./install_apache.sh
  • The installation of Apache will take between 15-45 minutes to complete depending on the speed of the PC it is getting installed on.

Installation of php.sh:

  • PHP must be downloaded first. Using a browser go to:
    http://us.php.net/get/php-4.4.7.tar.gz/from/a/mirror
    Download php-4.4.7.tar.gz to the /cacti-install directory on GCEMS server.

  • From the /cacti-install directory run the file install_php.sh. This should be done as root user

$su $Password: excel2 (root password) [root]# ./install_php.sh
  • The installation of PHP will take between 5-10 minutes to complete depending on the speed of the PC it is getting installed on.

If this is the first time installing php.sh the install will end with the error message below. This is OK. The message is informing you that the install was trying to create a backup. The file is now created and you should not see the error message again

cp: cannot stat `/www/php/php.ini': No such file or directory

Configure MySQL:

  • From the /cacti-install directory run the file ./configure_mysql.sh

$su $Password: excel2 (root password) [root]# ./configure_mysql.sh

Verify database got installed

  • From the /cacti-install directory run the following command to verify the database got installed. Verify that MySQL got configured correctly.

$su $Password: excel2 (root password) [root]# /usr/local/mysql/bin/mysql --user=root --password=rootpw
  • This will bring you to a mysql> prompt.

  • Enter show databases;

  • Within the database list displayed, verify that the cactidb is displayed.

  • To exit type "exit"

Installation of RRDTool , Cacti, and associated Templates:

  • RRDTool must be downloaded first. Using a browser go to:
    http://oss.oetiker.ch/rrdtool/pub/rrdtool-1.0.x/rrdtool-1.0.48.tar.gz
    Download rrdtool-1.0.48.tar.gz to the /cacti-install directory on GCEMS server.

  • Next, download cacti. Using a browser go to:
    http://www.cacti.net/downloads/cacti-0.8.6j.tar.gz
    Download cacti-0.8.6j.tar.gz to the /cacti-install directory on GCEMS server.

  • Continuing from the /cacti-install directory, run the following scripts in the order listed. Must be a root user to install

    Run the RRDTool script to install the rrdtool database
    ./install_rrdtool.sh > log_install_rrdtool.txt

    Run the cacti installation script.
    ./install_cacti.sh > log_install_cacti.txt

    Run the Configure Cacti Script
    ./configure_cacti.sh

If you are having trouble finding any of the above packages, look to the following for assistance or seek out alternate download servers on the internet.

http://cacti.net/download_cacti.php

http://cactiusers.org/downloads/

  • Shutdown and restart server

Verify Installation of Cacti:

  • In order to verify that the installation worked you must log into your system from a separate browser on a different PC. From the second PC open a browser like Internet Explorer® and enter the following:
    http://<ip address>/cacti  -  See screen capture below

The IP address entered is the IP address of the GCEMS server that cacti is being installed to

  • Once the browser negotiates to the correct IP address the following screen will appear. Select "Next" button

     

  • Select New Install at the type of installation and click Next>> box.

  • Read each of the installation screens and choose the installation for your system. When you get to the following screen below some changes must be made. Select "Finish" button when done

Any of the above settings can be changed at any time by going to Cacti Settings from within the Cacti Application

  •  The next screen that appears is the login screen. Enter the user and password



Username: admin
Password: admin

  • A password reset screen will appear. Reset the password to cactipw

The password can be set to anything you would like. Support personnel will need to be informed if the password is not cactipw

  • Once password is set the following page will appear. If you get into this screen, you have successfully installed and are now logged into cacti.

 

  • Cacti is installed and user is logged in. Cacti is a very powerful tool and there are many different settings etc. that can be configured. Below are a few basic aspects of Cacti, what they are, and how are they configured.

Using and Configuring Cacti:

Data Sources and Thresholds

  • On the left side of the Console screen under the Management Heading there is a field named Data Sources. Click on it. A screen like the following will appear:

  • The screen above shows all the Data Sources that are available in Cacti by default for the localhost. These are all Datasources for the GCEMS server you are logged on to.

  • In order to get the IMG data to be part of this list you must start GCEMS.

  • Once GCEMS is started then all the information from the /opt/dialogic/common/stats directory will now be sent to the RRDTool and from there will be sent to cacti to graph. In the above left corner of the screen above under "Select a Host" choose Any and the graphs set up for the IMG and the GCEMS will appear. See below.

 

The stats file is queried every 5 minutes which is the default set up in GCEMS. It may take up to 5 minutes for the graphs to appear in the menu above. The interval in which the stats file is updated is configured in the Defaults file located at either

/opt/dialogic/IMG/GateControlEMS.  (Software 10.5.1+)

Edit the line STATS_FREQUENCY:5 to change the interval

 

  • Click on the graphs tab at the top of the page. All the graphs from the screen shot above will appear in graphical form. On the left side of the screen is a graph tree and on the right side are the graphs.

  • Each of the graphs in the Data Source field can be configured individually. E-mail alerts and threshold values can be configured for each graph. In the Data Sources screen above double click on one of the graphs under the Template Name field and a screen like below will appear


  • Within this screen whether a Data Source is enabled or not is configured. Most of the thresholds in the Data Source Items screen are self explanatory. Below are some notes on these fields

    • CDEF Threshold - CDEF's allow you to apply mathematical functions to graph data to alter output

    • Send notifications to default alert addresses - This determines which set of email addresses will be used for alerting. There are individual addresses and global addresses. Individual addresses means that each individual threshold has a separate email address to send alerts to that are configured in the Alert E-Mail field above. Global means to send emails from all Data Sources to a specific set of emails predetermined by the user. For simplicity set this to Force:Off. This way you will only need to keep track of email address for the Alert E-mail field

    • Store a comma delimited list of email addresses that will be alerted if this threshold is exceeded

Cacti Settings Field:

  • One other field that should be mentioned is the Settings field under Configuration. If you click on the Settings field and then the Alerting/Thold tab the following screen below will appear.

    • This is the global screen for setting email alerts and thresholds. From this page an alerting email will be sent if any of the thresholds are exceeded. Also the Base URL is the address of the GCEMS server. Verify this is correct or alerting will not work correctly

Overview:

The above procedure explains how to install cacti onto a GCEMs server and also gives a high level view on how to configure the application to start graphing data from the IMG. Cacti is a very powerful tool and can do much more than explained above. Refer to the documentation section at http://docs.cacti.net/

Return to Documentation Home I Return to Sangoma Support