Error when checking linux disks
Error when checking linux disks
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
[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
You do not have the required permissions to view the files attached to this post.
Re: Error when checking linux disks
some more files.
You do not have the required permissions to view the files attached to this post.
-
benjaminsmith
- Posts: 5324
- Joined: Wed Aug 22, 2018 4:39 pm
- Location: saint paul
Re: Error when checking linux disks
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.
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.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Error when checking linux disks
[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.
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.
-
benjaminsmith
- Posts: 5324
- Joined: Wed Aug 22, 2018 4:39 pm
- Location: saint paul
Re: Error when checking linux disks
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
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
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Error when checking linux disks
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.
Moderator's Note: The profile has been shared with the support team but has been removed from the public forum.
-
benjaminsmith
- Posts: 5324
- Joined: Wed Aug 22, 2018 4:39 pm
- Location: saint paul
Re: Error when checking linux disks
Hi,
Thank you for the database log. I do see a number of aborted connections in the database log.
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.
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:
Let me know if you notice any improvement.
--Benjamin
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
Code: Select all
max_allowed_packet=512M
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 /
--Benjamin
You do not have the required permissions to view the files attached to this post.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Error when checking linux disks
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.
You do not have the required permissions to view the files attached to this post.
-
benjaminsmith
- Posts: 5324
- Joined: Wed Aug 22, 2018 4:39 pm
- Location: saint paul
Re: Error when checking linux disks
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.
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
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
Regards,
Benjamin
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Error when checking linux disks
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.
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.
You do not have the required permissions to view the files attached to this post.