forked from infra/ansible
Zabbix: Add some basic non-host HTTP checking to zabbix01
Signed-off-by: Greg Sutcliffe <fedora@emeraldreverie.org>
This commit is contained in:
parent
7e5a64efdc
commit
8d40668907
2 changed files with 35 additions and 0 deletions
26
roles/zabbix/sslchecks/tasks/httpcheck.yml
Normal file
26
roles/zabbix/sslchecks/tasks/httpcheck.yml
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
---
|
||||
- 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:
|
||||
- zabbix_agent
|
||||
- zabbix_api
|
||||
block:
|
||||
- name: Create {{ item.name }} http connection item
|
||||
community.zabbix.zabbix_item:
|
||||
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
|
||||
tags:
|
||||
- tag: component
|
||||
value: tcp
|
||||
|
|
@ -28,3 +28,12 @@
|
|||
tags:
|
||||
- zabbix_api
|
||||
when: inventory_hostname == 'zabbix01.stg.rdu3.fedoraproject.org'
|
||||
|
||||
# HTTP service checks on DNS names
|
||||
- name: Create HTTP checks for other hosts
|
||||
include_tasks: httpcheck.yml
|
||||
loop:
|
||||
- { name: 'certgetter01.rdu3.fedoraproject.org', port: '80' }
|
||||
tags:
|
||||
- zabbix_api
|
||||
when: inventory_hostname == 'zabbix01.rdu3.fedoraproject.org'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue