Page 1 of 1

alternating output of nrpe plugin corrupts rrd diagram

Posted: Thu May 19, 2016 3:09 pm
by s-tobe
Hi There,
we are a happy user of the Nagios plugin check_linux_stats.pl
but we have a question about the inconsistent behaviour of the output in linux:

when we do a disk check twice using the following command via NRPE:
/usr/lib/nagios/plugins/check_linux_stats.pl -D -w 30 -c 10 -u % -p "/","/data"

we got the following output variants:

DISK OK used : /data 88.02% free / 81.60% free | /data=7315468KB /=2520404KB
and subsequent attempt returns:
DISK OK used : / 81.60% free /data 88.02% free | /=2520404KB /data=7316188KB

you can see that the output order differs (the plugin swaps label=value

This is picked up by NagiosXI 5.2.7 by creating two diagrams while constantly swapping the values referring to the disk space of two partitions ( rrd based)
We expect two diagrams with an (almost) constant line per diagram (representing a partition's space)
but we get two diagrams alternating values

We think the reason is that the plugin swaps the output. Why is Nagios rrd not taking the label into account while creating the picture?
thanks
Stefan



Question: why does the plugin output in random order? Can we force output consistency?
regards
Stefan

Re: alternating output of nrpe plugin corrupts rrd diagram

Posted: Thu May 19, 2016 3:28 pm
by tmcdonald
I'm not able to replicate this:

Code: Select all

[root@localhost libexec]# ./check_linux_stats.pl -D -w 30 -c 10 -u % -p "/","/boot"
DISK OK used :  /boot 73.72% free / 54.16% free | /boot=102531KB /=3111412KB
[root@localhost libexec]# ./check_linux_stats.pl -D -w 30 -c 10 -u % -p "/","/boot"
DISK OK used :  /boot 73.72% free / 54.16% free | /boot=102531KB /=3111444KB
[root@localhost libexec]# ./check_linux_stats.pl -D -w 30 -c 10 -u % -p "/","/boot"
DISK OK used :  /boot 73.72% free / 54.16% free | /boot=102531KB /=3111456KB
[root@localhost libexec]# ./check_linux_stats.pl -D -w 30 -c 10 -u % -p "/","/boot"
DISK OK used :  /boot 73.72% free / 54.16% free | /boot=102531KB /=3111456KB
[root@localhost libexec]# ./check_linux_stats.pl -D -w 30 -c 10 -u % -p "/","/boot"
DISK OK used :  /boot 73.72% free / 54.16% free | /boot=102531KB /=3111456KB
[root@localhost libexec]# ./check_linux_stats.pl -D -w 30 -c 10 -u % -p "/","/boot"
DISK OK used :  /boot 73.72% free / 54.16% free | /boot=102531KB /=3111476KB
[root@localhost libexec]# ./check_linux_stats.pl -D -w 30 -c 10 -u % -p "/","/boot"
DISK OK used :  /boot 73.72% free / 54.16% free | /boot=102531KB /=3111492KB
[root@localhost libexec]# ./check_linux_stats.pl -D -w 30 -c 10 -u % -p "/","/boot"
DISK OK used :  /boot 73.72% free / 54.16% free | /boot=102531KB /=3111500KB
[root@localhost libexec]# ./check_linux_stats.pl -D -w 30 -c 10 -u % -p "/","/boot"
DISK OK used :  /boot 73.72% free / 54.16% free | /boot=102531KB /=3111500KB
[root@localhost libexec]# ./check_linux_stats.pl -D -w 30 -c 10 -u % -p "/","/boot"
DISK OK used :  /boot 73.72% free / 54.16% free | /boot=102531KB /=3111516KB
[root@localhost libexec]# ./check_linux_stats.pl -D -w 30 -c 10 -u % -p "/","/boot"
DISK OK used :  /boot 73.72% free / 54.16% free | /boot=102531KB /=3111528KB
[root@localhost libexec]# ./check_linux_stats.pl -D -w 30 -c 10 -u % -p "/","/boot"
DISK OK used :  /boot 73.72% free / 54.16% free | /boot=102531KB /=3111548KB
For reference, I am also on XI 5.2.7 using version 1.5 of the plugin. Now granted I am doing this locally instead of over NRPE, but that really should not make a difference. Just for the sake of testing, can you run the command manually a few times locally instead of over NRPE, and see if this persists?

Also please tell us a bit more about the remote machine - OS and version, perl version, etc. It's possible that the perl module responsible for retrieving the disk data is not consistent in its output.