snmp check complexity

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
fplusoli
Posts: 2
Joined: Mon Feb 08, 2021 10:43 am

snmp check complexity

Post by fplusoli »

Hello :)

First, please excuse me for my English if I wrute mistakes.

I use a Nagios based supervision tool : Eyes of Network 5.3

I recently have to monitor new ip device with snmp.
I have the oid list of this device and a mib file

For some OIDs, when I do a snmpwalk as a command, I can get a result, but I don't know how to use it...
snmpwalk -v 2c -c mycommunity $HOSTADDRESS$ .myoid

The result, depending the status of the device can be :
0 : off
1 : audioerror
2 : configerror
3 : error
4 : connecting
5 : running

I have 2 problems :
1) which way could I write my command above, with -w and -c in order to get this result :
warning : 4
critical : 0,1,2,3
ok : 5

Then what I would like is : to create a list of different output values which will be considered as critical state

2)in my dashboard, I can see the checks of my devices (green : ok | orange : warning | red : critical)
but when I click, the value givenfrom the snmp check is 0,1,2,3,4 or 5
It is normal as it is the response from the device

But I'd like to get a human understandable response.
Then which way could I translate the result from the check 0,1,2,3,4 or5 in text off,audioerror, aso... ?

Many thanks for your future help :)
Have a nice day
Olivier
gormank
Posts: 1114
Joined: Tue Dec 02, 2014 12:00 pm

Re: snmp check complexity

Post by gormank »

If you want to use snmpwalk, then you most likely need to write a custom plugin.
You may want to try the standard check_snmp plugin. https://nagios-plugins.org/doc/man/check_snmp.html
fplusoli
Posts: 2
Joined: Mon Feb 08, 2021 10:43 am

Re: snmp check complexity

Post by fplusoli »

Thank you Gormank :)
I'll have a look on it again, but, I don't really see how to configure it to get what I need.

It's about 2 weeks I swimm in nagio/Eyes of Network world, and I don't see the edge of the river :cry: :D

Many thanks
Locked