[Pkg-nagios-devel] Bug#1128344: /usr/lib/nagios/plugins/check_nfsmounts returns performance data in wrong format

Alexander Bugl alexander.bugl at mpimet.mpg.de
Wed Feb 18 15:27:41 GMT 2026


Package: monitoring-plugins-contrib
Version: 48.20250420
Severity: normal

If I invoke /usr/lib/nagios/plugins/check_nfsmounts it reports 
performance data like this:


# /usr/lib/nagios/plugins/check_nfsmounts
NFS OK: 1 mount points avg of 0.00210 secs, max 0.00232 
secs.|maxtime=0.0023170;avgtime=0.0021039;mountpoints=1

As one can see the performance data is separated by semicolon ;, which 
is according to the Nagios plugin Guidelines 
<https://nagios-plugins.org/doc/guidelines.html> wrong:

 > Performance Data
 > [...]
 > 1. Space separated list of label/value pairs

So the data should be returned like this:
NFS OK: 1 mount points avg of 0.00182 secs, max 0.00182 
secs.|maxtime=0.0018191 avgtime=0.0018191 mountpoints=1

In our case the wrong format had two (negative) consequences:
1. in Icinga no performance graphs were created
2. Icinga created a directory /var/lib/graphite/whisper/_tagged and 
filled it with 200+GB of data (in 1.5 years for only 4 machines we used 
the check with)

A patch seems trivial: replace the ; with "space", which we did:
$ diff ~/check_nfsmounts.wrong ~/check_nfsmounts
166c166
< my 
$perfdata=sprintf("maxtime=%9.7f;avgtime=%9.7f;mountpoints=$x",$maxage,$avgage);
---
 > my $perfdata=sprintf("maxtime=%9.7f avgtime=%9.7f 
mountpoints=$x",$maxage,$avgage);

After that, both problems were solved.

Hope that you can apply this fix, best regards, Alex

-- 
Alexander Bugl



More information about the Pkg-nagios-devel mailing list