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.
Time periods
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Time periods
No, timeperiods cannot wrap past midnightMOHANREDDY wrote: Is my non production hours time period setting correct?
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
}
-
- Posts: 81
- Joined: Tue Apr 10, 2018 4:14 pm
Re: Time periods
If i use above time periods i mentioned, wont i get an alert as nagios caught alert but didn't fire that alert
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Time periods
I don't understand the question, could you clarify what you are referring to?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
-
- Posts: 81
- Joined: Tue Apr 10, 2018 4:14 pm
Re: Time periods
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?
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?
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: 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.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?
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
-
- Posts: 81
- Joined: Tue Apr 10, 2018 4:14 pm
Re: Time periods
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.
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Time periods
As I stated,
I would suggest replacing the timeperiod with my suggestions.scottwilkerson wrote:I am not 100% sure as it is know to be invalid