Network monitoring plays an important aspect in a system admin life. You will be managing some servers, and you might have problem taking care of their respective ‘health’, making sure its serving fine and performing best of it. There are some monitoring tool, for example, mrtg, nagios, cacti.
For our setup, we are utilizing cacti, a web-based host monitoring tool, that can monitor hosts through snmp. Its a php tool, and customizable. Its powerful enough to give you what you want, just the matter of configuration. The first thing, you have to make sure every host you want to monitor is snmp enabled.
SNMP stands for “Simple Network Management Protocol”, can be harmful if not configured properly. It can reveal you private information of the host. I will just put a simple snmpd.conf configuration file, that will have enough privilege control on host and community string.
com2sec local localhost YOUR_COMMUNITY_STRING
com2sec mynetwork 18.104.22.168/28 YOUR_COMMUNITY_STRING
group MyRWGroup v1 local
group MyRWGroup v2c local
group MyRWGroup usm local
group MyROGroup v1 mynetwork
group MyROGroup v2c mynetwork
group MyROGroup usm mynetwork
view all included .1 80
access MyROGroup “” any noauth exact all all none
access MyRWGroup “” any noauth exact all all none
You can verify that your snmpd daemon is responding to snmp request using snmpwalk. For snmp version 1, you can use,
snmpwalk -v 1 -c YOUR_COMMUNITY_STRING 127.0.0.1
For snmp version 2,
snmpwalk -v 2c -c YOUR_COMMUNITY_STRING 127.0.0.1
This configuration is for the end host you want to monitor. In Cacti, you will need to add the community string, and the IP of the host you want to monitor. Then, cacti will start polling information from these hosts through SNMP with the credential given.
Cacti – http://www.cacti.net/
Nagios – http://www.nagios.org
MRTG – http://oss.oetiker.ch/mrtg