sometimes a service check is not scheduled

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
grimm26
Posts: 36
Joined: Wed Dec 12, 2012 1:57 pm

sometimes a service check is not scheduled

Post 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.
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: sometimes a service check is not scheduled

Post by slansing »

What types of checks are these? Can you share their service.cfg files? Or one of the ones with issues?
grimm26
Posts: 36
Joined: Wed Dec 12, 2012 1:57 pm

Re: sometimes a service check is not scheduled

Post 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.
grimm26
Posts: 36
Joined: Wed Dec 12, 2012 1:57 pm

Re: sometimes a service check is not scheduled

Post 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$
}
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: sometimes a service check is not scheduled

Post 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
grimm26
Posts: 36
Joined: Wed Dec 12, 2012 1:57 pm

Re: sometimes a service check is not scheduled

Post 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
    }
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: sometimes a service check is not scheduled

Post by slansing »

You are missing a couple definitions, what version of Nagios are you using? And how was it installed?
grimm26
Posts: 36
Joined: Wed Dec 12, 2012 1:57 pm

Re: sometimes a service check is not scheduled

Post by grimm26 »

Nagios 3.5.0 on RHEL 6.4 installed via yum. Nothing custom.
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: sometimes a service check is not scheduled

Post by sreinhardt »

Since you installed via yum, did you also install nagios-common for the default configs and such?
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
grimm26
Posts: 36
Joined: Wed Dec 12, 2012 1:57 pm

Re: sometimes a service check is not scheduled

Post by grimm26 »

sreinhardt wrote:Since you installed via yum, did you also install nagios-common for the default configs and such?
Yes
Locked