From 5fe36881db12eb4ba498c749cb310450ce57138d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Arkadiusz=20Mi=C5=9Bkiewicz?= Date: Tue, 11 Dec 2018 13:13:17 +0100 Subject: [PATCH] - rel 2; plugin doesn't monitor bbu by default, so provide separate template command and template for that --- bbu.patch | 39 +++++++++++++++++++++++++++++++++++ nagios-plugin-check_raid.spec | 4 +++- 2 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 bbu.patch diff --git a/bbu.patch b/bbu.patch new file mode 100644 index 0000000..efdc7c3 --- /dev/null +++ b/bbu.patch @@ -0,0 +1,39 @@ +diff -urN nagios-plugin-check_raid-4.0.8.org/check_raid.cfg nagios-plugin-check_raid-4.0.8/check_raid.cfg +--- nagios-plugin-check_raid-4.0.8.org/check_raid.cfg 2017-09-01 20:58:44.000000000 +0200 ++++ nagios-plugin-check_raid-4.0.8/check_raid.cfg 2018-12-11 13:11:45.426546079 +0100 +@@ -5,7 +5,13 @@ + command_line /usr/lib/nagios/plugins/check_raid $ARG1$ + } + +-# service template ++# check_raid_bbu ++define command { ++ command_name check_raid_bbu ++ command_line /usr/lib/nagios/plugins/check_raid --bbu-monitoring $ARG1$ ++} ++ ++# service templates + define service { + use generic-service + name raid +@@ -19,6 +25,20 @@ + check_command check_raid + } + ++define service { ++ use generic-service ++ name raid-bbu ++ service_description raid-bbu ++ register 0 ++ ++ normal_check_interval 30 ++ retry_check_interval 5 ++ notification_interval 3600 ++ ++ check_command check_raid_bbu ++} ++ ++ + # sample check + #define service { + # use raid diff --git a/nagios-plugin-check_raid.spec b/nagios-plugin-check_raid.spec index c269d5b..d6b4050 100644 --- a/nagios-plugin-check_raid.spec +++ b/nagios-plugin-check_raid.spec @@ -5,12 +5,13 @@ Summary: Nagios plugin to check current server's RAID status Name: nagios-plugin-%{plugin} Version: 4.0.8 -Release: 1 +Release: 2 License: GPL v2 Group: Applications Source0: https://github.com/glensc/nagios-plugin-check_raid/archive/%{version}/%{name}-%{version}.tar.gz # Source0-md5: 14165253cd734a1c0bf031b18c4e0794 Patch0: maxcache.patch +Patch1: bbu.patch URL: https://github.com/glensc/nagios-plugin-check_raid BuildRequires: perl-ExtUtils-MakeMaker-CPANfile BuildRequires: perl-Module-Pluggable >= 5.1 @@ -76,6 +77,7 @@ Supports: %setup -qc mv nagios-plugin-check_raid-*/* . %patch0 -p1 +%patch1 -p1 %build # version check exits with "3", here's explanation: -- 2.44.0