copr: add nagios checks for copr servers

This commit is contained in:
Silvie Chlupova 2022-01-21 12:42:18 +01:00
parent 60cc37ecd0
commit ba86e27e79
9 changed files with 44 additions and 53 deletions

View file

@ -2,15 +2,6 @@
- name: install nrpe
dnf: name=nrpe state=present
- name: install nrpe checks
template: src=copr_backend_nrpe.cfg
dest=/etc/nrpe.d/copr_backend_nrpe.cfg
notify:
- restart nrpe
tags:
- nagios_client
- copr_ping
- name: set acl for nrpe on /etc/copr
acl: name=/etc/copr entity=nrpe etype=user permissions=rx state=present

View file

@ -1 +0,0 @@
command[check_copr_ping]=/usr/bin/copr-ping-check.py

View file

@ -117,5 +117,15 @@
- name: start node exporter
service: state=started enabled=yes name=node_exporter
- name: install nrpe checks
template: src=copr_nrpe.cfg
dest=/etc/nrpe.d/copr_nrpe.cfg
notify:
- restart nrpe
tags:
- nagios_client
- copr_cdn
- copr_ping
# - name: enable and run logrotate service
# service: name="logrotate" state=started

View file

@ -0,0 +1,6 @@
command[check_copr_ping]=/usr/bin/copr-ping-check.py
command[check_copr_cdn]=/usr/bin/copr-cdn-check.py
command[check_copr_backend]=/usr/lib64/nagios/plugins/check_http -H copr-be.aws.fedoraproject.org --ssl
command[check_copr_distgit]=/usr/lib64/nagios/plugins/check_http -w 30 -c 40 --ssl --sni -H copr-dist-git.fedorainfracloud.org -u '/cgit/' -s 'Git repository browser'
command[check_copr_frontend]=/usr/lib64/nagios/plugins/check_http -w 30 -c 40 --ssl --sni -H copr.fedorainfracloud.org -u '/' -s 'Copr hosts'

View file

@ -177,15 +177,6 @@
- name: install nrpe
dnf: name=nrpe state=present
- name: install nrpe checks
template: src=copr_frontend_nrpe.cfg
dest=/etc/nrpe.d/copr_frontend_nrpe.cfg
notify:
- restart nrpe
tags:
- nagios_client
- copr_cdn
- name: install the check script
template:
dest: "/usr/bin/copr-cdn-check.py"

View file

@ -1 +0,0 @@
command[check_copr_cdn]=/usr/bin/copr-cdn-check.py

View file

@ -51,11 +51,6 @@ define command{
command_line $USER1$/check_http -w 30 -c 40 -I $HOSTADDRESS$ -H $ARG1$ -u "$ARG2$" -s "$ARG3$" -f follow
}
define command{
command_name check_website_follow_ssl
command_line $USER1$/check_http -w 30 -c 40 --ssl --sni -I $HOSTADDRESS$ -H $ARG1$ -u "$ARG2$" -s "$ARG3$" -f follow
}
define command{
command_name check_website_ppc
command_line $USER1$/check_http -w 300 -c 400 -I $HOSTADDRESS$ -H $ARG1$ -u "$ARG2$" -s "$ARG3$"

View file

@ -40,26 +40,26 @@ define service {
use defaulttemplate
}
#define service {
# hostgroup_name copr_dist_git_aws
# service_description http-copr-be.aws.fedoraproject.org
# check_command check_https!copr-be.aws.fedoraproject.org
# max_check_attempts 8
# use websitetemplate
#}
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_website_ssl!copr-dist-git.fedorainfracloud.org!/cgit/!Git repository browser
# 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_website_ssl!copr.fedorainfracloud.org!Copr hosts
# 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

@ -336,10 +336,10 @@ define service {
{% endif %}
#define service {
# hostgroup_name proxies
# service_description http-download.copr.fedorainfracloud.org
# check_command check_website_follow_ssl!download.copr.fedorainfracloud.org!Index of /
# max_check_attempts 8
# use websitetemplate
#}
define service {
hostgroup_name proxies
service_description http-download.copr.fedorainfracloud.org
check_command check_website_ssl!download.copr.fedorainfracloud.org!/!Index of /
max_check_attempts 8
use websitetemplate
}