copr: add nagios checks for copr servers
This commit is contained in:
parent
60cc37ecd0
commit
ba86e27e79
9 changed files with 44 additions and 53 deletions
|
@ -2,15 +2,6 @@
|
||||||
- name: install nrpe
|
- name: install nrpe
|
||||||
dnf: name=nrpe state=present
|
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
|
- name: set acl for nrpe on /etc/copr
|
||||||
acl: name=/etc/copr entity=nrpe etype=user permissions=rx state=present
|
acl: name=/etc/copr entity=nrpe etype=user permissions=rx state=present
|
||||||
|
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
command[check_copr_ping]=/usr/bin/copr-ping-check.py
|
|
|
@ -117,5 +117,15 @@
|
||||||
- name: start node exporter
|
- name: start node exporter
|
||||||
service: state=started enabled=yes name=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
|
# - name: enable and run logrotate service
|
||||||
# service: name="logrotate" state=started
|
# service: name="logrotate" state=started
|
||||||
|
|
6
roles/copr/base/templates/copr_nrpe.cfg
Normal file
6
roles/copr/base/templates/copr_nrpe.cfg
Normal 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'
|
||||||
|
|
|
@ -177,15 +177,6 @@
|
||||||
- name: install nrpe
|
- name: install nrpe
|
||||||
dnf: name=nrpe state=present
|
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
|
- name: install the check script
|
||||||
template:
|
template:
|
||||||
dest: "/usr/bin/copr-cdn-check.py"
|
dest: "/usr/bin/copr-cdn-check.py"
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
command[check_copr_cdn]=/usr/bin/copr-cdn-check.py
|
|
|
@ -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
|
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{
|
define command{
|
||||||
command_name check_website_ppc
|
command_name check_website_ppc
|
||||||
command_line $USER1$/check_http -w 300 -c 400 -I $HOSTADDRESS$ -H $ARG1$ -u "$ARG2$" -s "$ARG3$"
|
command_line $USER1$/check_http -w 300 -c 400 -I $HOSTADDRESS$ -H $ARG1$ -u "$ARG2$" -s "$ARG3$"
|
||||||
|
|
|
@ -40,26 +40,26 @@ define service {
|
||||||
use defaulttemplate
|
use defaulttemplate
|
||||||
}
|
}
|
||||||
|
|
||||||
#define service {
|
define service {
|
||||||
# hostgroup_name copr_dist_git_aws
|
hostgroup_name copr_dist_git_aws
|
||||||
# service_description http-copr-be.aws.fedoraproject.org
|
service_description http-copr-be.aws.fedoraproject.org
|
||||||
# check_command check_https!copr-be.aws.fedoraproject.org
|
check_command check_by_nrpe!check_copr_backend
|
||||||
# max_check_attempts 8
|
max_check_attempts 8
|
||||||
# use websitetemplate
|
use websitetemplate
|
||||||
#}
|
}
|
||||||
|
|
||||||
#define service {
|
define service {
|
||||||
# hostgroup_name copr_front_aws
|
hostgroup_name copr_front_aws
|
||||||
# service_description http-copr-dist-git.fedorainfracloud.org
|
service_description http-copr-dist-git.fedorainfracloud.org
|
||||||
# check_command check_website_ssl!copr-dist-git.fedorainfracloud.org!/cgit/!Git repository browser
|
check_command check_by_nrpe!check_copr_distgit
|
||||||
# max_check_attempts 8
|
max_check_attempts 8
|
||||||
# use websitetemplate
|
use websitetemplate
|
||||||
#}
|
}
|
||||||
|
|
||||||
#define service {
|
define service {
|
||||||
# hostgroup_name copr_back_aws
|
hostgroup_name copr_back_aws
|
||||||
# service_description http-copr.fedorainfracloud.org
|
service_description http-copr.fedorainfracloud.org
|
||||||
# check_command check_website_ssl!copr.fedorainfracloud.org!Copr hosts
|
check_command check_by_nrpe!check_copr_frontend
|
||||||
# max_check_attempts 8
|
max_check_attempts 8
|
||||||
# use websitetemplate
|
use websitetemplate
|
||||||
#}
|
}
|
||||||
|
|
|
@ -336,10 +336,10 @@ define service {
|
||||||
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
#define service {
|
define service {
|
||||||
# hostgroup_name proxies
|
hostgroup_name proxies
|
||||||
# service_description http-download.copr.fedorainfracloud.org
|
service_description http-download.copr.fedorainfracloud.org
|
||||||
# check_command check_website_follow_ssl!download.copr.fedorainfracloud.org!Index of /
|
check_command check_website_ssl!download.copr.fedorainfracloud.org!/!Index of /
|
||||||
# max_check_attempts 8
|
max_check_attempts 8
|
||||||
# use websitetemplate
|
use websitetemplate
|
||||||
#}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue