add ipv6 check for fedorapeople

This commit is contained in:
Seddik Alaoui Ismaili 2022-11-02 00:24:40 +01:00 committed by kevin
parent 5be8276a3e
commit 9af427e1bf
3 changed files with 40 additions and 1 deletions

View file

@ -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
}

View file

@ -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

View file

@ -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 %}