Good morning everyone,
I have nagios installed and the disk alert does not appear in yellow (warning) and I do not know the reason.
In the server checked I have in the file nrpe
command [check_disk] = / usr / lib64 / nagios / plugins / check_disk / -w 40% -c 20%
In the nagios server I have the verification:
define service {
use generic-service
host_name XXXXX.XX
service_description Free space on / dev / sda1
check_command check_nrpe! check_disk -w 40% -c 20%
}
In nagios it appears as:
DISK OK - free space: / 39439 MiB (20.40% inode = 98%):
And a warning should be displayed.
What is wrong with me?
Disk alert is not working properly
-
- Posts: 2
- Joined: Fri May 28, 2021 1:03 am
Re: Disk alert is not working properly
The problem persist
Re: Disk alert is not working properly
Your format looks correct; Here are some sample disk checks, a few of which use the official nagios-plugins check_disk plugin:
https://support.nagios.com/kb/article/d ... percentage
Your NRPE command definition is also not accepting arguments -- you've hard-coded 40% and 20% here:
When, based on your Nagios service definition (I'm assuming some things about your check_nrpe command definition):
The arguments you're passing to the check_disk command, as it exists in your NRPE configuration, will be discarded. NRPE accepts args for commands invoked via check_nrpe like so:
See this knowledge base article for some examples:
https://support.nagios.com/kb/article/n ... s-759.html
https://support.nagios.com/kb/article/d ... percentage
This looks malformed. There should be no / after the check_disk binary.luiswolfcrm wrote: In the server checked I have in the file nrpe
command [check_disk] = / usr / lib64 / nagios / plugins / check_disk / -w 40% -c 20%
Your NRPE command definition is also not accepting arguments -- you've hard-coded 40% and 20% here:
Code: Select all
command [check_disk] = / usr / lib64 / nagios / plugins / check_disk / -w 40% -c 20%
Code: Select all
define service {
use generic-service
host_name XXXXX.XX
service_description Free space on / dev / sda1
check_command check_nrpe! check_disk -w 40% -c 20%
}
Code: Select all
command[check_users]=/usr/local/nagios/libexec/check_users -w $ARG1$ -c $ARG2$
https://support.nagios.com/kb/article/n ... s-759.html
Former Nagios employee
https://www.mcapra.com/
https://www.mcapra.com/