Page 1 of 2
sometimes a service check is not scheduled
Posted: Sun Aug 18, 2013 9:57 pm
by grimm26
I've noticed that sometimes when I start Nagios one or more service checks are just not scheduled - ever. they are active checks, but Status Information says "Service is not scheduled to be checked... " They also tend to show up in the Scheduling Queue with a scheduled time of N/A. Why would this happen? I can usually restart once or twice and they are scheduled like they should be.
Re: sometimes a service check is not scheduled
Posted: Mon Aug 19, 2013 10:45 am
by slansing
What types of checks are these? Can you share their service.cfg files? Or one of the ones with issues?
Re: sometimes a service check is not scheduled
Posted: Mon Aug 19, 2013 11:26 am
by grimm26
The service check is running a custom perl poller using Net::SNMP. Additionally, I also found that going into the GUI and disabling active checks and then re-enabling active checks will get it scheculed as well instead of just restarting Nagios.
Re: sometimes a service check is not scheduled
Posted: Mon Aug 19, 2013 12:42 pm
by grimm26
config excerpt:
Code: Select all
define service{
use generic-customer-poll
host_name host1
service_description site_SITE1 Check
check_command poll_site!$HOSTGROUPMEMBERS:site_SITE1$!$HOSTGROUPNOTES:site_SITE1$!$HOSTNAME$!community
notes site_check
}
define command{
command_name poll_site
command_line $USER1$/poll_site_controllers.pl --controllers $ARG1$ --config-file $ARG2$ --primary $ARG3$ --community $ARG4$
}
Re: sometimes a service check is not scheduled
Posted: Mon Aug 19, 2013 1:14 pm
by slansing
At a glance you seem to be missing many of the basic configuration definitions in your service's .cfg file.
It may be, since you are using a template the information is being pulled from there, please share the template that is assigned to the service "generic-customer-poll" otherwise.. You need to add in check intervals, retry intervals, check periods, notification options, etc, please look at the example on this page, you will "at minimum" need the red highlighted items.:
http://nagios.sourceforge.net/docs/3_0/ ... ml#service
Re: sometimes a service check is not scheduled
Posted: Mon Aug 19, 2013 2:13 pm
by grimm26
Yes, I know. I just didn't take the time to go all the way down the rabbit hole.
Code: Select all
define service{
name generic-service
active_checks_enabled 1
passive_checks_enabled 1
parallelize_check 1
obsess_over_service 1
check_freshness 0
notifications_enabled 1
event_handler_enabled 1
flap_detection_enabled 1
failure_prediction_enabled 1
process_perf_data 1
retain_status_information 1
retain_nonstatus_information 1
is_volatile 0
check_period 24x7
max_check_attempts 3
normal_check_interval 10
retry_check_interval 2
contact_groups admins
notification_options w,u,c,r
notification_interval 60
notification_period 24x7
register 0
}
# Customer polling template
define service{
name generic-customer-poll
use generic-service
obsess_over_service 0
flap_detection_enabled 0
failure_prediction_enabled 0
process_perf_data 0
max_check_attempts 1
normal_check_interval 5
retry_check_interval 5
register 0
}
Re: sometimes a service check is not scheduled
Posted: Mon Aug 19, 2013 4:10 pm
by slansing
You are missing a couple definitions, what version of Nagios are you using? And how was it installed?
Re: sometimes a service check is not scheduled
Posted: Mon Aug 19, 2013 4:20 pm
by grimm26
Nagios 3.5.0 on RHEL 6.4 installed via yum. Nothing custom.
Re: sometimes a service check is not scheduled
Posted: Tue Aug 20, 2013 10:49 am
by sreinhardt
Since you installed via yum, did you also install nagios-common for the default configs and such?
Re: sometimes a service check is not scheduled
Posted: Tue Aug 20, 2013 12:49 pm
by grimm26
sreinhardt wrote:Since you installed via yum, did you also install nagios-common for the default configs and such?
Yes