Check_SNMP 1 OK - 0 CRITICAL

An open discussion forum for obtaining help with Nagios Core. Nagios Core users of all experience levels are welcome here. Subforum have been created for the discussion of Nagios Core and Nagios Plugin development.

NOTE: The SourceForge.net mailing lists have been deprecated in favor of this forum in order to expedite support and provide additional features not available on the old mailing list.

Check_SNMP 1 OK - 0 CRITICAL

Postby Boune » Tue Mar 06, 2018 5:30 am

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

Re: Check_SNMP 1 OK - 0 CRITICAL

Postby scottwilkerson » Tue Mar 06, 2018 4:31 pm

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
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
scottwilkerson
CTO
 
Posts: 9691
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises

Re: Check_SNMP 1 OK - 0 CRITICAL

Postby Boune » Tue Mar 13, 2018 10:56 am

hi,

what do you mean with "wrapper pluggins"?
Boune
 
Posts: 12
Joined: Wed Feb 14, 2018 4:15 am

Re: Check_SNMP 1 OK - 0 CRITICAL

Postby scottwilkerson » Tue Mar 13, 2018 11:14 am

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
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
scottwilkerson
CTO
 
Posts: 9691
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises


Return to Nagios Core

Who is online

Users browsing this forum: No registered users and 17 guests