Add a RabbitMQ check on the cluster

Signed-off-by: Aurélien Bompard <aurelien@bompard.org>
This commit is contained in:
Aurélien Bompard 2019-08-01 17:51:14 +02:00 committed by Pierre-Yves Chibon
parent 4b95bc7e33
commit e7ab522de3
3 changed files with 25 additions and 0 deletions

View file

@ -233,6 +233,21 @@
tags:
- nagios_client
- name: install nrpe checks for the RabbitMQ cluster
template:
src: "{{ item }}.j2"
dest: "/etc/nrpe.d/{{ item }}"
owner: root
group: root
mode: 0600
with_items:
- rabbitmq_args.cfg
when: inventory_hostname.startswith('rabbitmq')
notify:
- restart nrpe
tags:
- nagios_client
- name: nrpe service start
service: name=nrpe state=started enabled=true
tags:

View file

@ -0,0 +1,4 @@
[common]
hostname = localhost
username = nagios-monitoring
password = {{ (env == 'production')|ternary(rabbitmq_monitoring_password_production, rabbitmq_monitoring_password_staging) }}

View file

@ -0,0 +1,6 @@
define service {
host_name rabbitmq01.phx2.fedoraproject.org
service_description Check bus server processes
check_command check_by_nrpe!check_rabbitmq_server!common@/etc/nrpe.d/rabbitmq_args.cfg
use defaulttemplate
}