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:
parent
c0d5169f58
commit
bc2f608f4c
2 changed files with 14 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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' }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue