Check_SNMP 1 OK - 0 CRITICAL

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
Boune
Posts: 12
Joined: Wed Feb 14, 2018 4:15 am

Check_SNMP 1 OK - 0 CRITICAL

Post by Boune »

Hi,

I'm trying to use the check_snmp command but with 2 OIDs.

the first one is to get the VPN Name.
the seconde is to get the VPN State.

Here my command :

Code: Select all

 ./check_snmp -H x.x.x.x -C public -P 2c -o SNMPv2-SMI::enterprises.890.1.6.22.2.4.1.2.1 -l "VPN Name:" -o SNMPv2-SMI::enterprises.890.1.6.22.2.4.1.6.1  -l "STATE:" -r "1"

Code: Select all

SNMP CRITICAL - VPN Name: *"VPN-XXX"* STATE: 1 | ETAT:=1
i try to use the -r option but with 2 oids i cant make it work.

any suggestion ? the 1 state = OK and the 0 state = CRITICAL.

thanks for help
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Check_SNMP 1 OK - 0 CRITICAL

Post by scottwilkerson »

Most people would put this in a wrapper plugin.

You would create a plugin that gets the information you want and returns the info you need.

Currently you are trying to manipulate multiple calls into one result and that's not possible in the plugin how it is
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
Boune
Posts: 12
Joined: Wed Feb 14, 2018 4:15 am

Re: Check_SNMP 1 OK - 0 CRITICAL

Post by Boune »

hi,

what do you mean with "wrapper pluggins"?
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Check_SNMP 1 OK - 0 CRITICAL

Post by scottwilkerson »

Boune wrote:hi,

what do you mean with "wrapper pluggins"?
I mean you can create a plugin withing any programming language that calls other plugins such as check_snmp and manipulated to output to be what you are looking for.

Here are the plugin development guidelines
https://nagios-plugins.org/doc/guidelines.html
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
Locked