NRPE Check_disk is not showing performace data (values)

Hi,

I am facing one issue with Check_disk nrpe plugin, Icinga able to fetch free space for particular partition, but no output (zero) shows in performance data “Values” and due to this no graph generated.

===============================================================
Manually executing check_disk for /home partition
[root@server1 /opt] # /usr/lib64/nagios/plugins/check_disk -w 20% -c 10% -p /home
DISK OK - free space: /home 10196 MiB (99.67% inode=100%);| /home=33MiB;8184;9207;0;10230

===============================================================
Plugin output in Icinga

dfree_units 0 0

disk_result is 0DISK OK - free space: /home 30367 MiB (98.89% inode=100%)

===============================================================
NRPE and Nagios plugin version details

[root@server1~]# rpm -qa |grep nrpe
nagios-plugins-nrpe-3.2.1-8.el7.x86_64
nrpe-3.2.1-8.el7.x86_64
[root@server1~]# rpm -qa |grep nagios|grep disk
nagios-plugins-disk-2.3.1-1.el7.x86_64

===============================================================

Please help us to fix this issue.

Regards,
AviKarry

Hello Avi

When you send the nrpe check from the master cli, what is the output you get?
Can you also share the configuration of the service definition?

Regards

Hi,

Please find the requested details.

- From Icinga Server
[root@ICINGA plugins]# ./check_nrpe -H 10.13.33.230 -c check_home
DISK OK - free space: /home 10196 MiB (99.67% inode=100%);| /home=33MiB;8184;9207;0;10230


Disk check Service for /home partition

apply Service “Disk /home” {

check_command = “nrpe”
vars.nrpe_command = “check_home”
check_interval = 1m
retry_interval = 1m

    vars.notification["mail"] = {
/* The UserGroup `icingaadmins` is defined in `users.conf`. */
    groups = [  "icingaadmins`" ]

}
assign where host.vars.Check_Partition_home
}


We are observing same behaviour for all partitions monitoring through ‘check_disk’

Regards,
AviKarry

I have not encountered this before, can you confirm that perfdata feature is enabled on the Icinga master ?

What can you see about these checks in the debug log ?

You are testing as root, which may have different behaviour than the Icinga daemon’s user.

Also, please extract the executed command line from Icinga itself.

Cheers,
Michael

Yes, Perfdata is already enabled.

[root@ICINGA ~]# icinga2 feature list
Disabled features: compatlog debuglog elasticsearch gelf influxdb opentsdb statusdata syslog
Enabled features: api checker command graphite ido-mysql livestatus mainlog notification perfdata

In logs only found below traces for perfdata

[2020-02-13 09:23:53 +0530] warning/GraphiteWriter: Ignoring invalid perfdata value: /home=227MiB;16376;18423;0;20470
Context:

  •    (0) Processing check result for 'INMB1-REN-UPI-DB1T!Disk /home'*
    

[2020-02-13 09:23:53 +0530] warning/GraphiteWriter: Ignoring invalid perfdata value: /usr=2263MiB;12280;13815;0;15350
Context:

  •    (0) Processing check result for 'inmb1rhnsatllite.localinfra!Disk /usr'*

Plugin command output from Icinga user

[root@ICINGA ~]# sudo -u icinga /usr/lib64/nagios/plugins/check_nrpe -H 10.13.33.230 -c check_home
DISK OK - free space: /home 10196 MiB (99.67% inode=100%);| /home=33MiB;8184;9207;0;10230

One more thing I want to highlight, We are facing this issue only with latest NRPE ‘3.2.x’ version, but not with ‘nrpe-2.15-x’ version

[root@inmb1rhnsatllite ~]# rpm -qa |grep nrpe
nagios-plugins-nrpe-3.2.1-8.el7.x86_64
nrpe-3.2.1-8.el7.x86_64

[root@ICINGA ~]# sudo -u icinga /usr/lib64/nagios/plugins/check_nrpe -H 10.13.33.230 -c check_home
DISK OK - free space: /home 10196 MiB (99.67% inode=100%);| /home=33MiB;8184;9207;0;10230


nrpe-2.15-7.el7.x86_64.rpm

Plugin Output for NRPE -2.15.x version

DISK OK - free space: /var/lib/mysql 309908 MB (42% inode=99%);

[root@ICINGA ~]# sudo -u icinga /usr/lib64/nagios/plugins/check_nrpe -H 10.13.13.12 -c check_home
DISK OK - free space: /home 29541 MB (63% inode=99%);| /home=16764MB;37044;41674;0;46305

Hi,

you are querying two different host IP addresses. Is that intended? :wink:

Cheers,
Michael

Hi,

10.13.33.230 - This serrver has NRPE-3.2 version installed. ( Facing issue for this NRPE version)

10.13.13.12 - This server has NRPE-2.15 version installed. ( Working properly)

Regards,
Avikarry

Have you tried using the -2 switch of the check_nrpe plugin and see if that changes anything?
On the command line the check shows the performance data, but not in Icinga Web 2, if I understand you correctly?

As you are using Graphite for displaying the graphs the perfdata feature is not needed.

No change in output with -2 switch

[root@ICINGA plugins]# sudo -u icinga /usr/lib64/nagios/plugins/check_nrpe -H 10.13.33.230 -c check_home
DISK OK - free space: /home 10196 MiB (99.67% inode=100%);| /home=33MiB;8184;9207;0;10230
[root@ICINGA plugins]# sudo -u icinga /usr/lib64/nagios/plugins/check_nrpe -2 -H 10.13.33.230 -c check_home
DISK OK - free space: /home 10196 MiB (99.67% inode=100%);| /home=33MiB;8184;9207;0;10230

Yes, You are right, On the command line the check shows the performance data, but not in Icinga Web 2

  • Pease find the attached screenshot for your reference.

Yes, we are using Graphite, So we have now disabled pefdata feature in icinga.

Is there any issue/bug with NRPE-3.2 plugin, as all the servers with NRPE-2.15 showing properly peformance Graphs ?No Graph Data

I see the problem now:

MiB is not a vaild UOM for performance data

What is your NRPE command line behind check_home? Did you explicitly say it should output MiB?

1 Like

I am facing this issue for all the Linux partitions.

Below are NRPE commands from client nrpe.cfg file
command[check_boot]=/usr/lib64/nagios/plugins/check_disk -w 20% -c 10% -p /boot
command[check_root]=/usr/lib64/nagios/plugins/check_disk -w 20% -c 10% -p /
command[check_usr]=/usr/lib64/nagios/plugins/check_disk -w 20% -c 10% -p /usr
command[check_var]=/usr/lib64/nagios/plugins/check_disk -w 20% -c 10% -p /var
command[check_opt]=/usr/lib64/nagios/plugins/check_disk -w 20% -c 10% -p /opt
command[check_home]=/usr/lib64/nagios/plugins/check_disk -w 20% -c 10% -p /home

Please let us know any modification needed in above commands.

Ah, it is the check_disk plugin of the nagios-plugins project used here.

Here is a bug concerning your problem:

Add the-m switch to your command line, and all should be fine.

I’m not sure why they so often fiddle with the perf data output… (happend to check_icmp recently as well) and then break compatability…

1 Like

Thank you so much

Issue resolved with passing “-m” flag with NRPE ‘check_disk’ command on clients