Follow Us

Monitoring the pulse of IT

Monitoring SNMP Traps from ESX hosts in Opsview (Part 2)



little_nipper_mouse_trap.jpgSo you followed the steps in the previous post about enabling SNMP traps on ESX4. Now you probably want to pick those up by something useful. Opsview can be configured to handle the traps quite easily. Just follow the steps below and your server will be listening to those pesky traps. After that, you’ll need to write a couple of service check handlers in Opsview to make sense of the traps. More on that later. This post is just about picking them up. This was done on an Ubuntu 10.04 LTS server. The steps are probably the same on Debian systems. 1. Make sure you have snmpd installed. If you don’t, install it! Easy as pie.

aptitude install snmpd

2. Edit /etc/snmp/snmpd.conf and uncomment “master agentx”. 3. Edit /etc/default/snmpd (or /etc/snmp/snmptrapd.conf on newer systems):

TRAPDRUN=yes
TRAPDOPTS='-t -m ALL -M /usr/share/snmp/mibs:/usr/local/nagios/snmp/load -p /var/run/snmptrapd.pid'
SNMPDOPTS='-u nagios -Lsd -Lf /dev/null -p/var/run/snmpd.pid'

4. Edit /etc/snmp/snmptrapd.conf and add the following lines:

traphandle default /usr/local/nagios/bin/snmptrap2nagios
disableAuthorization yes

Please note that this will make the server listen to and handle any SNMP traps it receives, regardless of source. 5. Restart snmpd and snmptrapd:

/etc/init.d/snmpd restart

6. Edit the /etc/sudoers file to allow Opsview to restart snmpd and snmptrapd:

nagios ALL=NOPASSWD:/usr/local/nagios/bin/snmpd reload

7. Test the permissions:

su - nagios
sudo /usr/local/nagios/bin/snmpd reload

8. Exit back to the root user and restart opsview-web:

/etc/init.d/opsview-web restart

That’s all. Opsview should now be able to handle traps sent to it.

About the Author

Marcus Vejneke holds a bachelor’s degree in computer science and engineering and has worked in IT for almost 14 years. Marcus lives in Sweden and works as Sysadmin.

Legal Disclaimer

This blog post is contributor by a member of the Opsview community. The Opsview project and Opsera Ltd. accept no responsibility for the accuracy of its content and are not liable for any direct or indirect damages caused by its use.

Tags: debian, esx monitoring, esx4, opsview, snmp traps, ubuntu

RSSSubscribe to this blog

Contact Us

For editorial queries:
Mike Simons Mike_Simons@idg.co.uk

For website issues:
Email webmaster@techworld.com

For commercial queries
Russell Kearney russell_kearney@idg.co.uk


For more contact details click here.


Email this to a friend

* indicates mandatory field





Techworld White Papers

Optimising data protection for virtual environments

VM environments require the same level of data protection as does the physical server environment. Companies may use data protection tools built for the physical environment in the virtual world, but this has serious disadvantages.

Download Whitepaper

PCI Compliance: Are UK businesses ready?

Exploring the results of a recent survey, including: ? Levels of understanding of the standard ? Current perceptions of actual compliance status ? Attitudes toward addressing compliance

Download Whitepaper

Mobility Management for Dummies

Your complete guide to managing and securing mobile devices such as laptops and smartphones.

Download Whitepaper

Magic Quadrant for midrange and high-end NAS solutions

It is difficult to find one midrange or high-end NAS product that can cater to all needs. File systems embedded in NAS are often designed to solve one major pain point, with additional features being added later to broaden use cases and benefits.

Download Whitepaper

Techworld UK - Technology - Business

Oracle Video

Enabling agile and intelligent businesses

 Changing markets, competitive pressures and evolving customer needs are placing increasing pressure on IT to deliver greater flexibility and speed. Explore truly flexible SOA foundations with this Oracle video.

Watch
COLT White Paper

IT Misuse Survey

Complete this survey and you could win a Nexus One

Techworld are running a short survey to discover how UK businesses are managing Internet and email misuse in the Enterprise.

Complete Survey

Complete our survey and you could win a Sony E-book Reader.
Techworld have teamed up with HP to compile a survey relating to server virtualisation. Complete the short survey and you could be the lucky winner of a Sony E-book reader.

Complete the survey here

Site Map

Test