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!

34 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!

Tech Writer John 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.

Melani said...
This comment has been removed by the author.
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!

elson cade 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"?

Unknown 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

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.

Unknown said...

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

DreamNT said...

The article is interesting and very knowledgeable. Thank you for the good advice to me.









สูตรบาคาร่า

Anonymous said...

Lampung Service
www.lampungservice.com
Cara Menghidupkan HP Mati Total Baterai Tanam
Service Center Samsung
Kursus Service HP Bandar Lampung
Kursus Service HP Bandar Lampung
Kursus Service HP Tasikmalaya
Bimbel Lampung

auto slotxo said...

Yes, it is an educational article. Thank you for the good message. I also have a good article.
autoslotxo

erectile dysfunction drug said...

Awesome things here. I am very glad to look your post. Thank you so much and I'm taking a look forward to contact you. Will you please drop me a e-mail?

Anonymous said...

Hi can you help me the same for enabling on it CentOS 8?

Router Login Support said...

Thanks for sharing useful content with us.
Update Firmware on your Netgear Router

TP Link Repeater said...

Thanks for sharing important details with us.
TP-Link Extender Firmware Update