diff options
Diffstat (limited to 'lamp_haproxy/aws/roles/nagios/templates/webservers.cfg.j2')
-rw-r--r-- | lamp_haproxy/aws/roles/nagios/templates/webservers.cfg.j2 | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/lamp_haproxy/aws/roles/nagios/templates/webservers.cfg.j2 b/lamp_haproxy/aws/roles/nagios/templates/webservers.cfg.j2 new file mode 100644 index 0000000..8d55157 --- /dev/null +++ b/lamp_haproxy/aws/roles/nagios/templates/webservers.cfg.j2 @@ -0,0 +1,25 @@ +# {{ ansible_managed }} + +define hostgroup { + hostgroup_name webservers + alias Web Servers +} + +{% for host in groups.tag_ansible_group_webservers %} + define host { + use linux-server + host_name {{ host }} + alias {{ host }} + address {{ hostvars[host].ansible_default_ipv4.address }} + hostgroups webservers + } +{% endfor %} + +# service checks to be applied to the web server +define service { + use local-service + hostgroup_name webservers + service_description webserver + check_command check_http + notifications_enabled 0 +} |