Page 1 of 3

check_snmp return value with performance graph

Posted: Wed Jan 16, 2019 1:13 pm
by bongbi
Hi,

I have check_snmp inplemented as below with correct data return. But its output gives me a additional data then performance graph read those and display. Therefore it makes performance graph unusable. Any suggestion?

Code: Select all

[root@nagiosxi libexec]# ./check_snmp -v -D "|" -o .1.3.6.1.4.1.41263.506.0 -P 3 --seclevel=authPriv --secn
ame=nagios --authproto=sha --authpasswd='5p1cpUKq' --privpasswd='5p1cpUKq' --privproto=aes -H nutanix-traf-
ahv.internal
/usr/bin/snmpget -Le -t 10 -r 5 -m '' -v 3 [context] [authpriv] nutanix-traf-ahv.internal:161 .1.3.6.1.4.1.41263.506.0
iso.3.6.1.4.1.41263.506.0 = Counter64: 209
SNMP OK - 209 | iso.3.6.1.4.1.41263.506.0=209c
[root@nagiosxi libexec]# ./check_snmp --version
check_snmp v2.2.1 (nagios-plugins 2.2.1)

Re: check_snmp return value with performance graph

Posted: Wed Jan 16, 2019 2:31 pm
by scottwilkerson
remove the -v which is giving verbose debugging output

Re: check_snmp return value with performance graph

Posted: Thu Jan 17, 2019 9:35 am
by bongbi
Thanks. Removed -v switch but still a same issue. Performance graph still takes value from after vertical bar(pipe) and displays it.

Re: check_snmp return value with performance graph

Posted: Thu Jan 17, 2019 10:09 am
by scottwilkerson
This actually looks correct, it is supposed to graph the value after the |

For example in your command example above it would graph 209

Code: Select all

| iso.3.6.1.4.1.41263.506.0=209c
My guess is this value jumps violently

Re: check_snmp return value with performance graph

Posted: Thu Jan 17, 2019 1:28 pm
by bongbi
Yes I agree that output looks correct. However that way performance graph interpret output from value is not correct.
Here I attached another example. As you can see, there is output from check_snmp but performance graph only displays 0.

Code: Select all

[root@nagiosxi libexec]# ./check_snmp -D "|" -o .1.3.6.1.4.1.41263.504.0 -P 3 --seclevel=authPriv --secname=nagios --authproto=sha --authpasswd='5p1cpUKq' --privpasswd='5p1cpUKq' --privproto=aes -H nutanix-traf-ahv.internal
SNMP OK - 74722556377986 | iso.3.6.1.4.1.41263.504.0=74722556377986c

Re: check_snmp return value with performance graph

Posted: Thu Jan 17, 2019 1:33 pm
by scottwilkerson
Can you show the Advanced Tab for this service?

Re: check_snmp return value with performance graph

Posted: Thu Jan 17, 2019 2:04 pm
by bongbi
Here you go.

Re: check_snmp return value with performance graph

Posted: Thu Jan 17, 2019 4:44 pm
by scottwilkerson
Can you share the configuration for this service from the CCM?

Something is telling me that there is something Nagios doesn't like with the label being used for the performance data

Re: check_snmp return value with performance graph

Posted: Fri Jan 18, 2019 11:32 am
by bongbi
Sure. Could you tell me how I pull the configuration out from CCM?

Re: check_snmp return value with performance graph

Posted: Fri Jan 18, 2019 11:51 am
by scottwilkerson
In the CCM, navigate to the service and click "View Config" on the right