check_snmp parameters

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
scagno83
Posts: 5
Joined: Thu Jan 30, 2014 9:49 am

check_snmp parameters

Post by scagno83 »

Hi All,

I am using Nagios Core 3.2.3.
I have a device that reply to snmpget with the following string

Code: Select all

 snmpget -v1 -c public $HOSTADDRESS $OID
device-MIB::StreamInfo = STRING: "tuna=service|tuid=3|tude=11.595 GHz|postfb=0.0000|ss=-66.0|snr=12.5"
So the check_snmp plugin reply with the string

Code: Select all

check_snmp!-P 1 -C public -H $HOSTADDRESS$ -o $OID

"tuna=service|tuid=3|tude=11.595 GHz|postfb=0.0000|ss=-66.0|snr=12.5"
It is possible to get only snr parameter value configuring a check_snmp correct parameter or the only solution is to write a script to get needed parameter?


Thanks for any help provided.
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: check_snmp parameters

Post by sreinhardt »

Considering it is returned as a single string, I think the only option would be to write a wrapper script and sed out what you do and don't want. It really shouldn't be too hard with that piece of text.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
Locked