forked from infra/ansible
Zabbix: use regex instead, more flexible
Signed-off-by: Greg Sutcliffe <fedora@emeraldreverie.org>
This commit is contained in:
parent
8d40668907
commit
6ed762bb29
2 changed files with 6 additions and 5 deletions
|
|
@ -15,12 +15,12 @@
|
|||
block:
|
||||
- name: Create {{ item.name }} http connection item
|
||||
community.zabbix.zabbix_item:
|
||||
name: "{{ item.name }}
|
||||
name: "{{ item.name }}"
|
||||
host_name: "{{ inventory_hostname }}"
|
||||
params:
|
||||
type: zabbix_agent_active
|
||||
key: "net.tcp.service[tcp,{{ item.name }},{{ item.port }}]"
|
||||
value_type: numeric_unsigned
|
||||
key: "web.page.regexp[{{ item.name }},,,{{ item.string }}]"
|
||||
value_type: character
|
||||
tags:
|
||||
- tag: component
|
||||
value: tcp
|
||||
value: http
|
||||
|
|
|
|||
|
|
@ -33,7 +33,8 @@
|
|||
- name: Create HTTP checks for other hosts
|
||||
include_tasks: httpcheck.yml
|
||||
loop:
|
||||
- { name: 'certgetter01.rdu3.fedoraproject.org', port: '80' }
|
||||
- { name: 'http://certgetter01.rdu3.fedoraproject.org', string: 'Index' }
|
||||
- { name: 'https://lists.fedoraproject.org/archives', string: 'Fedora Mailing-Lists' }
|
||||
tags:
|
||||
- zabbix_api
|
||||
when: inventory_hostname == 'zabbix01.rdu3.fedoraproject.org'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue