see if we can define cloud hosts, but just not bother checking them
This commit is contained in:
parent
c1db72ac46
commit
e60ddb9aae
2 changed files with 20 additions and 2 deletions
|
@ -28,6 +28,20 @@ define host {
|
||||||
register 0
|
register 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
define host {
|
||||||
|
name nocheck
|
||||||
|
check_command check-host-alive
|
||||||
|
max_check_attempts 8
|
||||||
|
checks_enabled 0
|
||||||
|
retain_status_information 0
|
||||||
|
retain_nonstatus_information 0
|
||||||
|
notification_interval 15
|
||||||
|
notifications_enabled 0
|
||||||
|
notification_options d,r
|
||||||
|
contact_groups fedora-sysadmin-ircbot
|
||||||
|
register 0
|
||||||
|
}
|
||||||
|
|
||||||
define host {
|
define host {
|
||||||
name autoqatemplate
|
name autoqatemplate
|
||||||
check_command check-host-alive
|
check_command check-host-alive
|
||||||
|
|
|
@ -1,7 +1,11 @@
|
||||||
{% for host in groups['all'] %}
|
{% for host in groups['all'] %}
|
||||||
{% if hostvars[host].datacenter == 'cloud' and hostvars[host].nagios_Check_Services['nrpe'] == true %}
|
{% if hostvars[host].datacenter == 'cloud' %}
|
||||||
define host {
|
define host {
|
||||||
use mincheck
|
{% if hostvars[host].nagios_Check_Services['nrpe'] == true %}
|
||||||
|
use defaulttemplate
|
||||||
|
{% else %}
|
||||||
|
use nocheck
|
||||||
|
{% endif %}
|
||||||
host_name {{ host }}
|
host_name {{ host }}
|
||||||
{% if hostvars[host].ansible_hostname is defined %}
|
{% if hostvars[host].ansible_hostname is defined %}
|
||||||
alias {{ hostvars[host].ansible_hostname }}
|
alias {{ hostvars[host].ansible_hostname }}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue