Zabbix: add external http connectivity checks to proxies

Signed-off-by: Greg Sutcliffe <fedora@emeraldreverie.org>
This commit is contained in:
Greg Sutcliffe
2025-12-11 16:40:16 +00:00
parent 038ed9e151
commit e2bc07005c
3 changed files with 125 additions and 0 deletions

View File

@@ -27,6 +27,7 @@
- rkhunter
- nagios_client
- zabbix/zabbix_agent
- zabbix/httpchecks
- collectd/base
- sudo
- rsyncd

View File

@@ -0,0 +1,99 @@
zabbix_export:
version: '7.0'
template_groups:
- uuid: a333cbd6a3ad44baaa4eee4b0c0b1bec
name: Fedora
templates:
- uuid: 248dc8195923413eb6fb9dd8a8e09332
template: 'Proxy HTTP checks'
name: 'Proxy HTTP checks'
groups:
- name: Fedora
items:
- uuid: 80960b21fa7146538d6ddd9a2ec78e84
name: http-fedoraproject.org
type: ZABBIX_ACTIVE
key: 'web.page.regexp[https://fedoraproject.org/,,,https://fedoraproject.org]'
delay: 5m
value_type: CHAR
trends: '0'
timeout: 6s
tags:
- tag: component
value: infra
triggers:
- uuid: 1d55c842156c4290ac0d6f7bdcb02f13
expression: 'last(/Proxy HTTP checks/web.page.regexp[https://fedoraproject.org/,,,https://fedoraproject.org])<>"https://fedoraproject.org"'
name: 'http-fedoraproject.org connection failed'
priority: AVERAGE
tags:
- tag: scope
value: availability
- tag: scope
value: connectivity
- uuid: 5bbf9f257f1f4daf862f70d93271c0b5
name: http-fedoraproject.org-hotspot.txt
type: ZABBIX_ACTIVE
key: 'web.page.regexp[https://fedoraproject.org/static/hotspot.txt,,,OK]'
delay: 5m
value_type: CHAR
trends: '0'
timeout: 10s
tags:
- tag: component
value: infra
triggers:
- uuid: bfd8143fda7b4c60bebc80086024e48b
expression: 'last(/Proxy HTTP checks/web.page.regexp[https://fedoraproject.org/static/hotspot.txt,,,OK])<>"OK"'
name: 'http-fedoraproject.org-hotspot.txt connection failed'
priority: AVERAGE
tags:
- tag: scope
value: availability
- tag: scope
value: connectivity
- uuid: 0ecc08c35b4b47e49b4c28c867520f88
name: http-fedoraproject.org-wiki
type: ZABBIX_ACTIVE
key: 'web.page.regexp[https://fedoraproject.org/wiki/Fedora_Project_Wiki,,,Looking for help]'
delay: 5m
value_type: CHAR
trends: '0'
timeout: 6s
tags:
- tag: component
value: infra
triggers:
- uuid: 8efe34c0ade040d5b9d84ee06f31cc04
expression: 'last(/Proxy HTTP checks/web.page.regexp[https://fedoraproject.org/wiki/Fedora_Project_Wiki,,,Looking for help])<>"Looking for help"'
name: 'http-fedoraproject.org-wiki connection failed'
priority: AVERAGE
tags:
- tag: scope
value: availability
- tag: scope
value: connectivity
- uuid: a6fa7618bcc24f50a2300a77a6ff7749
name: http-fedoraproject.org-wiki-non-cached
type: ZABBIX_ACTIVE
key: 'web.page.regexp[https://fedoraproject.org/wiki/Special:Version,,,MediaWiki is free software]'
delay: 5m
value_type: CHAR
trends: '0'
timeout: 6s
tags:
- tag: component
value: infra
triggers:
- uuid: ca2817c97ef64ed08e35c08535b0bd41
expression: 'last(/Proxy HTTP checks/web.page.regexp[https://fedoraproject.org/wiki/Special:Version,,,MediaWiki is free software])<>"MediaWiki is free software"'
name: 'http-fedoraproject.org-wiki-non-cached connection failed'
priority: AVERAGE
tags:
- tag: scope
value: availability
- tag: scope
value: connectivity
tags:
- tag: application
value: proxies

View File

@@ -0,0 +1,25 @@
---
# Zabbix monitoring of the internal IPA server
- name: Zabbix API Block
vars:
ansible_zabbix_auth_key: "{{ zabbix_auth_key }}"
ansible_network_os: "{{ zabbix_network_os }}"
ansible_connection: "{{ zabbix_connection }}"
ansible_httpapi_port: "{{ zabbix_httpapi_port }}"
ansible_httpapi_use_ssl: "{{ zabbix_httpapi_use_ssl }}"
ansible_httpapi_validate_certs: "{{ zabbix_httpapi_validate_certs }}"
ansible_host: "{{ zabbix_server }}"
ansible_zabbix_url_path: "{{ zabbix_url_path }}"
tags:
- ipa/server
- zabbix_api
block:
- name: Import Proxy HTTP checks template
community.zabbix.zabbix_template:
template_yaml: "{{ lookup('file', 'proxy-template.yml') }}"
state: present
- name: Add self to Proxy checks template in Zabbix
community.zabbix.zabbix_host:
host_name: "{{ inventory_hostname }}"
link_templates: Proxy HTTP checks
force: false