Escolar Documentos
Profissional Documentos
Cultura Documentos
Target Audience
This document is intended for use by Nagios XI Administrators who wish to use the Cacti as a supplement to Nagios XI.
Installing Prerequisites
Before you can install Cacti on your Nagios XI server, you'll need to install a prerequisite component by running the following command:
yum install php-pear-Net-SMTP
Installing Cacti
You can install Cacti with the following command:
yum install cacti
You're not done yet! Keep following the steps outlined below to finish the Cacti setup.
Configuring MySQL
Since MySQL is already configured in your Nagios XI install with the default root password of 'nagiosxi', this document will assume that
the default is still being used. If you have changed this login credentials, adjust the following commands to suit your changes.
mysql -u root -p'nagiosxi'
> create database cacti;
> GRANT ALL ON cacti.* TO cacti@localhost IDENTIFIED BY 'cactipassword';
> FLUSH privileges;
> exit
Now its time to dump the premade cacti database into the database you just created. The first thing you'll need to do is find/verify the
location of the cacti.sql file. This file is normally located at /usr/share/doc/cacti-0.8.8a/cacti.sql . You can locate the file on your system
by running the following command:
locate cacti.sql
Once you've found your cacti.sql you simply need to dump it into mysql using the following command:
mysql -u cacti -p'cactipassword' cacti < path_to_cacti.sql
Make sure that the import went smoothly by running the following command:
mysql -u cacti -p'cactipassword' -e "use cacti; show tables;"
If this writes a blank list to the screen then something went wrong when importing cacti.sql. Possible problems might include a bad
cacti.sql being used or login credentials being incorrect.
US: 1-888-NAGIOS-1
Int'l: +1 651-204-9102
Fax: +1 651-204-9103
Web: www.nagios.com
Email: sales@nagios.com
Page 1
Copyright 2011 Nagios Enterprises, LLC
Revision 1.0 August, 2013
local localhost
public
Further down in the file you need to edit the groups. You'll want to delete the existing group lines and replace them with this:
group
group
group
MyRWGroup
MyRWGroup
MyRWGroup
v1
v2c
usm
local
local
local
all
included
.1
any
all
none
Now scroll down and under # System contact information and make sure the lines look like this:
syslocation Unknown (edit /etc/snmp/snmpd.conf)
syscontact Root (configure /etc/snmp/snmp.local.conf)
Finally, under the # Pass through control section find the Uncommented line that begins with pass and make sure the line looks like
this:
pass .1.3.6.1.4.1.4413.4.1 /usr/bin/ucd5820stat
Save the file. That should be all you need to get you started.
Check to see if the config makes sense to snmpd by restart/starting snmpd with the following command:
service snmpd restart
If the starting portion of snmpd fails, then go through the above steps again. Also, its probably a good idea to make sure snmpd is
started upon bootup:
chkconfig snmpd on
Now its time to test SNMP out. Run the following command:
snmpwalk -v 1 -c public localhost IP-MIB::ipAdEntIfIndex
The command should return output similar to the following:
IP-MIB::ipAdEntIfIndex.127.0.0.1 = INTEGER: 1
IP-MIB::ipAdEntIfIndex.192.168.5.70 = INTEGER: 2
If this is what snmpwalk returns then you're good to go. Keep in mind the IPs won't necessarily be the same. If you're getting results
from snmpwalk, you're done here!
US: 1-888-NAGIOS-1
Int'l: +1 651-204-9102
Fax: +1 651-204-9103
Web: www.nagios.com
Email: sales@nagios.com
Page 2
Copyright 2011 Nagios Enterprises, LLC
Revision 1.0 August, 2013
US: 1-888-NAGIOS-1
Int'l: +1 651-204-9102
Fax: +1 651-204-9103
Web: www.nagios.com
Email: sales@nagios.com
Page 3
Copyright 2011 Nagios Enterprises, LLC
Revision 1.0 August, 2013
Finishing Up
That's it Cacti should now be installed and working!
US: 1-888-NAGIOS-1
Int'l: +1 651-204-9102
Fax: +1 651-204-9103
Web: www.nagios.com
Email: sales@nagios.com
Page 4
Copyright 2011 Nagios Enterprises, LLC
Revision 1.0 August, 2013