Execute event handler during specific hours

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
hbouma
Posts: 483
Joined: Tue Feb 27, 2018 9:31 am

Execute event handler during specific hours

Post 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.
User avatar
jbrunkow
Posts: 441
Joined: Fri Mar 13, 2020 10:45 am

Re: Execute event handler during specific hours

Post 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.
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!
hbouma
Posts: 483
Joined: Tue Feb 27, 2018 9:31 am

Re: Execute event handler during specific hours

Post 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?
You do not have the required permissions to view the files attached to this post.
User avatar
jbrunkow
Posts: 441
Joined: Fri Mar 13, 2020 10:45 am

Re: Execute event handler during specific hours

Post 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.
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!
Locked