1
0
Fork 0
forked from infra/ansible

Zabbix: port remaining Copr items from Nagios

Signed-off-by: Greg Sutcliffe <fedora@emeraldreverie.org>
This commit is contained in:
Greg Sutcliffe 2026-06-04 15:00:12 +01:00
commit 57a760e09c
Signed by: gwmngilfen
SSH key fingerprint: SHA256:dNHcz65ApR68w2TkCIAXDBdt4oNL62Fyx48U7dXWuk0
7 changed files with 113 additions and 32 deletions

View file

@ -55,3 +55,6 @@ rpmeta_hostname: rpmeta.stg.fedoraproject.org
notes: |
Provide the testing environment of copr's backend
This host is the testing environment for the cloud infrastructure of copr's backend
zabbix_macros:
'COPR.FE_URL': copr.stg.fedoraproject.org

View file

@ -41,3 +41,6 @@ aws_ipv6_addr: "2600:1f18:8ee:ae00:66a:fd15:3f16:4092/128"
notes: |
Provide the testing environment of copr's frontend
This host is the testing environment for copr's web interface
zabbix_macros:
'COPR.BE_URL': copr-be-dev.aws.fedoraproject.org

View file

@ -50,6 +50,38 @@ zabbix_export:
value: availability
- tag: team
value: copr
- uuid: 17fdccbe9d4d40ef94d78d5e81965ff5
name: 'Check frontend Copr repo page from backend'
type: ZABBIX_ACTIVE
key: 'web.page.regexp[https://{$COPR.FE_URL}/coprs/g/copr/copr/repo/fedora-rawhide/,,,copr:{$COPR.FE_URL}:group_copr:copr]'
delay: 5m
value_type: CHAR
trends: '0'
preprocessing:
- type: CHECK_NOT_SUPPORTED
parameters:
- '-1'
error_handler: CUSTOM_VALUE
error_handler_params: failing
tags:
- tag: application
value: http
- tag: team
value: copr
triggers:
- uuid: 0b518cd4fc2e4168876cc3f8675f8f40
expression: 'last(/Copr BE checks/web.page.regexp[https://{$COPR.FE_URL}/coprs/g/copr/copr/repo/fedora-rawhide/,,,copr:{$COPR.FE_URL}:group_copr:copr])<>"copr:{$COPR.FE_URL}:group_copr:copr"'
name: 'Copr: {$COPR.FE_URL} does not have correct text'
priority: WARNING
tags:
- tag: scope
value: availability
- tag: team
value: copr
tags:
- tag: team
value: copr
macros:
- macro: '{$COPR.FE_URL}'
value: copr.fedorainfracloud.org
description: 'place to check the Copr frontend'

View file

@ -28,6 +28,77 @@ zabbix_export:
- uuid: 2b463c658f7d4af1a2241ae3a7f0e4da
expression: 'last(/Copr FE checks/copr.cdn)<>"Copr''s CDN (https://download.copr.fedorainfracloud.org/) is UP"'
name: 'COPR CDN Check failed'
priority: WARNING
tags:
- tag: scope
value: availability
- tag: team
value: copr
- uuid: ea3d5049b8ca4472bf6ef1ccc5d3b3e9
name: 'Copr-BE HTTP return code from frontend'
type: HTTP_AGENT
key: copr.http-be
delay: 5m
value_type: CHAR
trends: '0'
description: |
'copr-be.aws.fedoraproject.org' is also apparently 'copr-be.cloud.fedoraproject.org' but both seem intermittent
Same for copr-be-dev.aws.fedoraproject.org too
preprocessing:
- type: CHECK_NOT_SUPPORTED
parameters:
- '-1'
error_handler: CUSTOM_VALUE
error_handler_params: '500'
- type: REGEX
parameters:
- 'HTTP/2 ([0-9]+)'
- \1
error_handler: CUSTOM_VALUE
error_handler_params: '500'
timeout: 15s
url: 'https://{$COPR.BE_URL}'
retrieve_mode: HEADERS
tags:
- tag: application
value: http
- tag: team
value: copr
triggers:
- uuid: 2a4b2dc70c564e5ebf5dda0f933be265
expression: 'count(/Copr FE checks/copr.http-be,#5,"eq",200)<1'
name: 'Copr: {$COPR.BE_URL} return code is not 200 (5 checks)'
priority: WARNING
description: 'This service seems intermitent, so we check if there were less than 1 success in the last 5'
tags:
- tag: scope
value: availability
- tag: team
value: copr
- uuid: 52ffc42446e546c688e0ef4690048741
name: 'Check backend HTTP page from frontend'
type: ZABBIX_ACTIVE
key: 'web.page.regexp[https://{$COPR.BE_URL}/,,,Index of /]'
delay: 5m
value_type: CHAR
trends: '0'
preprocessing:
- type: CHECK_NOT_SUPPORTED
parameters:
- '-1'
error_handler: CUSTOM_VALUE
error_handler_params: failing
tags:
- tag: application
value: http
- tag: team
value: copr
triggers:
- uuid: ab63648fae724a109457b8c6790f401d
expression: 'last(/Copr FE checks/web.page.regexp[https://{$COPR.BE_URL}/,,,Index of /])<>"Index of /"'
name: 'Copr: {$COPR.BE_URL} does not have correct text'
priority: WARNING
tags:
- tag: scope
value: availability
@ -36,3 +107,7 @@ zabbix_export:
tags:
- tag: team
value: copr
macros:
- macro: '{$COPR.BE_URL}'
value: copr-be.aws.fedoraproject.org
description: 'hostname to check backend services on'

View file

@ -1,23 +0,0 @@
define service {
hostgroup_name copr_dist_git_aws
service_description http-copr-be.aws.fedoraproject.org
check_command check_by_nrpe!check_copr_backend
max_check_attempts 8
use websitetemplate
}
# define service {
# hostgroup_name copr_front_aws
# service_description http-copr-dist-git.fedorainfracloud.org
# check_command check_by_nrpe!check_copr_distgit
# max_check_attempts 8
# use websitetemplate
# }
define service {
hostgroup_name copr_back_aws
service_description http-copr.fedorainfracloud.org
check_command check_by_nrpe!check_copr_frontend
max_check_attempts 8
use websitetemplate
}

View file

@ -218,7 +218,6 @@
- name: Copy /etc/nagios/services (internal files)
ansible.builtin.copy: src=nagios/services/{{ item }} dest=/etc/nagios/services/{{ item }}
with_items:
- copr.cfg
- memcached.cfg
- nagios.cfg
- pagure_redis.cfg

View file

@ -18,11 +18,3 @@ define service {
}
{% endif %}
define service {
host_name copr-be
service_description http-download.copr.fedorainfracloud.org
check_command check_website_ssl!download.copr.fedorainfracloud.org!/!Index of /
max_check_attempts 8
use websitetemplate
}