1
0
Fork 0
forked from infra/ansible

Zabbix: move http-koji checks from Nagios

Signed-off-by: Greg Sutcliffe <fedora@emeraldreverie.org>
This commit is contained in:
Greg Sutcliffe 2026-05-26 13:44:59 +01:00
commit 6cfda2b8f5
Signed by: gwmngilfen
SSH key fingerprint: SHA256:dNHcz65ApR68w2TkCIAXDBdt4oNL62Fyx48U7dXWuk0
4 changed files with 86 additions and 19 deletions

View file

@ -69,3 +69,5 @@ zabbix_tls_psk: "{{ zabbix_tls_stg_psk }}" # in ansible-private repo
zabbix_inventory:
# Env is not a valid key, so use this field for environment
deployment_status: staging
zabbix_macros:
'KOJI.HOST': koji.stg.fedoraproject.org

View file

@ -0,0 +1,59 @@
zabbix_export:
version: '7.0'
template_groups:
- uuid: a333cbd6a3ad44baaa4eee4b0c0b1bec
name: Fedora
templates:
- uuid: cd834c9a477042fdadba6fb6c1cdcc56
template: 'Koji checks'
name: 'Koji checks'
description: 'Checks on Koji wellness'
groups:
- name: Fedora
items:
- uuid: dda31efd4386498a9b3176ad80e50eb2
name: 'http-koji localhost'
type: ZABBIX_ACTIVE
key: 'web.page.regexp[http://localhost/koji/,,,Recent]'
value_type: CHAR
trends: '0'
tags:
- tag: application
value: koji
- tag: component
value: infra
triggers:
- uuid: f95efffe36024e8a94b5f8fa582cc86b
expression: 'last(/Koji checks/web.page.regexp[http://localhost/koji/,,,Recent])<>"Recent"'
name: 'http-koji localhost connection failed'
priority: AVERAGE
tags:
- tag: scope
value: availability
- tag: scope
value: connectivity
- uuid: 6dcf20635db1441892d51884bff34037
name: http-koji
type: ZABBIX_ACTIVE
key: 'web.page.regexp[https://{$KOJI_HOST}/koji/hosts,,,fedoraproject.org]'
value_type: CHAR
trends: '0'
tags:
- tag: application
value: koji
- tag: component
value: infra
triggers:
- uuid: f85aa3969eb241ed857e21e07964ca5c
expression: 'last(/Koji checks/web.page.regexp[https://{$KOJI_HOST}/koji/hosts,,,fedoraproject.org])<>"fedoraproject.org"'
name: 'http-koji connection failed'
priority: AVERAGE
tags:
- tag: scope
value: availability
- tag: scope
value: connectivity
macros:
- macro: '{$KOJI.HOST}'
value: koji.fedoraproject.org
description: 'Target for koji checks (override for stg)'

View file

@ -484,3 +484,28 @@
tags:
- koji_hub
- koji_hub/oomd
# Zabbix monitoring of the koji sites
- 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:
- koji_hub
- zabbix_api
block:
- name: Import Proxy checks template
community.zabbix.zabbix_template:
template_yaml: "{{ lookup('file', 'zabbix-template.yml') }}"
state: present
- name: Add self to Koji checks template in Zabbix
community.zabbix.zabbix_host:
host_name: "{{ inventory_hostname }}"
link_templates: Koji checks
force: false

View file

@ -97,25 +97,6 @@ define service {
servicegroups freemedia
}
## Internal services
define service {
hostgroup_name koji
service_description http-koji
check_command check_website!koji.fedoraproject.org!/koji/hosts!fedoraproject.org
use websitetemplate
}
define service {
hostgroup_name koji
service_description http-koji-frontend
check_command check_website_ppc!localhost!/koji/!Recent
use ppc-secondarytemplate
}
## Auxillary to websites but necessary to make them happen
{% endif %}
{% if vars['nagios_location'] == 'rdu3_internal' %}