> > I'd like to try to implement this, and possibly add app-specific > monitoring of queues afterwards. >
I've made a few changes to Jeremy's proposal, because I wanted to make use of the configuration file that the NRPE plugin already deploys. Attached is my proposed change to the Ansible repo. If that works I'll add more checks later on. A.
diff --git a/roles/nagios_client/tasks/main.yml b/roles/nagios_client/tasks/main.yml index 255b7ebfb..c44f05c79 100644 --- a/roles/nagios_client/tasks/main.yml +++ b/roles/nagios_client/tasks/main.yml @@ -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: diff --git a/roles/nagios_client/templates/rabbitmq_args.cfg.j2 b/roles/nagios_client/templates/rabbitmq_args.cfg.j2 new file mode 100644 index 000000000..ee3078d70 --- /dev/null +++ b/roles/nagios_client/templates/rabbitmq_args.cfg.j2 @@ -0,0 +1,4 @@ +[common] +hostname = localhost +username = nagios-monitoring +password = {{ (env == 'production')|ternary(rabbitmq_monitoring_password_production, rabbitmq_monitoring_password_staging) }} \ No newline at end of file diff --git a/roles/nagios_server/files/nagios/services/rabbitmq.cfg b/roles/nagios_server/files/nagios/services/rabbitmq.cfg new file mode 100644 index 000000000..826af40e9 --- /dev/null +++ b/roles/nagios_server/files/nagios/services/rabbitmq.cfg @@ -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 +} \ No newline at end of file
_______________________________________________ infrastructure mailing list -- infrastructure@lists.fedoraproject.org To unsubscribe send an email to infrastructure-le...@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/infrastructure@lists.fedoraproject.org