diff --git a/nagios/tasks/nagios.yml b/nagios/tasks/nagios.yml index 9e22c50..c47139a 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 2158e1a..22f58df 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$