I'm using Nagios 4 and installed nagios plugins to. I wan't to monitor my HP switch CPU, MEM, etc via snmp, but I totally don't know how to do it. First of all, how do I get the right OID's and how to put it into the command.cfg and my own cfg's

Attached some pictures.

Thank you!

command.cfg switch.cfg

  • This is a poor question for a Q+A format site. What you're asking for is a guide on how to do this, not help with a specific problem that you've already put research effort into. Consider searching around first, as there are many results similar to this one: assets.nagios.com/downloads/nagioscore/docs/nagioscore/4/en/… – Spooler Nov 17 '16 at 11:12

The good thing about nagios style monitoring systems (I prefer Icinga2, personally), is that it is very simple to write your own plugins. The state is given be the exit code:

0: OK

Output is simply output on the shell. So a simple echo for bash would do.

To get perfdata you append a pipe and a space-seperated list of key value pairs to your output like so:

This is an example output | value1=1 value2=2

For checking SNMP you can use a shell command like snmpwalk. If you don't want to write this from scratch I happen to have written a couple SNMP based checks:


| improve this answer | |

If you want to monitor something with nagios using SNMP, you should start by looking at Nagios Exchange website. It's a nice place to find some command usable in nagios or nagios inspired products (Centreon, Icinga, Shinken)

Look for you specific HP product model in the database, you should find some help on this website.

Good luck!

Arnaud Léonard

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.