Define a timeperiod for Nagios and assign it to our matrix notify user

This commit is contained in:
Salt 2022-01-04 18:00:55 -06:00
parent fa002aec6c
commit c59781b47e
2 changed files with 15 additions and 0 deletions

View File

@ -149,6 +149,8 @@
- name: matrix
host_notification_commands: notify-host-by-matrix
service_notification_commands: notify-service-by-matrix
host_notification_period: ansible-not-late-at-night
service_notification_period: ansible-not-late-at-night
extra:
- key: contactgroups
value: ansible

View File

@ -30,6 +30,19 @@ define hostgroup {
alias Ansible-managed Hosts
}
# Additional timeperiods for convenience
define timeperiod {
timeperiod_name ansible-not-late-at-night
alias Not Late at Night
sunday 07:00-22:00
monday 07:00-22:00
tuesday 07:00-22:00
wednesday 07:00-22:00
thursday 07:00-22:00
friday 07:00-22:00
saturday 07:00-22:00
}
{% if nagios_contacts is defined %}
# Contacts
# Everything here is defined in nagios_contacts