Nagios stays dormant when timeperiod starts!

Engage with the community of users including those using the open source solutions.
Includes Nagios Core, Plugins, and NCPA

Nagios stays dormant when timeperiod starts!

Postby rvisalm » Wed Jun 12, 2013 9:42 am

Hello, Internet! Maybe you can give me a hand with an issue I keep getting on Nagios.

I have recently defined a custom time period for a certain service. It goes like this:

Code: Select all
define timeperiod{
        timeperiod_name GridLoad
        alias           grid is running
        sunday -1 march - sunday -1 october          12:59-18:20 ;BST
        sunday -1 october - sunday -1 march          11:59-17:20 ;Non-BST
}


and the service itself (together with its template) is:

Code: Select all
define service{
use                     generic-service
name                    SelfCheckServiceGridLoad
servicegroups           SelfCheckServiceGrp
hostgroup_name          NagiosServerGrp
check_period            GridLoad  ; The service can only be checked when we expect the grid to start
max_check_attempts      5         ; Re-check the service up to 5 times in order to determine its final (hard) state
normal_check_interval   1         ; Check the service every minute under normal conditions
retry_check_interval    1         ; Re-check the service every minute until a hard state can be determined
contact_groups          admins    ; Notifications get sent out to everyone in the 'admins' group
notification_options    w,u,c,r   ; Send notifications about warning, unknown, critical, and recovery events
notification_interval   60        ; Re-notify about service problems every hour
notification_period     GridLoad      ; Notifications can be sent out only during the period
notifications_enabled   1         ; Service notifications are enabled
register                0         ; DONT REGISTER THIS DEFINITION - ITS NOT A REAL SERVICE, JUST A TEMPLATE!
}


Code: Select all
define service{
use                     SelfCheckServiceGridLoad
service_description     Grid Load check
check_command           check_grid_load
}


My problem is, if I "start" the notifications manually (namely, if I perform a manual check and we're in the right time period), Nagios "wakes up" and starts re-checking correctly on time until it is time for blackout.

When the next day comes in and we enter the period again, however, it doesn't restart checking again as it should. It seems to be "over-sleeping", if you excuse my dream metaphors :mrgreen:

Is this behaviour expected? Have i overlooked anything? All help will be much appreciated.
rvisalm
 
Posts: 3
Joined: Wed Jun 12, 2013 9:20 am

Re: Nagios stays dormant when timeperiod starts!

Postby lmiltchev » Wed Jun 12, 2013 12:51 pm

Do you see the "Grid Load check" as scheduled in the Scheduling Queue?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
lmiltchev
QA Manager
 
Posts: 13501
Joined: Mon May 23, 2011 12:15 pm

Re: Nagios stays dormant when timeperiod starts!

Postby rvisalm » Thu Jun 13, 2013 4:22 am

Hello and thanks for your help.

lmiltchev wrote:Do you see the "Grid Load check" as scheduled in the Scheduling Queue?


It does, but it shows a crazy time for the next check.

ie. 10-27-2013 10:59:00 (after checking Scheduling Queue today, 13-06-2013 10:20:00)

Needless to say, it appears in the last position of the queue.
rvisalm
 
Posts: 3
Joined: Wed Jun 12, 2013 9:20 am

Re: Nagios stays dormant when timeperiod starts!

Postby abrist » Thu Jun 13, 2013 4:29 pm

Is your XI server's time, date and timezone correct?
http://assets.nagios.com/downloads/nagi ... m_Time.pdf
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
abrist
Red Shirt
 
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Nagios stays dormant when timeperiod starts!

Postby rvisalm » Fri Jun 14, 2013 7:44 am

It's solved now!

What I did was, I manually forced a check on the service, and then, the next scheduled checks work like a dream!

My theory is that Nagios only re-schedules future checks for a service at the moment of a current check of that service. So it doesn't automatically re-schedule as I expected. Hence, you have to force check it once manually for Nagios to "notice" that something's changed in the timeperiods.cfg file. A bit of a rookie mistake, Isn't it?

Anyway, thank you very much for your help guys, and I hope this post can be useful for anyone.
rvisalm
 
Posts: 3
Joined: Wed Jun 12, 2013 9:20 am

Re: Nagios stays dormant when timeperiod starts!

Postby abrist » Fri Jun 14, 2013 12:42 pm

Great! locked.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
abrist
Red Shirt
 
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm


Return to Community Support

Who is online

Users browsing this forum: No registered users and 35 guests