check_snmp plugin perdata output error

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
Seb06
Posts: 4
Joined: Sun Jan 17, 2016 5:57 pm

check_snmp plugin perdata output error

Post by Seb06 »

Hi to all,

I have strange issue when i'm using check_snmp plugin with -u option.

Nagios Core 4.1.1
Nagios plugin 2.1.1
Ubuntu 14

Command : check_snmp!-C public -o BSS-RCP-MIB::storage-load.0 -u % -c 1:100
Nagios service :
Status Information: SNMP OK - 12 %
Performance Data: BSS-RCP-MIB::storage-load.0=12;;1:100%;;100;
No RRD file created, error in perfdata format % is after the critical threshold and not after the value.

Command : check_snmp!-C public -o BSS-RCP-MIB::storage-load.0 -c 1:100
Nagios service :
Status Information: SNMP OK - 1
Performance Data: BSS-RCP-MIB::storage-load.0=1;;1:100;;100;
RRD file created, correct perfdata output

Does someone already seen this? or better does someone have a solution.

Best regards

Sebastien
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: check_snmp plugin perdata output error

Post by rkennedy »

Can you run the check_snmp command over the CLI, and post the full command and output for us to look at?

As well, what happens if you place the % in quotes?

Code: Select all

check_snmp!-C public -o BSS-RCP-MIB::storage-load.0 -u "%" -c 1:100
Former Nagios Employee
Seb06
Posts: 4
Joined: Sun Jan 17, 2016 5:57 pm

Re: check_snmp plugin perdata output error

Post by Seb06 »

Thank you for your answer rkennedy

I'm not at my office this week, I will test this weekend.

Regards

Seb
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: check_snmp plugin perdata output error

Post by tmcdonald »

We will keep this open until you return. Please post back only once you have additional information for us.
Former Nagios employee
Seb06
Posts: 4
Joined: Sun Jan 17, 2016 5:57 pm

Re: check_snmp plugin perdata output error

Post by Seb06 »

Hi rkennedy,

I just do the test and unfortunately I have the same result

Code: Select all

check_snmp!-C public -o BSS-RCP-MIB::cpu-load-idle.1 -u "%" -w 8:100 -c 2:100
Perfdata output with error with "%" at the wrong place
BSS-RCP-MIB::cpu-load-idle.1=87;8:100;2:100%;100;100;

It looks like a bug

Seb
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: check_snmp plugin perdata output error

Post by Box293 »

Can you execute these commands and post back the output:

Code: Select all

./check_snmp -H xxx.xxx.xxx.xxx -C public -o BSS-RCP-MIB::storage-load.0 -u % -v

Code: Select all

./check_snmp -H xxx.xxx.xxx.xxx -C public -o BSS-RCP-MIB::storage-load.0 -u % -c 1:100 -v

Code: Select all

/usr/bin/snmpget -Le -t 1 -r 5 -m ALL -v 1 -c public xxx.xxx.xxx.xxx:161 BSS-RCP-MIB::storage-load.0 -D all
Replace xxx.xxx.xxx.xxx with the correct IP.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Seb06
Posts: 4
Joined: Sun Jan 17, 2016 5:57 pm

Re: check_snmp plugin perdata output error

Post by Seb06 »

Code: Select all

./check_snmp -H xxx.xxx.xxx.xxx -C public -o BSS-RCP-MIB::storage-load.0 -u % -v
Answer :

Code: Select all

/usr/bin/snmpget -Le -t 3 -r 5 -m ALL -v 1 [authpriv] 192.168.2.100:161 BSS-RCP-MIB::storage-load.0
BSS-RCP-MIB::storage-load.0 = INTEGER: 1
SNMP OK - 1 % | BSS-RCP-MIB::storage-load.0=1%

Code: Select all

./check_snmp -H xxx.xxx.xxx.xxx -C public -o BSS-RCP-MIB::storage-load.0 -u % -c 1:100 -v
Answer :

Code: Select all

/usr/bin/snmpget -Le -t 3 -r 5 -m ALL -v 1 [authpriv] 192.168.2.100:161 BSS-RCP-MIB::storage-load.0
BSS-RCP-MIB::storage-load.0 = INTEGER: 0
SNMP CRITICAL - *0* % | BSS-RCP-MIB::storage-load.0=0;;1:100%;;100;

Code: Select all

/usr/bin/snmpget -Le -t 1 -r 5 -m ALL -v 1 -c public xxx.xxx.xxx.xxx:161 BSS-RCP-MIB::storage-load.0 -D all
Answer : see attachement
Attachments
putty.log
(758.53 KiB) Downloaded 385 times
User avatar
tgriep
Madmin
Posts: 9177
Joined: Thu Oct 30, 2014 9:02 am

Re: check_snmp plugin perdata output error

Post by tgriep »

I verified that using the -u "units" option for check_snmp version 2.1.1 outputs the unit in the wrong location in the performance data.
Running the same check command using version 2.0.3 puts the unit in the correct location.
I will fill on a bug report for this.
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: check_snmp plugin perdata output error

Post by Box293 »

Nice troubleshooting @tgriep.

@Seb06 as a temporary workaround you could compile plugins 2.0.3 and just copy the check_snmp binary over the 2.1.1 version to work around your issue.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Locked