Cacti (home)ForumsDocumentation

Configure Cacti

  1. Edit “include/config.php” and specify the database type, name, host, user and password for your Cacti configuration.
    $database_type = "mysql";
    $database_default = "cacti";
    $database_hostname = "localhost";
    $database_username = "cactiuser";
    $database_password = "cacti";
    /* load up old style plugins here */
    $plugins = array();
    //$plugins[] = 'thold';
       Edit this to point to the default URL of your Cacti install
       ex: if your cacti install as at http://serverip/cacti/ this
       would be set to /cacti/
    $url_path = "/cacti/";
    /* Default session name - Session name must contain alpha characters */
    #$cacti_session_name = "Cacti";

    The $plugins array is required for using the Plugin Architecture (PIA) only. For legacy plugins, those that must be installed in global.php, we have moved the plugins array out of global.php and into config.php. This was done to insure that global.php remains pristine. It is a file that is not intended to be modified, so with the PIA installed, you should not have to.
    The variable “URL_PATH” has also been moved from global.php to config.php for the same reason as the plugins array. For those of you upgrading from very old Plugin Architectures you should know that in the past, we attempted to “detect” this path. However, the process was not reliable. Therefore, you have to specify that path in config.php.

  2. Point your web browser to: http://your-server/cacti and use the username and password of 'admin' and 'admin' without quotes. You will be required to change this password immediately.
  3. From Cacti, go to Settings→Paths and verify/udate your paths to point to the correct locations. Recommended examples are posted below. If you plan on using Spine, then it is very important that all paths include forward slashes instead of backslashes.
Path Setting
PHP Binary Path: c:/php/php.exe
RRDTool Binary Path: c:/cacti/rrdtool.exe
SNMPGET Path: c:/progra~1/net-snmp/bin/snmpget.exe
SNMPWALK Path: c:/progra~1/net-snmp/bin/snmpwalk.exe
SNMPBULKWALK Path: c:/progra~1/net-snmp/bin/snmpbulkwalk.exe
SNMPGETNEXT Path: c:/progra~1/net-snmp/bin/snmpgetnext.exe
Cacti Logfile Path: c:/mycacti/website/cacti/log/cacti.log
Spine Path: c:/cacti/Spine.exe
  1. Click on Devices. Delete the Localhost devices as it intended for Linux environments In the upper right corner, click Add. Fill in the following information and then click Add.
    Description: My Windows localhost
    Hostname: localhost
    Host Template: Windows 2000/XP
  2. You should now be looking at the localhost device screen. Right under it's name, there should be some SNMP information listed, if not you should double check the SNMP settings on the server and firewall settings. In the upper right-hand corner, click on Create Graphs for this Host. On the following screen, select a disk partition and network interface. At the bottom of the page, click on Create.
  3. Log into the user account you'll be using for the scheduled task and verify starting a Cacti polling cycle works. Do this by running the following from the command prompt:
    php c:/cacti_web_root/cacti/poller.php

    The output should look something like the following:

    C:\>php c:\inetpub\wwwroot\cacti\poller.php
    OK u:0.00 s:0.06 r:1.32
    OK u:0.00 s:0.06 r:1.32
    OK u:0.00 s:0.16 r:2.59
    OK u:0.00 s:0.17 r:2.62
    10/28/2005 04:57:12 PM - SYSTEM STATS: Time:4.7272 Method:cmd.php Processes:1 Threads:N/A Hosts:1 HostsPerProcess:2 DataSources:4 RRDsProcessed:2

    After this has ran once, you should have “cacti.log” in ”/cacti/log/” and rrd files in /cacti/rra/.

  4. You are going to need to schedule a task while logged on as an Administrator. This task is required to you can run “poller.php” every 5 minutes. Make sure the Task Scheduler service is started and follow the steps below to begin.
    Note: The following instructions are based on Windows XP and Windows Server 2003. You should be able to follow these instructions close enough for Windows 2000 as well.
    1. Select Start –> Settings –> Control Panel and double click on Scheduled Tasks.
    2. Double click on Add Scheduled Task.
    3. Click Next and Browse on the following screen. Find “c:\php” and select “php.exe”. Choose Daily on and click Next.
    4. Click Next again without changing the time or date settings.
    5. When entering a username and password make sure the user has read and write access to the following directories:

      Make sure the user has read, write, and execute access to the following directories:

    6. Click Next and Finish to close the wizard.
    7. Right click on the task you just created, and select Properties.
    8. Select the Schedule tab.
    9. Make sure Daily is selected and click the Advanced button.
    10. Check the Repeat checkbox, set it for 5 minutes and set the duration for 24 hours.
    11. Click Ok
    12. In the Run textbox enter the following text making sure to use the appropriate paths.

      The start in box should say



Personal Tools