Configuration of the SNMP service in Ubuntu

 In Linux, Monitoring, Ubuntu

In this article, we’ll learn how to install and basic configure SNMP service on Ubuntu(Linux). You’ll probably be wanting SNMP installed so that you can query it from your SNMP server. You’ll want the “Community String” and the “IP Address of your Monitoring Server” to hand.

First, you need to download and install SNMP on your system. You can do this with the following command in your terminal:

sudo apt-get install snmpd

Before make any changes you need to make sure that you move the current snmpd conf file out of the way. It has too much information in it.

mv /etc/snmp/snmpd.conf /etc/snmp/snmpd.conf.backup

Open the a new version SNMP config file, in your editor of choice – we use VIM

vim /etc/snmp/snmpd.conf

Now add the following lines into your blank file, replacing community_string with your actual snmp community string and monitor_IP with the IP address of your SNMP monitoring server:

rwcommunity community_string 127.0.0.2
rocommunity community_string 127.0.0.1
rwcommunity community_string monitor_IP
rocommunity community_string monitor_IP
trapcommunity community_string
trapsink monitor_IP community_string
sysContact John Doe, 01332 030400, Office
sysLocation Docklands, London
sysName Binary Royale

This gives you full access from a certain network. After changing the config file, you need to restart the service:

service snmpd reload

Start SNMP service:

/etc/init.d/snmpd start

Your host should now be SNMP able from your monitoring server. We tend to use Observium and CastleRocks’s SNMP products, for SNMP monitoring – both are useful for different things

Recommended Posts

Leave a Comment

Contact Us

We're not around right now. But you can send us an email and we'll get back to you, asap.

Not readable? Change text. captcha txt

Start typing and press Enter to search