From 97c76be1d37c77eb6f1b8e8fbdee1e2e55cbce44 Mon Sep 17 00:00:00 2001 From: Andrea Dell'Amico Date: Wed, 10 Feb 2016 13:41:07 +0100 Subject: [PATCH] library/roles/nagios/templates/common-nrpe.cfg.j2: Use the check_raid plugin. nemis-xen/group_vars/dom0-dell/main.yml: Special case for the Dell hardware when the distribution is debian. --- nagios/tasks/nagios.yml | 3 +-- nagios/templates/common-nrpe.cfg.j2 | 6 +++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/nagios/tasks/nagios.yml b/nagios/tasks/nagios.yml index 9e22c50f..c47139ad 100644 --- a/nagios/tasks/nagios.yml +++ b/nagios/tasks/nagios.yml @@ -8,8 +8,7 @@ - name: debian 6 has additional nagios plugins apt: pkg={{ item }} state=installed with_items: nagios_plugins_contrib - when: is_debian6 - tags: nagios + tags: [ 'nagios', 'nagios_plug_contrib' ] - name: Create the directory where our local plugins are installed file: path={{ nagios_isti_plugdir }} state=directory diff --git a/nagios/templates/common-nrpe.cfg.j2 b/nagios/templates/common-nrpe.cfg.j2 index 2158e1ae..22f58df7 100644 --- a/nagios/templates/common-nrpe.cfg.j2 +++ b/nagios/templates/common-nrpe.cfg.j2 @@ -24,7 +24,11 @@ command[global_check_system_pp]={{ nagios_isti_plugdir }}/check_system_pp # Linux RAID check #command[global_check_linux_raid]={{ nagios_isti_plugdir }}/check_linux_raid -command[global_check_linux_raid]={{ nagios_isti_plugdir }}/check_raid +{% if nagios_soft_raid_mdstat is defined and nagios_soft_raid_mdstat %} +command[global_check_linux_raid]={{ nagios_plugins_dir }}/check_raid -p mdstat +{% else %} +command[global_check_linux_raid]={{ nagios_plugins_dir }}/check_raid +{% endif %} # Disks S.M.A.R.T. check command[global_check_smart]={{ nagios_isti_plugdir }}/check_smart -d $ARG1$ -i $ARG2$