1
0
Fork 0
forked from infra/ansible

Zabbix: add trigger for one-off httpcheck items

Signed-off-by: Greg Sutcliffe <fedora@emeraldreverie.org>
This commit is contained in:
Greg Sutcliffe 2026-05-28 09:44:55 +01:00
commit bc2f608f4c
Signed by: gwmngilfen
SSH key fingerprint: SHA256:dNHcz65ApR68w2TkCIAXDBdt4oNL62Fyx48U7dXWuk0
2 changed files with 14 additions and 2 deletions

View file

@ -10,7 +10,6 @@
ansible_host: "{{ zabbix_server }}"
ansible_zabbix_url_path: "{{ zabbix_url_path }}"
tags:
- httpitems
- zabbix_agent
- zabbix_api
block:
@ -26,3 +25,16 @@
tags:
- tag: component
value: http
- name: Create {{ item.name }} http connection trigger
community.zabbix.zabbix_trigger:
name: "{{ item.name }} - text not found"
host_name: "{{ inventory_hostname }}"
params:
severity: average
expression: "last(/{{ inventory_hostname }}/web.page.regexp[{{ item.name }},,,{{ item.string }}])<>'{{ item.string }}'"
enabled: true
manual_close: true
tags:
- tag: scope
value: availability

View file

@ -34,7 +34,7 @@
include_tasks: httpcheck.yml
loop:
- { name: 'http://certgetter01.rdu3.fedoraproject.org', string: 'Index' }
- { name: 'https://lists.fedoraproject.org/archives', string: 'Fedora Mailing-Lists' }
- { name: 'https://lists.fedoraproject.org/archives/', string: 'Fedora Mailing-Lists' }
- { name: 'https://cdn.registry.fedoraproject.org/v2/', string: '{}' }
- { name: 'https://www.fedorastatus.org/index.html', string: 'Fedora Infrastructure Status' }
- { name: 'https://pagure.io/fedora-infrastructure/issues', string: 'Issues' }