From caadf375f2af3333a8d5b27219ef26ed02903997 Mon Sep 17 00:00:00 2001 From: Salt Date: Sun, 8 Aug 2021 12:35:35 -0500 Subject: [PATCH] Add basic site checks --- playbooks/tasks/web/nagios-hosts.cfg.j2 | 29 +++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/playbooks/tasks/web/nagios-hosts.cfg.j2 b/playbooks/tasks/web/nagios-hosts.cfg.j2 index 33e1ef8..9ddcaec 100644 --- a/playbooks/tasks/web/nagios-hosts.cfg.j2 +++ b/playbooks/tasks/web/nagios-hosts.cfg.j2 @@ -66,6 +66,35 @@ define service { hostgroup_name nagios-checkhttp } +# Manually-defined services for hosts +# web1.desu.ltd +{% for site in ["9iron.club","desu.ltd","nc.desu.ltd","git.desu.ltd"] %} +define service { + use ansible-generic-service + service_description HTTPS - {{ site }} + check_command check_http!--ssl -H {{ site }} + host_name web1.desu.ltd +} +{% endfor %} +# web2.desu.ltd +{% for site in ["cowfee.moe","tube.cowfee.moe"] %} +define service { + use ansible-generic-service + service_description HTTPS - {{ site }} + check_command check_http!--ssl -H {{ site }} + host_name web2.desu.ltd +} +{% endfor %} +# web3.desu.ltd +{% for site in ["netbox.desu.ltd","nagios.desu.ltd -e 401"] %} +define service { + use ansible-generic-service + service_description HTTPS - {{ site }} + check_command check_http!--ssl -H {{ site }} + host_name web3.desu.ltd +} +{% endfor %} + # Hostgroups # Everything here is dynamically-generated based on tags from Netbox {% for tag in query('netbox.netbox.nb_lookup', 'tags', api_endpoint='https://netbox.desu.ltd', token=netbox_token) %}