I am currently having an issue on a Passive check: I have a custom script that will be run each first day of the month at 05AM (I do not have control about running time, it could take some minutes to an hour up to 3 hours), I need to monitor this behavior and found the following Nagios' cases:
- my Bash script has crashed: I handle sending notification to nagios via NSCA.
- my Bash script worked: same behavior as above.
I have the following questions :
- How can I set-up my passive check to be only performed on the 1st day of each month ?
- How is calculated the freshness_threshold based on the previous passive check ?
timeperiod configuration:
Code: Select all
define timeperiod {
name mondayonly
timeperiod_name mondayonly
alias Monday Work Hours
monday 19:20-19:22
#day 1 11:00-11:02
}
Code: Select all
define service {
service_description FOLDER-clean
check_command no-folder-report
host_name localhost
contact_groups admins
flap_detection_enabled 0
event_handler_enabled 0
max_check_attempts 1
check_interval 1
retry_interval 1
active_checks_enabled 0
passive_checks_enabled 1
notifications_enabled 1
check_freshness 1
freshness_threshold 90
check_period mondayonly
}
define command {
command_name no-folder-report
command_line /usr/lib64/nagios/plugins/check_dummy 2 "CRITICAL: Results of job were not reported!"
}
Reagrds,
Nicolas