[packages/nagios-plugin-check_megaraid_sas] Added a patch from comments on the plugin page
jajcus
jajcus at pld-linux.org
Mon Dec 10 13:48:39 CET 2012
commit 5c56d0d07eea914bc36bab04cb17d33c3c174b2d
Author: Jacek Konieczny <j.konieczny at eggsoft.pl>
Date: Mon Dec 10 13:47:46 2012 +0100
Added a patch from comments on the plugin page
from the comment on this patch:
> However there is a bug preventing the accurate report of array size
> when the strip size is reported in MB.
check_megaraid_sas-size.patch | 13 +++++++++++++
nagios-plugin-check_megaraid_sas.spec | 2 ++
2 files changed, 15 insertions(+)
---
diff --git a/nagios-plugin-check_megaraid_sas.spec b/nagios-plugin-check_megaraid_sas.spec
index 3c2da6f..1a8e83f 100644
--- a/nagios-plugin-check_megaraid_sas.spec
+++ b/nagios-plugin-check_megaraid_sas.spec
@@ -9,6 +9,7 @@ Group: Networking
# http://exchange.nagios.org/components/com_mtree/attachment.php?link_id=680&cf_id=24
Source0: check_megaraid_sas
Patch0: bbu.patch
+Patch1: check_megaraid_sas-size.patch
URL: http://exchange.nagios.org/directory/Plugins/Hardware/Storage-Systems/RAID-Controllers/check_megaraid_sas/details
Requires: megacli-sas
Requires: nagios-core
@@ -34,6 +35,7 @@ install %{SOURCE0} %{plugin}
%{__sed} -i -e 's#/usr/sbin/MegaCli#/sbin/MegaCli#g' %{plugin}
%patch0 -p0
+%patch1 -p1
cat > nagios.cfg <<'EOF'
# Usage:
diff --git a/check_megaraid_sas-size.patch b/check_megaraid_sas-size.patch
new file mode 100644
index 0000000..5747740
--- /dev/null
+++ b/check_megaraid_sas-size.patch
@@ -0,0 +1,13 @@
+diff -dur nagios-plugin-check_megaraid_sas-12.orig/check_megaraid_sas nagios-plugin-check_megaraid_sas-12/check_megaraid_sas
+--- nagios-plugin-check_megaraid_sas-12.orig/check_megaraid_sas 2012-12-10 13:45:30.000000000 +0100
++++ nagios-plugin-check_megaraid_sas-12/check_megaraid_sas 2012-12-10 13:46:27.000000000 +0100
+@@ -183,7 +183,7 @@
+ my $consistency_output = '';
+ my ($size, $unit, $raidlevel, $ldpdcount, $state, $spandepth, $consistency_percent, $consistency_minutes);
+ while (<LDINFO>) {
+- if ( m/Size\s*:\s*((\d+\.?\d*)\s*(MB|GB|TB))/ ) {
++ if ( m/^Size\s*:\s*((\d+\.?\d*)\s*(MB|GB|TB))/ ) {
+ $size = $2;
+ $unit = $3;
+ # Adjust MB to GB if that's what we got
+
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/nagios-plugin-check_megaraid_sas.git/commitdiff/5c56d0d07eea914bc36bab04cb17d33c3c174b2d
More information about the pld-cvs-commit
mailing list