From 81ffe56f4a48d76f3bef0fdacdbf831d1119f6d3 Mon Sep 17 00:00:00 2001 From: David Kirwan Date: Thu, 25 Apr 2024 12:51:32 +0100 Subject: [PATCH] zabbix: move https to http for proxies template Signed-off-by: David Kirwan --- inventory/group_vars/proxies | 2 +- roles/zabbix/zabbix_templates/files/external_hosts_http.json | 1 + roles/zabbix/zabbix_templates/files/external_hosts_https.json | 1 - 3 files changed, 2 insertions(+), 2 deletions(-) create mode 100644 roles/zabbix/zabbix_templates/files/external_hosts_http.json delete mode 100644 roles/zabbix/zabbix_templates/files/external_hosts_https.json diff --git a/inventory/group_vars/proxies b/inventory/group_vars/proxies index 188e75d8de..6f6ae30ea6 100644 --- a/inventory/group_vars/proxies +++ b/inventory/group_vars/proxies @@ -84,5 +84,5 @@ tcp_ports: [ varnish_group: proxies zabbix_templates: - group: "proxies" # Ansible group - template: "external_hosts_https.json" # Template name in roles/zabbix/zabbix_templates/files/templatename.json + template: "external_hosts_http.json" # Template name in roles/zabbix/zabbix_templates/files/templatename.json hostgroup: "fedora external hosts" # Zabbix hostgroup diff --git a/roles/zabbix/zabbix_templates/files/external_hosts_http.json b/roles/zabbix/zabbix_templates/files/external_hosts_http.json new file mode 100644 index 0000000000..d51c297185 --- /dev/null +++ b/roles/zabbix/zabbix_templates/files/external_hosts_http.json @@ -0,0 +1 @@ +{"zabbix_export": {"version": "6.0", "groups": [{"uuid": "67e9fe194588431d8434f52f25d20dbd", "name": "fedora external hosts"}], "templates": [{"uuid": "eb3e5e398e694a36ba60ccf0b27c3688", "template": "external_hosts_http.json", "name": "fedora external hosts http", "groups": [{"name": "fedora external hosts"}], "items": [{"uuid": "6dd849983d014037be0f0903bf39727f", "name": "http external host check", "type": "HTTP_AGENT", "key": "http_value_search", "delay": "5m", "trends": "0", "value_type": "TEXT", "preprocessing": [{"type": "REGEX", "parameters": ["HTTP/2 ([0-9]+)", "\\1"]}], "timeout": "15s", "url": "http://{HOST.NAME}.fedoraproject.org", "retrieve_mode": "HEADERS", "output_format": "JSON", "triggers": [{"uuid": "db4080a5128c4550b7e8fefa48c2b41c", "expression": "not(last(/external_hosts_http.json/http_value_search)=200)", "name": "external host not healthy", "priority": "HIGH"}]}]}]}} diff --git a/roles/zabbix/zabbix_templates/files/external_hosts_https.json b/roles/zabbix/zabbix_templates/files/external_hosts_https.json deleted file mode 100644 index 1cfeafe139..0000000000 --- a/roles/zabbix/zabbix_templates/files/external_hosts_https.json +++ /dev/null @@ -1 +0,0 @@ -{"zabbix_export": {"version": "6.0", "groups": [{"uuid": "67e9fe194588431d8434f52f25d20dbd", "name": "fedora external hosts"}], "templates": [{"uuid": "eb3e5e398e694a36ba60ccf0b27c3688", "template": "external_hosts_https.json", "name": "fedora external hosts https", "groups": [{"name": "fedora external hosts"}], "items": [{"uuid": "6dd849983d014037be0f0903bf39727f", "name": "http external host check", "type": "HTTP_AGENT", "key": "http_value_search", "delay": "5m", "trends": "0", "value_type": "TEXT", "preprocessing": [{"type": "REGEX", "parameters": ["HTTP/2 ([0-9]+)", "\\1"]}], "timeout": "15s", "url": "https://{HOST.NAME}.fedoraproject.org", "retrieve_mode": "HEADERS", "output_format": "JSON", "triggers": [{"uuid": "db4080a5128c4550b7e8fefa48c2b41c", "expression": "not(last(/external_hosts_https.json/http_value_search)=200)", "name": "external host not healthy", "priority": "HIGH"}]}]}]}}