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.
Boune
Posts: 12 Joined: Wed Feb 14, 2018 4:15 am
Post
by 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
scottwilkerson
DevOps Engineer
Posts: 19396 Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:
Post
by 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
Boune
Posts: 12 Joined: Wed Feb 14, 2018 4:15 am
Post
by Boune » Tue Mar 13, 2018 10:56 am
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:
Post
by 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