Configuration of the SNMP service in 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:
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.
Open the a new version SNMP config file, in your editor of choice – we use VIM
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:
rocommunity community_stringÂ 127.0.0.1
rwcommunity community_string monitor_IP
rocommunity community_string monitor_IP
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:
Start SNMP service:
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