Added Nagios rdu3 configs

This commit is contained in:
Mark Rosenbaum 2025-05-30 12:18:35 -04:00
parent 07c894ea21
commit a9d427d689
5 changed files with 113 additions and 1 deletions

View file

@ -0,0 +1,39 @@
###############
# All Servers and associated devices (rdu3)
###############
## {{ env }}
{% for key, value in groups.items()|sort %}
{% if groups[key] != [] and key not in vars['exclude_rdu3_hostgroups'] %}
define hostgroup{
hostgroup_name {{ key }}
alias {{ key }}
members {% for host in groups[key]|sort %}{% if hostvars[host].nagios_Can_Connect == true %}{{host}}, {% endif %}{% endfor %}
}
{% endif %}
{% endfor %}
define hostgroup{
hostgroup_name no_ping
alias no_ping
members {% for host in groups['all']|sort %}{% if hostvars[host].nagios_Check_Services['ping'] == true or hostvars[host].nagios_Can_Connect == true %}{{host}}, {% endif %}{% endfor %}
}
## Services with minimal monitoring
define hostgroup{
hostgroup_name cloud_aws_group
alias cloud_aws_group
members {% for host in groups['cloud_aws']|sort %}{{host}}, {% endfor %}
}
define hostgroup{
hostgroup_name mincheckgrp
alias mincheckgrp
members {% for host in groups['all']|sort %}{% if hostvars[host].nagios_Check_Services['nrpe'] != true and hostvars[host].nagios_Can_Connect == true %}{{host}}, {% endif %}{% endfor %}
}
define hostgroup{
hostgroup_name routers
alias routers
members ibiblio-gw, dedicated-gw, host1plus-gw, internetx-gw, osuosl-gw, rdu-gw, rdu-cc-gw, iad2-gw, rdu3-gw
}

View file

@ -24,13 +24,29 @@ define host {
{% if vars['nagios_location'] == 'iad2_internal' %}
address 10.3.163.254
{% elif vars['nagios_location'] == 'external' %}
address 209.132.185.206
address 38.145.60.3
parents ibiblio-gw
{% endif %}
}
#Mark Note to Self: Come back and correct these later
# 'rdu3'
define host {
host_name rdu3-gw
alias rdu3 gateway
use mincheck
check_command check-host-alive4
{% if vars['nagios_location'] == 'rdu3_internal' %}
address 10.16.163.254
{% elif vars['nagios_location'] == 'external' %}
address 38.145.32.3
parents ibiblio-gw
{% endif %}
}
#'dedicatedsolutions'
define host {
host_name dedicated-gw

View file

@ -0,0 +1,9 @@
{% for host in vars["rdu3_external"]|sort %}
define host {
host_name {{ host }}
alias {{ host }}
use mincheck
address {{ host }}
parents rdu3-gw
}
{% endfor %}

View file

@ -0,0 +1,29 @@
{% for host in groups['all']|sort %}
{% if hostvars[host].datacenter == 'rdu3' and hostvars[host].nagios_Can_Connect == true %}
define host {
{% if hostvars[host].nagios_Check_Services['nrpe'] == true %}
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_ipv4_ip is defined %}
address {{ hostvars[host].eth0_ipv4_ip }}
{% elif hostvars[host].ansible_default_ipv4 is defined and hostvars[host].ansible_default_ipv4.address is defined %}
address {{ hostvars[host].ansible_default_ipv4.address }}
{% else %}
address {{ host }}
{% endif %}
{% if hostvars[host]['vmhost'] is defined %}
parents {{ hostvars[host]['vmhost'] }}
{% else %}
parents rdu3-gw
{% endif %}
}
{% endif %}
{% endfor %}

View file

@ -0,0 +1,19 @@
{% for host in vars['rdu3_management_hosts']|sort %}
define host {
host_name {{ host }}
alias {{ host }}
use mincheck
address {{ host }}
parents rdu3-gw
}
{% endfor %}
{% for host in vars['rdu3_management_limited']|sort %}
define host {
host_name {{ host }}
alias {{ host }}
use mincheck
address {{ host }}
parents rdu3-gw
}
{% endfor %}