diff --git a/roles/nagios_server/files/nagios/services/ping.cfg b/roles/nagios_server/files/nagios/services/ping.cfg index bbfdae61a7..6b850d4c4e 100644 --- a/roles/nagios_server/files/nagios/services/ping.cfg +++ b/roles/nagios_server/files/nagios/services/ping.cfg @@ -12,3 +12,9 @@ define service { 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 +} diff --git a/roles/nagios_server/tasks/main.yml b/roles/nagios_server/tasks/main.yml index 79f2ad5470..29ab93f9b5 100644 --- a/roles/nagios_server/tasks/main.yml +++ b/roles/nagios_server/tasks/main.yml @@ -323,7 +323,7 @@ # This one may go to being just a regular config file if we can make remote monitoring work ## Copy over system configs - name: Copy specialized nrpe.cfg for nagios server - template: src=nrpe/nrpe.cfg.j2 dest=/etc/nagios/nrpe.cfg + template: src=nrpe/nrpe.cfg.j2 dest=/etc/nagios/nrpe.cfg notify: - restart nrpe tags: @@ -419,6 +419,7 @@ - rdu-hosts.cfg - iad2-external.cfg - aws-hosts.cfg + - ibiblio-hosts-ipv6.cfg when: env == "production" tags: - nagios_server diff --git a/roles/nagios_server/templates/nagios/hosts/ibiblio-hosts-ipv6.cfg.j2 b/roles/nagios_server/templates/nagios/hosts/ibiblio-hosts-ipv6.cfg.j2 new file mode 100644 index 0000000000..2f5d72a49f --- /dev/null +++ b/roles/nagios_server/templates/nagios/hosts/ibiblio-hosts-ipv6.cfg.j2 @@ -0,0 +1,32 @@ +{% for host in groups['all']|sort %} +{% if hostvars[host].datacenter == 'ibiblio' and hostvars[host].nagios_Can_Connect == true %} +define host { +{% if vars['nagios_location'] == 'iad2_internal' %} + use defaulttemplate +{% else %} + use mincheck +{% endif %} + + host_name {{ host }} +{% if hostvars[host].ansible_hostname is defined %} + alias {{ hostvars[host].ansible_hostname }} +{% else %} + alias {{ host }} +{% endif %} +{% if hostvars[host].eth0_ipv6_ip is defined %} + address {{ hostvars[host].eth0_ipv6_ip }} +{% elif hostvars[host].ansible_default_ipv6 is defined %} +{% if hostvars[host].ansible_default_ipv6.address is defined %} + address {{ hostvars[host].ansible_default_ipv6.address }} +{% endif %} +{% else %} + address {{ host }} +{% endif %} +{% if hostvars[host]['vmhost'] is defined %} + parents {{ hostvars[host]['vmhost'] }} +{% elif hostvars[host].datacenter is defined %} + parents ibiblio-gw +{% endif %} +} +{% endif %} +{% endfor %}