rrdtool-1.2.11-3 + cacti-0.8.6f-2 (Monitoring)
Support
Tested on 08/Nov/2005 by SuSE 10.0
RRDTool (Round Robin Database Tool) is a tool to generate graph from any kind
of data sources. This tool can replace MRTG.
This tool, perhaps, does not have a data gathering function. It needs some
front-end tool to gather data such as, HotSaNIC, and Cacti.
Cacti can be configured on Web by PHP/MySQL.
Install SNMP
- Make sure net-snmp is installed, configured, and running.
- On Linux, net-snmp-5.2.1-10.i586.rpm is installed, and configuration would
look like this (etc/snmp.conf).
|
#
# First, map the community name "public" into a
"security name"
# sec.name source community
com2sec public default public
# Second, map the security name into a group name.
# groupName securityModel securityName
group public v1 public
group public v2c public
group public usmpublic
# Third, create a view for us to let the group have rights to:
# name incl/excl subtree mask(optional)
view all included .1
# Finally, grant the group read-only access to the systemview view.
# group context sec.model sec.level prefix read write notif
access public "" any noauthexact all all all
# System contact information
#
syslocation xxxxxxxx
syscontact foo@host
|
- On Windows 2000, XP, 2003, SNMP Service should be installed, and it would
look like this,
- On CISCO products, SNMP configuration would like like this,
|
gw(config)#snmp-server community public RO
|
- Make sure, snmp is running and accessible. If necessary, open 161 tcp, udp
ports on the target device.
|
# snmpwalk -v 1 192.168.1.100 -c public | less
SNMPv2-MIB::sysDescr.0 = STRING: Hardware: x86 Family 6 Model 9
Stepping 5 AT/AT CO
MPATIBLE - Software: Windows 2000 Version 5.1 (Build 2600 Uniprocessor
Free)
SNMPv2-MIB::sysObjectID.0 = OID: SNMPv2-SMI::enterprises.311.1.1.3.1.1
DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (80732) 0:1
SNMPv2-MIB::sysContact.0 = STRING:
SNMPv2-MIB::sysName.0 = STRING: TS-NEC
SNMPv2-MIB::sysLocation.0 = STRING:
SNMPv2-MIB::sysServices.0 = INTEGER: 76
IF-MIB::ifNumber.0 = INTEGER: 4
....
|
Install Cacti
- rrdtool must be installed in default. If not, install
|
# rpm -ihv rrdtool-1.2.11-3.i586.rpm
|
- You need MySQL, apache, php...etc, and also running. Make sure you have a
session module for the php.
|
# rpm -qa | grep php4-session
php4-session-4.4.0-6
|
- Install cacti.
|
# rpm -ihv cacti-0.8.6f-2.noarch.rpm
|
- Create database in mysql,
|
# cd /usr/share/cacti
# mysqladmin -u root -p create cacti
Enter password:
# mysql -p cacti < cacti.sql
Enter password:
|
- Create a password and access permission to cactiuser.
|
# mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 87 to server version: 4.1.10a
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> GRANT ALL ON cacti.* TO cactiuser@localhost IDENTIFIED BY 'password';
mysql> flush privileges;
mysql> \q
Bye
|
- Edit /usr/share/cacti/include/config.php
|
...
$database_type = "mysql";
$database_default = "cacti";
$database_hostname = "localhost";
$database_username = "cactiuser";
$database_password = "password";
...
|
- You may give an access permission from your LAN. Edit /etc/apache2/conf.d/cacti.conf
|
Alias /cacti/ /usr/share/cacti/
<Directory /usr/share/cacti/>
Options None
order deny,allow
deny from all
allow from 127.0.0.1 192.168.0.0/24
</Directory>
|
- Restart apache
|
# /etc/init.d/apache2 reload
|
- Open http://localhost/cacti/ and click [Next]
- Select [New Install], and click [Next]
- This screen must show all [FOUND] if you installed by rpm. Click [Next]
- Type username: admin, password: admin
- Type user password twice. After this, you will see a main screen
Using default template
- To use Cacti's default templates, click [Devices], and select [localhost]
- Type [public] at Community text box.
- Click [Save]. You will see [Save Successfull].
- Click [localhost] again. If the configuration is correct, you can see the
snmp information.
- Next, you can add new graph. Click [New Graphs] from the menu. Gray items
are already added. Click [create]. You can monitor HDD in default.
- Click [Data Sources] from the menu to view added items
- Click [Graphs], and [Preview View]
Add traffic graph
- From the menu, click [Devices], and click [localhost] at the right.
- [Add Data Query] at [Associated Data Queries], select [SNMP - Interface
Statistics], and click [Add]
- Verify the added item, and click [Save]
- From the menu, click [New Graphs]. From [Data Query], check interface(s)
you want to monitor, and click [Create]. If you success to add, the item
will be grey.
- From the menu, click [Data Sources], and review the added items.
- From the [Graph Management], you can add items to show the graph.
Back
Copyright © [- SroNey / JohN
-]. All rights reserved