SNMP setup in CentOS

This article will walk you through setting up snmp on centos. SNMP stands for simple network management protocol and allows you to gather a number system stats such as CPU, Volume usage, IOPS, etc. Local or remotely.

First thing you need to do is get snmp installed.

Its also useful to install the snmp tools, these allow you to run snmpwalks locally. Do that with the command

Once they’re both install you can start editing your snmpd.conf file which is in /etc/snmp/

Once inside the snmpd.conf you can edit the file to suit your needs, however I found it sufficient to create my own simpler snmpd.conf with a few standard lines.

(don’t forget to backup your old snmpd.conf)

Save those changes and start the snmp daemon and set it start on boot

To check your snmp is working run the following command

If that doesn’t work make sure you have a line in your snmpd.conf which allows snmp queries from local host.

e.g

If it works you’re all set and you can monitor your server via snmp.

Should you would perfmormance disk stats add this into your snmpd.conf file and restart your snmpd daemon.

Leave a Reply