Page 1 of 1
Execute event handler during specific hours
Posted: Fri Jun 05, 2020 7:54 am
by hbouma
Is there a way to limit Event Handlers to only run during specific hours of the day? For instance, weekdays from 8-5 only, and not execute on weekends?
We have a team that only wants the event handler action to run during this timeframe.
We are running Nagios XI 5.6.10 on RHEL VMs.
Re: Execute event handler during specific hours
Posted: Fri Jun 05, 2020 2:49 pm
by jbrunkow
There are a couple ways you could accomplish this. The easiest would probably be to make a duplicate of the service, define opposite time periods (maybe workhours, and non-workhours), assign the respective time periods to each, and then set only one of the services to trigger an event handler.
The other way would be to write a condition into a script, so that the event handler only executes during certain times.
Re: Execute event handler during specific hours
Posted: Mon Jun 08, 2020 7:05 am
by hbouma
1 last question on this:
Is there a way to run checks only on US Holidays? I see that 24x7_sans_holidays says has the option:
2020-06-08 08_08_45-Window.png
But we would want to be able to do the opposite and only run on US Holidays.
Check 1:
Work hours sans holidays
Check 2:
Non Work Hours
Check 3:
Work Hours for US Holidays?
Re: Execute event handler during specific hours
Posted: Mon Jun 08, 2020 3:43 pm
by jbrunkow
You can define whatever time period you wish. Navigate to the Configure section of XI using the navigation bar on top > click Core Config Manager under Advanced Configuration on the left pane > then click Time Periods under Alerting > and click the + Add New button.