From 19312f9b551340a800ba417dde0bbea2cfd98d3f Mon Sep 17 00:00:00 2001 From: Pall Sigurdsson Date: Thu, 30 Jan 2014 11:32:31 +0000 Subject: [PATCH 1/9] msa packaging --- check_msa_hardware-pl/nagios-okplugin-check_msa.spec | 10 ++++++++-- rel-eng/packages/nagios-okplugin-check_storwize | 1 + 2 files changed, 9 insertions(+), 2 deletions(-) create mode 100644 rel-eng/packages/nagios-okplugin-check_storwize diff --git a/check_msa_hardware-pl/nagios-okplugin-check_msa.spec b/check_msa_hardware-pl/nagios-okplugin-check_msa.spec index 5e18240..046820b 100644 --- a/check_msa_hardware-pl/nagios-okplugin-check_msa.spec +++ b/check_msa_hardware-pl/nagios-okplugin-check_msa.spec @@ -1,10 +1,10 @@ %define debug_package %{nil} -%define plugin check_storwize +%define plugin check_msa_hardware %define packager Pall Sigurdsson Summary: A Nagios plugin to check status of an MSA (HP P2000) disk array Name: nagios-okplugin-%{plugin} -Version: 1.0.0 +Version: 1.0.2 Release: 1%{?dist} License: GPLv3+ Group: Applications/System @@ -46,5 +46,11 @@ rm -rf %{buildroot} %config(noreplace) %{_sysconfdir}/nrpe.d/%{plugin}.cfg %changelog +* Thu Jan 30 2014 Pall Sigurdsson 1.0.2-1 +- new package built with tito + +* Thu Jan 30 2014 Unknown name 1.0.1-1 +- new package built with tito + * Fri Jan 27 2014 Pall Sigurdsson 1.0.0-1 - Initial Packaging diff --git a/rel-eng/packages/nagios-okplugin-check_storwize b/rel-eng/packages/nagios-okplugin-check_storwize new file mode 100644 index 0000000..29022dc --- /dev/null +++ b/rel-eng/packages/nagios-okplugin-check_storwize @@ -0,0 +1 @@ +1.0.1-1 check_msa_hardware-pl/ From 623c1d51596952be0a626d4fb6003e5a759a7829 Mon Sep 17 00:00:00 2001 From: Pall Sigurdsson Date: Thu, 30 Jan 2014 11:32:35 +0000 Subject: [PATCH 2/9] Automatic commit of package [nagios-okplugin-check_msa_hardware] release [1.0.3-1]. --- check_msa_hardware-pl/nagios-okplugin-check_msa.spec | 5 ++++- rel-eng/packages/nagios-okplugin-check_msa_hardware | 1 + rel-eng/packages/nagios-okplugin-check_storwize | 1 - 3 files changed, 5 insertions(+), 2 deletions(-) create mode 100644 rel-eng/packages/nagios-okplugin-check_msa_hardware delete mode 100644 rel-eng/packages/nagios-okplugin-check_storwize diff --git a/check_msa_hardware-pl/nagios-okplugin-check_msa.spec b/check_msa_hardware-pl/nagios-okplugin-check_msa.spec index 046820b..d925277 100644 --- a/check_msa_hardware-pl/nagios-okplugin-check_msa.spec +++ b/check_msa_hardware-pl/nagios-okplugin-check_msa.spec @@ -4,7 +4,7 @@ Summary: A Nagios plugin to check status of an MSA (HP P2000) disk array Name: nagios-okplugin-%{plugin} -Version: 1.0.2 +Version: 1.0.3 Release: 1%{?dist} License: GPLv3+ Group: Applications/System @@ -46,6 +46,9 @@ rm -rf %{buildroot} %config(noreplace) %{_sysconfdir}/nrpe.d/%{plugin}.cfg %changelog +* Thu Jan 30 2014 Pall Sigurdsson 1.0.3-1 +- new package built with tito + * Thu Jan 30 2014 Pall Sigurdsson 1.0.2-1 - new package built with tito diff --git a/rel-eng/packages/nagios-okplugin-check_msa_hardware b/rel-eng/packages/nagios-okplugin-check_msa_hardware new file mode 100644 index 0000000..4ca3b03 --- /dev/null +++ b/rel-eng/packages/nagios-okplugin-check_msa_hardware @@ -0,0 +1 @@ +1.0.3-1 check_msa_hardware-pl/ diff --git a/rel-eng/packages/nagios-okplugin-check_storwize b/rel-eng/packages/nagios-okplugin-check_storwize deleted file mode 100644 index 29022dc..0000000 --- a/rel-eng/packages/nagios-okplugin-check_storwize +++ /dev/null @@ -1 +0,0 @@ -1.0.1-1 check_msa_hardware-pl/ From 734e7d5596f702226b7c49173893f57369b95723 Mon Sep 17 00:00:00 2001 From: Your Name Date: Thu, 30 Jan 2014 15:33:30 +0000 Subject: [PATCH 3/9] rename check_msa_hardware-pl --- .../{check_msa_hardware-pl => check_msa_hardware} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename check_msa_hardware-pl/{check_msa_hardware-pl => check_msa_hardware} (100%) diff --git a/check_msa_hardware-pl/check_msa_hardware-pl b/check_msa_hardware-pl/check_msa_hardware similarity index 100% rename from check_msa_hardware-pl/check_msa_hardware-pl rename to check_msa_hardware-pl/check_msa_hardware From 2dbec0628294c33259e5077506e97485b4402260 Mon Sep 17 00:00:00 2001 From: Your Name Date: Thu, 30 Jan 2014 15:47:04 +0000 Subject: [PATCH 4/9] nrpe.d added to check_msa --- check_msa_hardware-pl/nrpe.d/check_msa_hardware.cfg | 1 + 1 file changed, 1 insertion(+) create mode 100644 check_msa_hardware-pl/nrpe.d/check_msa_hardware.cfg diff --git a/check_msa_hardware-pl/nrpe.d/check_msa_hardware.cfg b/check_msa_hardware-pl/nrpe.d/check_msa_hardware.cfg new file mode 100644 index 0000000..3f242b5 --- /dev/null +++ b/check_msa_hardware-pl/nrpe.d/check_msa_hardware.cfg @@ -0,0 +1 @@ +command[check_msa_hardware]=/usr/lib64/nagios/plugins/check_msa_hardware From a93d887721abb462c57d92580d5e062ff4f023be Mon Sep 17 00:00:00 2001 From: Your Name Date: Thu, 30 Jan 2014 15:53:12 +0000 Subject: [PATCH 5/9] README.md added --- check_msa_hardware-pl/README.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 check_msa_hardware-pl/README.md diff --git a/check_msa_hardware-pl/README.md b/check_msa_hardware-pl/README.md new file mode 100644 index 0000000..a1729f5 --- /dev/null +++ b/check_msa_hardware-pl/README.md @@ -0,0 +1 @@ +Checks hardware status of MSA disk arrays also known as HP P2000 From 156459046c69fa3f60007d29c23f8c44ffce5961 Mon Sep 17 00:00:00 2001 From: Pall Sigurdsson Date: Thu, 30 Jan 2014 16:04:50 +0000 Subject: [PATCH 6/9] Automatic commit of package [nagios-okplugin-check_msa_hardware] release [1.0.4-1]. --- check_msa_hardware-pl/nagios-okplugin-check_msa.spec | 7 ++++++- rel-eng/packages/nagios-okplugin-check_msa_hardware | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/check_msa_hardware-pl/nagios-okplugin-check_msa.spec b/check_msa_hardware-pl/nagios-okplugin-check_msa.spec index d925277..929e286 100644 --- a/check_msa_hardware-pl/nagios-okplugin-check_msa.spec +++ b/check_msa_hardware-pl/nagios-okplugin-check_msa.spec @@ -4,7 +4,7 @@ Summary: A Nagios plugin to check status of an MSA (HP P2000) disk array Name: nagios-okplugin-%{plugin} -Version: 1.0.3 +Version: 1.0.4 Release: 1%{?dist} License: GPLv3+ Group: Applications/System @@ -46,6 +46,11 @@ rm -rf %{buildroot} %config(noreplace) %{_sysconfdir}/nrpe.d/%{plugin}.cfg %changelog +* Thu Jan 30 2014 Pall Sigurdsson 1.0.4-1 +- README.md added (you@example.com) +- nrpe.d added to check_msa (you@example.com) +- rename check_msa_hardware-pl (you@example.com) + * Thu Jan 30 2014 Pall Sigurdsson 1.0.3-1 - new package built with tito diff --git a/rel-eng/packages/nagios-okplugin-check_msa_hardware b/rel-eng/packages/nagios-okplugin-check_msa_hardware index 4ca3b03..6cdec48 100644 --- a/rel-eng/packages/nagios-okplugin-check_msa_hardware +++ b/rel-eng/packages/nagios-okplugin-check_msa_hardware @@ -1 +1 @@ -1.0.3-1 check_msa_hardware-pl/ +1.0.4-1 check_msa_hardware-pl/ From 9b2474fb498eb5f6aa319d0189374edb1dd8b2d9 Mon Sep 17 00:00:00 2001 From: Pall Sigurdsson Date: Thu, 30 Jan 2014 16:07:10 +0000 Subject: [PATCH 7/9] Automatic commit of package [nagios-okplugin-check_msa_hardware] release [1.0.5-1]. --- check_msa_hardware-pl/nagios-okplugin-check_msa.spec | 5 ++++- rel-eng/packages/nagios-okplugin-check_msa_hardware | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/check_msa_hardware-pl/nagios-okplugin-check_msa.spec b/check_msa_hardware-pl/nagios-okplugin-check_msa.spec index 929e286..f1e6baf 100644 --- a/check_msa_hardware-pl/nagios-okplugin-check_msa.spec +++ b/check_msa_hardware-pl/nagios-okplugin-check_msa.spec @@ -4,7 +4,7 @@ Summary: A Nagios plugin to check status of an MSA (HP P2000) disk array Name: nagios-okplugin-%{plugin} -Version: 1.0.4 +Version: 1.0.5 Release: 1%{?dist} License: GPLv3+ Group: Applications/System @@ -46,6 +46,9 @@ rm -rf %{buildroot} %config(noreplace) %{_sysconfdir}/nrpe.d/%{plugin}.cfg %changelog +* Thu Jan 30 2014 Pall Sigurdsson 1.0.5-1 +- + * Thu Jan 30 2014 Pall Sigurdsson 1.0.4-1 - README.md added (you@example.com) - nrpe.d added to check_msa (you@example.com) diff --git a/rel-eng/packages/nagios-okplugin-check_msa_hardware b/rel-eng/packages/nagios-okplugin-check_msa_hardware index 6cdec48..9d68601 100644 --- a/rel-eng/packages/nagios-okplugin-check_msa_hardware +++ b/rel-eng/packages/nagios-okplugin-check_msa_hardware @@ -1 +1 @@ -1.0.4-1 check_msa_hardware-pl/ +1.0.5-1 check_msa_hardware-pl/ From 04d25281e3be71ad550318267028122de20dccfe Mon Sep 17 00:00:00 2001 From: gitmopp Date: Thu, 30 Jan 2014 17:36:33 +0100 Subject: [PATCH 8/9] Fixed output to be more compatible My SSSU 10.1.0 reports "SSSU for HP P6000 Command View" instead of "SSSU for HP StorageWorks Command View EVA". I fixed the output to just check for SSSU for HP --- check_eva/check_eva.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/check_eva/check_eva.py b/check_eva/check_eva.py index 333b2de..12cfeaf 100644 --- a/check_eva/check_eva.py +++ b/check_eva/check_eva.py @@ -49,7 +49,7 @@ timeout = 0 # 0 means no timeout server_side_troubleshooting = False # No real need to change anything below here -version = "1.0" +version = "1.0.1" ok = 0 warning = 1 critical = 2 @@ -239,15 +239,15 @@ def run_sssu(system=None, command="ls system full"): if output.pop(0).strip() != '': error = 1 if output.pop(0).strip() != '': - error = 1 - if output.pop(0).strip() != 'SSSU for HP StorageWorks Command View EVA': - error = 1 + error = 2 + if output.pop(0).strip().find('SSSU for HP') != 0: + error = 3 if output.pop(0).strip().find('Version:') != 0: - error = 1 + error = 4 if output.pop(0).strip().find('Build:') != 0: - error = 1 + error = 5 if output.pop(0).strip().find('NoSystemSelected> ') != 0: - error = 1 + error = 6 #if output.pop(0).strip() != '': error = 1 #if output.pop(0).strip().find('NoSystemSelected> ') != 0: error=1 #if output.pop(0).strip() != '': error = 1 @@ -260,7 +260,7 @@ def run_sssu(system=None, command="ls system full"): if i.find('information:') > 0: break if error > 0: - print "Error running the sssu command" + print "Error running the sssu command: " + str(error) print commandstring print str_buffer exit(unknown) From b672f6f508a6b7e666b3d3a5cab9c8a962aac388 Mon Sep 17 00:00:00 2001 From: gitmopp Date: Fri, 31 Jan 2014 15:06:04 +0100 Subject: [PATCH 9/9] bug in for loop. Looped only once --- check_eva/check_eva.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/check_eva/check_eva.py b/check_eva/check_eva.py index 333b2de..2356ac8 100644 --- a/check_eva/check_eva.py +++ b/check_eva/check_eva.py @@ -572,7 +572,7 @@ def check_generic(command="ls disk full", namefield="objectname", perfdata_field if i.has_key(x): longoutput("- %s = %s\n" % (x, i[x])) - end(summary, perfdata, longserviceoutput, nagios_state) + end(summary, perfdata, longserviceoutput, nagios_state) def check_multiple_objects(my_object, name):