Time periods

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
MOHANREDDY
Posts: 81
Joined: Tue Apr 10, 2018 4:14 pm

Time periods

Post by MOHANREDDY »

Hi,

i have 2 services checking the same folder with different time periods, 1 time period from 6:00 AM to 18:00 PM and other from 18:00 PM to next day 6 AM.

I have configured them as below.

define timeperiod {
timeperiod_name Non Production hours
alias Non Production hours
friday 18:00-24:00
saturday 00:00-24:00
sunday 00:00-24:00
monday 00:00-06:00
monday 18:00-06:00
tuesday 18:00-06:00
wednesday 18:00-06:00
thursday 18:00-06:00
}

define timeperiod {
timeperiod_name Production hours
alias Production hours
monday 06:00-18:00
tuesday 06:00-18:00
wednesday 06:00-18:00
thursday 06:00-18:00
friday 06:00-18:00
}

Is my non production hours time period setting correct?

as i am not receiving alerts with that time period.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Time periods

Post by scottwilkerson »

MOHANREDDY wrote: Is my non production hours time period setting correct?
No, timeperiods cannot wrap past midnight

You would need to adjust to something like the following

Code: Select all

define timeperiod {
timeperiod_name Non Production hours
alias Non Production hours
saturday 00:00-24:00
sunday 00:00-24:00
monday 00:00-06:00,18:00-24:00
tuesday 00:00-06:00,18:00-24:00
wednesday 00:00-06:00,18:00-24:00
thursday 00:00-06:00,18:00-24:00
friday 00:00-06:00,18:00-24:00
}
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
MOHANREDDY
Posts: 81
Joined: Tue Apr 10, 2018 4:14 pm

Re: Time periods

Post by MOHANREDDY »

If i use above time periods i mentioned, wont i get an alert as nagios caught alert but didn't fire that alert
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Time periods

Post by scottwilkerson »

MOHANREDDY wrote:If i use above time periods i mentioned, wont i get an alert as nagios caught alert but didn't fire that alert
I don't understand the question, could you clarify what you are referring to?
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
MOHANREDDY
Posts: 81
Joined: Tue Apr 10, 2018 4:14 pm

Re: Time periods

Post by MOHANREDDY »

For a service i used this time period

define timeperiod {
timeperiod_name Non Production hours
alias Non Production hours
friday 18:00-24:00
saturday 00:00-24:00
sunday 00:00-24:00
monday 00:00-06:00
monday 18:00-06:00
tuesday 18:00-06:00
wednesday 18:00-06:00
thursday 18:00-06:00
}

I didn't receive an alert but when i check state history report critical alert was reported at 21:24.

so my question is, does nagios alerts customers irrespective of wrong time periods?
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Time periods

Post by scottwilkerson »

MOHANREDDY wrote:For a service i used this time period

define timeperiod {
timeperiod_name Non Production hours
alias Non Production hours
friday 18:00-24:00
saturday 00:00-24:00
sunday 00:00-24:00
monday 00:00-06:00
monday 18:00-06:00
tuesday 18:00-06:00
wednesday 18:00-06:00
thursday 18:00-06:00
}

I didn't receive an alert but when i check state history report critical alert was reported at 21:24.

so my question is, does nagios alerts customers irrespective of wrong time periods?
I mentioned before that you cannot have timeperiods that span across the midnight boundary, as such 18:00-06:00 isn't valid.

Additionally, there is the check timeperiod, and the notification timeperiod

Which of these are you using this timeperiod for?

I suspect that entering something like 18:00-06:00 would end up being interpreted as 18:00-24:00 but I am not 100% sure as it is know to be invalid
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
MOHANREDDY
Posts: 81
Joined: Tue Apr 10, 2018 4:14 pm

Re: Time periods

Post by MOHANREDDY »

I had used 18:00 - 06:00 as notification time period, even if it interprets 18:00 - 06:00 as 18:00-24:00 i didn't get any around 21:24 which is in 18:00-24:00 time period.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Time periods

Post by scottwilkerson »

As I stated,
scottwilkerson wrote:I am not 100% sure as it is know to be invalid
I would suggest replacing the timeperiod with my suggestions.
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
Locked