Presentation of SNMP
SNMP stands for Simple Network Management Protocol.
It is a protocol used to monitor servers.
Installation Procedure
Install the SNMP packages:
# yum install -y net-snmp net-snmp-utils
Set up a minimal configuration:
# cd /etc/snmp # cp -p snmpd.conf snmpd.conf.dist # echo "rocommunity public">snmpd.conf # echo "syslocation here" >>snmpd.conf # echo "syscontact root@localhost" >>snmpd.conf
Activate at boot and start the SNMP service:
# systemctl enable snmpd && systemctl start snmpd
Execute a simple test:
# snmpwalk -v 1 -c public -O e 127.0.0.1 SNMPv2-MIB::sysDescr.0 = STRING: Linux rhel7.example.com 3.10.0-54.0.1.el7.x86_64 #1 SMP Tue Nov 26 16:51:22 EST 2013 x86_64 SNMPv2-MIB::sysObjectID.0 = OID: NET-SNMP-MIB::netSnmpAgentOIDs.10 ...
If you plan to monitor the machine through a remote server like Cacti, update the firewall configuration:
# firewall-cmd --permanent --add-port=161/udp success # firewall-cmd --reload success
Additional Resources
If you want some details about metrics, you can have a look at the net-snmp website.
Leave a Reply
You must be logged in to post a comment.