avikarry
(Avi)
February 11, 2020, 11:56am
1
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
aflatto
(Assaf Flatto)
February 11, 2020, 1:09pm
2
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
avikarry
(Avi)
February 12, 2020, 4:01am
3
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
aflatto
(Assaf Flatto)
February 12, 2020, 8:42am
4
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 ?
dnsmichi
(Michael Friedrich)
February 12, 2020, 8:47am
5
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
avikarry
(Avi)
February 13, 2020, 4:02am
6
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:
[2020-02-13 09:23:53 +0530] warning/GraphiteWriter: Ignoring invalid perfdata value: /usr=2263MiB;12280;13815;0;15350
Context:
avikarry
(Avi)
February 13, 2020, 4:07am
7
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
avikarry
(Avi)
February 13, 2020, 4:43am
8
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
dnsmichi
(Michael Friedrich)
February 13, 2020, 8:55am
9
Hi,
you are querying two different host IP addresses. Is that intended?
avikarry:
10.13.33.230
10.13.13.12
Cheers,
Michael
avikarry
(Avi)
February 14, 2020, 3:34am
10
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
log1c
February 14, 2020, 7:23am
11
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.
avikarry
(Avi)
February 15, 2020, 2:57pm
12
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 ?
log1c
February 17, 2020, 6:59am
13
I see the problem now:
Mi B is not a vaild UOM for performance data
What is your NRPE command line behind check_home
? Did you explicitly say it should output Mi B?
1 Like
avikarry
(Avi)
February 17, 2020, 8:38am
14
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.
log1c
February 17, 2020, 8:55am
15
Ah, it is the check_disk plugin of the nagios-plugins project used here.
Here is a bug concerning your problem:
opened 11:06AM - 03 Feb 20 UTC
I think this is maybe some backward compatibility issue, but the documentation doesn't mention this, and this is confusing:
help:
-m, --megabytes
Same as...
Bug
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
avikarry
(Avi)
February 17, 2020, 9:32am
16
Thank you so much
Issue resolved with passing “-m” flag with NRPE ‘check_disk’ command on clients