nagios: move ping.cfg to a template so it works for both nagios servers
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
This commit is contained in:
parent
9e39477532
commit
b9b35a09ed
3 changed files with 32 additions and 20 deletions
|
@ -1,20 +0,0 @@
|
|||
define service {
|
||||
hostgroup_name all,!no_ping, !buildvm_armv7, !buildvm_s390x
|
||||
service_description ICMP-Ping4
|
||||
check_command check_ping4!350.0,20%!500.0,60%
|
||||
use criticaltemplate
|
||||
}
|
||||
|
||||
define service {
|
||||
hostgroup_name buildvm_armv7, buildvm_s390x
|
||||
service_description ICMP-Ping4-vm-builders
|
||||
check_command check_ping4!1500.0,20%!2500.0,80%
|
||||
use criticaltemplate
|
||||
}
|
||||
|
||||
define service {
|
||||
host_name nagios-external.fedoraproject.org
|
||||
service_description ICMP-Ping6-check
|
||||
check_command check-host-alive6!fedorapeople.org!1500.0,20%!2500.0,80%
|
||||
use criticaltemplate
|
||||
}
|
|
@ -147,6 +147,16 @@
|
|||
- nagios_server
|
||||
notify: restart nagios
|
||||
|
||||
## Copy over the template command scripts
|
||||
- name: Copy /etc/nagios/commands (templates)
|
||||
templates: src=nagios/commands/{{ item }} dest=/etc/nagios/commands/{{ item }}
|
||||
with_items:
|
||||
- ping.cfg
|
||||
tags:
|
||||
- nagios_config
|
||||
- nagios_server
|
||||
notify: restart nagios
|
||||
|
||||
## Copy over the contacts
|
||||
- name: Copy /etc/nagios/contacts
|
||||
synchronize: src=nagios/contacts/ dest=/etc/nagios/contacts/
|
||||
|
|
22
roles/nagios_server/templates/nagios/services/ping.cfg
Normal file
22
roles/nagios_server/templates/nagios/services/ping.cfg
Normal file
|
@ -0,0 +1,22 @@
|
|||
define service {
|
||||
hostgroup_name all,!no_ping, !buildvm_armv7, !buildvm_s390x
|
||||
service_description ICMP-Ping4
|
||||
check_command check_ping4!350.0,20%!500.0,60%
|
||||
use criticaltemplate
|
||||
}
|
||||
|
||||
define service {
|
||||
hostgroup_name buildvm_armv7, buildvm_s390x
|
||||
service_description ICMP-Ping4-vm-builders
|
||||
check_command check_ping4!1500.0,20%!2500.0,80%
|
||||
use criticaltemplate
|
||||
}
|
||||
|
||||
{% if vars['nagios_location'] == 'external' %}
|
||||
define service {
|
||||
host_name nagios-external.fedoraproject.org
|
||||
service_description ICMP-Ping6-check
|
||||
check_command check-host-alive6!fedorapeople.org!1500.0,20%!2500.0,80%
|
||||
use criticaltemplate
|
||||
}
|
||||
{% endif %}
|
Loading…
Add table
Add a link
Reference in a new issue