From cad791174deaf4fe8b419ed320549414fab28ee1 Mon Sep 17 00:00:00 2001 From: Kevin Fenzi Date: Wed, 21 Jan 2015 00:07:25 +0000 Subject: [PATCH] Add some checks that are needed on the proxies --- roles/nagios_client/tasks/main.yml | 11 +++++++++++ .../templates/check_happroxy_conns.cfg.j2 | 1 + .../nagios_client/templates/check_varnish_proc.cfg.j2 | 1 + 3 files changed, 13 insertions(+) create mode 100644 roles/nagios_client/templates/check_happroxy_conns.cfg.j2 create mode 100644 roles/nagios_client/templates/check_varnish_proc.cfg.j2 diff --git a/roles/nagios_client/tasks/main.yml b/roles/nagios_client/tasks/main.yml index aa9b6c2223..5444cd4e22 100644 --- a/roles/nagios_client/tasks/main.yml +++ b/roles/nagios_client/tasks/main.yml @@ -133,6 +133,17 @@ tags: - nagios_client +- name: install nrpe checks for proxies + template: src={{ item }}.j2 dest=/etc/nrpe.d/{{ item }} + with_items: + - check_happroxy_conns.cfg + - check_varnish_proc.cfg + when: inventory_hostname.startswith('proxy') + notify: + - restart nrpe + tags: + - nagios_client + - name: nrpe service start service: name=nrpe state=running enabled=true tags: diff --git a/roles/nagios_client/templates/check_happroxy_conns.cfg.j2 b/roles/nagios_client/templates/check_happroxy_conns.cfg.j2 new file mode 100644 index 0000000000..381d2b25a5 --- /dev/null +++ b/roles/nagios_client/templates/check_happroxy_conns.cfg.j2 @@ -0,0 +1 @@ +command[check_haproxy_conns]=/usr/lib64/nagios/plugins/check_haproxy_conns.py diff --git a/roles/nagios_client/templates/check_varnish_proc.cfg.j2 b/roles/nagios_client/templates/check_varnish_proc.cfg.j2 new file mode 100644 index 0000000000..3935c16e5a --- /dev/null +++ b/roles/nagios_client/templates/check_varnish_proc.cfg.j2 @@ -0,0 +1 @@ +command[check_varnish_proc]=/usr/lib64/nagios/plugins/check_procs -c 1:2 -C 'varnishd' -u varnish