Simple SNMP service for a remotely monitored Linux Server

January 3, 2008

I though for some time that it is complicated to setup an SNMP daemon so a monitoring solution can readout critical information about the server, but it is not. Here a really simple setup that works fine with my monitoring solutions. (e.g. Zenoss)

First you need to install the SNMP daemon and activate it for automatic launch. For Centos do following:


# yum install net-snmp
# /sbin/chkconfig --level 345 snmpd on

and for Ubuntu/Debian:


# apt-get install snmpd

and remove the 127.0.0.1 in /etc/default/snmpd

After that you just need a single line in this file


# cat > /etc/snmp/snmpd.conf
rocommunity secretcommunityname x.x.x.x

Where secretcommunityname is a secret name you need to choose and x.x.x.x is the IP address of the monitoring server which should read the values. Don’t forget to enable this service in the firewall.


# iptables -A INPUT -s x.x.x.x -p udp --dport 161 -m state --state NEW -j ACCEPT
# iptables -A INPUT -s x.x.x.x -p tcp --dport 161 -m state --state NEW -j ACCEPT

No Comments yet »

RSS feed for comments on this post. TrackBack URI

Leave a comment

XHTML: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

Powered by WordPress
Entries and comments feeds. Valid XHTML and CSS. 34 queries. 0.060 seconds.