Page 1 of 2
Error when checking linux disks
Posted: Mon Sep 21, 2020 1:51 pm
by paulol
Sometimes Nagios XI returns this error in some disks checks "is not accessible: No such file or directory". But it's not all the time.
[root@VIBORG ~]# /usr/local/nagios/libexec/check_disk -V
check_disk v2.2.1 (nagios-plugins 2.2.1)
[root@VIBORG ~]# /usr/local/nagios/libexec/check_nrpe -H 127.0.0.1 -2
NRPE v3.2.1
Re: Error when checking linux disks
Posted: Mon Sep 21, 2020 1:53 pm
by paulol
some more files.
Re: Error when checking linux disks
Posted: Tue Sep 22, 2020 3:38 pm
by benjaminsmith
Hi Paulol,
It looks there are some extra characters being added into the path for the check command and as a result in cannot find the path. It could be related to the arguments being passed by XI or the database encoding. That said, it's odd that this is not happening all of the time.
Can you repeat this error running the command directly from the command line?
Nagios XI - How To Test Check Commands From The Command-line
Also, please send me your system profile and I'll review the log files for any errors.
Benjamin
To send us your system profile.
Login to the Nagios XI GUI using a web browser.
Click the "Admin" > "System Profile" Menu
Click the "Download Profile" button
Save the profile.zip file and share in a private message or upload it to the post/ticket, and then reply to this post to bring it up in the queue.
Re: Error when checking linux disks
Posted: Wed Sep 23, 2020 6:31 am
by paulol
[root@TREVOUX install]# /usr/local/nagios/libexec/check_nrpe -2 -H 10.1.64.70 -t 50 -u -c check_disk -a '-w 10% -c 5% -W 5% -K 2% -p /'
DISK OK - free space: / 8111 MB (88.02% inode=94%);| /=1103MB;8742;9228;0;9714
Moderator's Note: The profile has been shared with the support team but has been removed from the public forum.
Re: Error when checking linux disks
Posted: Wed Sep 23, 2020 5:36 pm
by benjaminsmith
Hi
@paulol,
Since you have offloaded the database, the log file was not included in the system profile. Can your retrieve that file from the serer and post it to the thread.
That said, the configurations look correct and the output from the test command is ok, are you able to repeat the error on your system? Please let me know.
Thanks,
Benjamin
Re: Error when checking linux disks
Posted: Fri Oct 02, 2020 2:48 pm
by paulol
it's not possible to reproduce that error in command line, because is not all the time that it happen.
Moderator's Note: The profile has been shared with the support team but has been removed from the public forum.
Re: Error when checking linux disks
Posted: Mon Oct 05, 2020 2:06 pm
by benjaminsmith
Hi,
Thank you for the database log. I do see a number of aborted connections in the database log.
Code: Select all
2020-10-02T04:11:47.114453-03:00 17411551 [Note] Aborted connection 17411551 to db: 'nagios' user: 'nagios' host: 'x.x.x.13' (Got timeout reading communication packets)
2020-10-02T16:41:04.049893-03:00 17411552 [Note] Aborted connection 17411552 to db: 'nagios' user: 'nagios' host: 'x.x.x.13' (Got an error reading communication packets
This can be related a wide variety of issues such as network hardware, network connections or timeouts. Please try setting the following value in my.cnf to increase the max_allowed_packet option to the following:
Next, If you're not using $ARG3$ thru $ARG7$, I would just remove them from the command in the CCM to rule out any possibility that additional data is being passed by those macros.
check_nrpe.png
Additionally, hard coding the check options in the nrpe.cfg on the remote host (e.g.viborg) would help determine if this is a Nagios XI issue or NRPE.
For example:
Code: Select all
command[check_disk_root]=/usr/local/nagios/libexec/check_disk -a -w 10% -c 5% -W 5% -K 2% -p /
Let me know if you notice any improvement.
--Benjamin
Re: Error when checking linux disks
Posted: Fri Oct 09, 2020 12:17 pm
by paulol
You are right. It's something in nrpe client installed on my server like VIBORG(server). I did what you suggested putting a second command with no arguments in NRPE Client.
Re: Error when checking linux disks
Posted: Mon Oct 12, 2020 2:16 pm
by benjaminsmith
Hi
@paulol,
Thanks for testing that out. Please try to remove the
-2, for version 2 packets, in the check command with this issue and test again.
Additionally, let's enable debug logging on nrpe. In the nrpe.cfg file, change the following option.
Code: Select all
vi /usr/local/nagios/etc/nrpe.cfg
## CHANGE
#DEBUGGING OPTION BELOW
# This option determines whether or not debugging messages are logged to the
# syslog facility.
# Values: 0=debugging off, 1=debugging on
debug=1
This is going to write additional messages to syslog. After making the change, restart NRPE then check syslog (var/log/messages) for errors and post them to the thread.
Regards,
Benjamin
Re: Error when checking linux disks
Posted: Mon Oct 19, 2020 1:13 pm
by paulol
Hi benjaminsmith,
I've removed the -2 in the check command, but notting happened. But when i removed all the arguments in the check command the services works perfetly.