logIt Log Around The Clock

Configuring Cacti

A successful installation in a LAMP system may require more library. I added php5-cli to enable php through command line i.e $ /usr/bin/php , libphp-adodb, php5-snmp.

In localhost snmpd is installed and configured /etc/default/snmpd:

SNMPDOPTS='-Lsd -Lf /dev/null -u snmp -I -smux -p /var/run/snmpd.pid'

and edit /etc/snmp/snmpd.conf to have:

com2sec readonly  localhost         <some community string>

Install snmp, then I can test snmpwalk:

$ snmpwalk -Os -c <some community string> -v 1 localhost system

Cacti requires RRDTool and the correct version to be set in Settings menu of the Cacti web console. In my case, RRDTool version is 1.3x. In Cacti 0.8.6.x and above poller.php is called by cron instead of cmd.php, put this trough crontab in Cacti user (enter this Cacti user crontab from crontab -e -u or embed the user in crontab by root instead of individually edited).

*/2 * * * * /usr/bin/php /var/www/cacti/poller.php

It will generate file under rra directory of the web /var/www/cacti/rra/.rrd. RRD tool will create image based on this polling result file.

Leave a Reply