How to config plugin check_newest_file_age
Re: How to config plugin check_newest_file_age
Okay, something else:
I have split up the directory to be checked, because one dir needs to be checked every day, the other one only once a week.
The last one shows a status Pending in Nagios. That's not wat i want. Is het possible to not let it show?
Or should i go back to the config with two dir's in the command?
This is wat i have now:
Basic.cfg:
define command{
command_name check_newest_file_age
command_line /usr/lib64/nagios/plugins/check_nrpe -H '$HOSTADDRESS$' -t 300 -c check_newest_file_age $ARG1$ $ARG2$
}
Services.cfg:
define service {
use generic-service
host_name linux-server
check_interval 300
check_period onlymondays
notification_period onlymondays
service_description Controle backup-log
check_command check_newest_file_age! -a '-d "/gpfs/fileSystemConnections55ONT/filesystemconnections6data#/Search-bck/latest/" -w 7 -c 8 -t days'
define service {
use generic-service
host_name linux-server
check_interval 300
service_description Controle herstart log
check_command check_newest_file_age! -a '-d "/waslog/cp_init/" -w 7 -c 8 -t days'
}
I have split up the directory to be checked, because one dir needs to be checked every day, the other one only once a week.
The last one shows a status Pending in Nagios. That's not wat i want. Is het possible to not let it show?
Or should i go back to the config with two dir's in the command?
This is wat i have now:
Basic.cfg:
define command{
command_name check_newest_file_age
command_line /usr/lib64/nagios/plugins/check_nrpe -H '$HOSTADDRESS$' -t 300 -c check_newest_file_age $ARG1$ $ARG2$
}
Services.cfg:
define service {
use generic-service
host_name linux-server
check_interval 300
check_period onlymondays
notification_period onlymondays
service_description Controle backup-log
check_command check_newest_file_age! -a '-d "/gpfs/fileSystemConnections55ONT/filesystemconnections6data#/Search-bck/latest/" -w 7 -c 8 -t days'
define service {
use generic-service
host_name linux-server
check_interval 300
service_description Controle herstart log
check_command check_newest_file_age! -a '-d "/waslog/cp_init/" -w 7 -c 8 -t days'
}
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: How to config plugin check_newest_file_age
You can't have it not show, but you can set the initial state to be OK
Add the following to the service
Add the following to the service
Code: Select all
initial_state o
Re: How to config plugin check_newest_file_age
Ok, where do i put that?
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: How to config plugin check_newest_file_age
In the service definitions, such as:welbp00 wrote:Ok, where do i put that?
Code: Select all
define service {
use generic-service
host_name linux-server
check_interval 300
check_period onlymondays
notification_period onlymondays
initial_state o
service_description Controle backup-log
check_command check_newest_file_age! -a '-d "/gpfs/fileSystemConnections55ONT/filesystemconnections6data#/Search-bck/latest/" -w 7 -c 8 -t days'
define service {
use generic-service
host_name linux-server
check_interval 300
initial_state o
service_description Controle herstart log
check_command check_newest_file_age! -a '-d "/waslog/cp_init/" -w 7 -c 8 -t days'
}
Re: How to config plugin check_newest_file_age
I have put the initial_state in, but nagios still shows "pending"
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: How to config plugin check_newest_file_age
Did you restart Nagios?welbp00 wrote:I have put the initial_state in, but nagios still shows "pending"
Re: How to config plugin check_newest_file_age
Yes, i did.
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: How to config plugin check_newest_file_age
Hmm, it may have to be set on the first time it is loaded.welbp00 wrote:Yes, i did.
I can only suggest not sending a passive result setting the status to OK
Re: How to config plugin check_newest_file_age
Oke, i will wait until monday, to see if the check will run, and to see if the state Pending will disapear.
Thnx for the help so far!
Thnx for the help so far!
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: How to config plugin check_newest_file_age
Sounds good!welbp00 wrote:Oke, i will wait until monday, to see if the check will run, and to see if the state Pending will disapear.
Thnx for the help so far!