In my last post, I showed you how to install & setup Cacti Monitoring server on RHEL/CentOS. Here I will demonstrate how we can configure Cacti clients that will be monitored centrally through Cacti server.
First of all, as I mentioned in last post, install net-snmp package on all the nodes that you want to monitor by issuing
yum install net-snmp command. Then, start
snmpd service by executing
service snmpd service. Make sure to execute
chkconfig snmpd on so that the service starts at boot time.
One point worth noting is that if you have nodes in different zones, then you will need to open UDP port 23 (change it in accordance to your setup, that I will describe in a while) from firewall, if it is present.
Lets now edit the
/etc/snmp/snmpd.conf file on Cacti Server to allow clients to talk to Cacti. Backup the existing file, nullify it & paste below contents in the file. IP address is of our Cacti Server itself.
cacti_snmp is community name that is used in case we choose SNMP version other than
Not in Use. This has been explained later in this post. You can include the whole network by using network subnet.
com2sec AllUser 192.168.0.123 cacti_snmp # Map 'ConfigUser' to 'ConfigGroup' for SNMP Version 2c # Map 'AllUser' to 'AllGroup' for SNMP Version 2c # sec.model sec.name group AllGroup v1 AllUser # Define 'SystemView', which includes everything under .188.8.131.52.2.1.1 (or .184.108.40.206.220.127.116.11) # Define 'AllView', which includes everything under .1 # incl/excl subtree view SystemView included .18.104.22.168.2.1.1 view SystemView included .22.214.171.124.126.96.36.199.1 view AllView included .1 # Give 'ConfigGroup' read access to objects in the view 'SystemView' # Give 'AllGroup' read access to objects in the view 'AllView' # context model level prefix read write notify access AllGroup "" any noauth exact AllView none none rocommunity cacti_snmp 192.168.0.123
Now that snmpd package has been installed & configuration file has been edited, lets come back to Cacti server & launch its web front-end by pointing browser to
localhost/cacti. Then follow below instructions to configure clients.
Devices on left side of screen. Then click
Now fill in the details of your client node. Enter IP address or FQDN in second field. In third field, choose
Local Linux Machine from drop-down list. Choose
Not in Use as SNMP version. Leave other fields as default. Click
Go back to homepage & click
Devices to see the newly added device. It must show
Up as status. If its down or unknown, then make sure your node is up,
snmpd is running & is accessible through Cacti server (ping it to check).
After confirming the Up status, Click the node you want to create graphs for. Then click
Create Graphs for this Host link.
By default, we only see graphs for localhost. So, in order to see graphs for all the nodes, we need to add them to the Graph Tree. For this, go back to homepage & click
Graph Trees. Then click the
Default Tree link & then click
Tree Item Type from drop-down list. Click
Voila 😉 Cacti clients are now configured 🙂 You can see graphs for all your client nodes through Cacti Monitoring Server 🙂 You may wish to explore it on your own now 😉
And oh!! Below are few of my beautiful graphs for localhost & client node 😉 🙂