Saturday, September 22, 2012

How to enable SNMP Monitoring on Ubuntu Server 12.04.2

Install SNMPD 

$ sudo apt-get install snmpd

Create a backup file of snmpd.conf original file that we will edit later

$ sudo mv /etc/snmp/snmpd.conf /etc/snmp/snmpd.conf.ori

Create the new snmpd.conf file 

$ sudo vim /etc/snmp/snmpd.conf

Add the file with these lines

rocommunity public
syslocation "Your Location"
syscontact admin@domain.com

Then edit the /etc/default/snmpd file

$ sudo vim /etc/default/snmpd

Disable this line below by adding # in front of the line 

#SNMPDOPTS='-Lsd -Lf /dev/null -u snmp -g snmp -I -smux -p /var/run/snmpd.pid'

And add a new line 

SNMPDOPTS='-Lsd -Lf /dev/null -u snmp -I -smux -p /var/run/snmpd.pid -c /etc/snmp/snmpd.conf'

Restart the SNMPD service

$ sudo /etc/init.d/snmpd restart
* Restarting network management services

Then you're done!

31 comments:

Anonymous said...

There is no /etc/default/snmpd after installation. Please check your information before publishing.

Anonymous said...

On a new AWS Ubuntu 12.04.1 instance these instructions worked perfectly for me. After installing snmpd /etc/default/snmpd did exist. I'm not sure if it's different for 12.04.2 though.

Thanks Andrew!

House of Verber said...

Yes these instructions worked great. Anonymous #1 is just a hater...lol. Thanks a lot.

Anonymous said...

Worked perfect on Ubuntu 12.04.. Thanks

Aaron Davidson said...

Worked first time on 12.04.2 - thanks.

danny mulvihill said...

I think anonymous #1 had the same issue as I did.

I did:
sudo apt-get install snmp
and hunted around for /etc/default/snmpd and /etc/snmp to no avail.

You also need to:
sudo apt-get install snmpd

Anonymous said...

This worked for me with the default

SNMPDOPTS='-Lsd -Lf /dev/null -u snmp -g snmp -I -smux -p /var/run/snmpd.pid'

knev@ittechsolution.com said...

Works well, Thanks for the writing a good post

Anonymous said...

Hi,
I've just tried this and got the error below after restart command.

sudo: /etc/init.d/snmpd: command not found

Can anyone help with this?

fyi I am a complete beginner!

dritzz said...

sudo service snmpd restart

they that ;)

aang said...

it works perfectly for my box. thx gan

Anonymous said...

THAT WORKED!
Thank you!

Anonymous said...

These instructions worked perfectly on an AWS 12.04.3 x64 instance.

shobnaamkoly said...
This comment has been removed by the author.
shobnaamkoly said...

Awesome Artical Really i have searching this type of valuable information From a lot of days i found satisfaction when Read your blog Thanks for giving this type blog and also please Read link bvba Woodstone which provide information server monitoring software & server monitoring tools

Anonymous said...

thx that worked !!!!!

Anonymous said...

Worked on Ubuntu 14.04 LTS Server after I tried the command which was mentioned by "dritzz":

sudo service snmpd restart

Thank You!

chyntia chaniago said...

nice post sob..
article yang menarik,saya tunggu article berikutnya yach.hehe..
maju terus dan sukses selalu...
salam kenal yach...
kunjungi blog saya juga ya sob,banyak tuh article2 yang seru buat dibaca..
agen situs poker online,poker online terpercaya...
http://chaniaj.blogspot.com/ dan situs kesayangan kami http://oliviaclub.com
serta sites.google kebanggaan kami https://sites.google.com/site/pokeronlineterpopuler/
di oliviaclub.com poker online uang asli terbaik di indonesia dengan teknologi teraman dan tercanggih.
main dan ajak teman anda bergabung dan dapatkan 20% referral fee dari house commision untuk turnover teman ajakan anda...

Muhammad Waseem said...
This comment has been removed by the author.
Elson Cade said...
This comment has been removed by the author.
Elson Cade said...

Server buddies provides Quality remote server management including troubleshooting, Server Management, Plesk Support, Server Maintenance, Server Monitoring, Server Troubleshooting and support for a large variety of customers at affordable rates. Here are option for Server Management, Server Maintenance, Server Monitoring, Server Troubleshooting, Server Optimization, Plesk Support, Linux Support, cPanel Support and Plesk Support.
.........

MUBARAKAH SUALMAN said...

what location we need to put in "Your Location"

Anonymous said...

@M SUALAMAN

Maybe try "The Moon"?

Anna Watson said...

This step by step process of to enable Remote Server Management is really a great initialization from your side..Thanks a lot for this information and i am looking forward for the very next update..

kavithavenkatesh said...

Thanks for the Remote Server Management information... I really love your blog posts... specially those on Website Monitoring, Server Monitoring, Website performance monitoring, Website monitoring service,Free server Monitoring, Free website Monitoring

BERITA KELLY said...

rekomendasi:NAGAQQ.COM | AGEN BANDARQ | BANDARQ ONLINE | ADUQ ONLINE | DOMINOQQ TERBAIK
NAGAQQ.COM | AGEN BANDARQ | BANDARQ ONLINE | ADUQ ONLINE | DOMINOQQ TERBAIK

daren sammy said...

The blog and data is excellent and informative as well. poker online terpercaya

Anonymous said...

Hi,
While I am installing, I got this error:
update-rc.d: warning: start and stop actions are no longer supported; falling back to defaults
update-rc.d: warning: stop runlevel arguments (1) do not match snmpd Default-Stop values (0 1 6)
snmpd was installed; I configured snmpd.conf file and then when I started the service, ı got these error:

[....] Starting snmpd (via systemctl): snmpd.serviceJob for snmpd.service failed because the control process exited with error code. See "systemctl status snmpd.service" and "journalctl -xe" for details.
failed!
I uninstall snmp and snmpd, but problem is still exist.
please can you help me?
I dindt found about this issue on forums

Anonymous said...

Worked perfectly for me on Ubuntu 16, exactly as above.

ชื่อที่แสดง said...

Please click on this post if you wanna paly with online casino.Thank you.

gclub
gclub casino online
gclub online

sothea hy said...

I think personalized spellbooks are good for that.
gclub casino online
casino online
gclub online