Module: check_mk
Branch: master
Commit: 578eb89a04480f14170482a725b01703822148f2
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=578eb89a04480f…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Mon May 11 10:37:50 2015 +0200
#2267 FIX mk_db2.aix agent plugin: no longer throws an error when a db2 profile is not set
up properly
An invalid set up instance will be skipped.
---
.werks/2267 | 9 +++++++++
ChangeLog | 1 +
agents/plugins/mk_db2.aix | 8 +++++++-
3 files changed, 17 insertions(+), 1 deletion(-)
diff --git a/.werks/2267 b/.werks/2267
new file mode 100644
index 0000000..846160e
--- /dev/null
+++ b/.werks/2267
@@ -0,0 +1,9 @@
+Title: mk_db2.aix agent plugin: no longer throws an error when a db2 profile is not set
up properly
+Level: 1
+Component: checks
+Compatible: compat
+Version: 1.2.7i1
+Date: 1431333222
+Class: fix
+
+An invalid set up instance will be skipped.
diff --git a/ChangeLog b/ChangeLog
index 82eb071..1ff75a4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -358,6 +358,7 @@
* 1245 FIX: printer_output: Now correctly detect a bin with unknown as name
* 2265 FIX: db2_version: improved check output when version information is
missing...
* 2266 FIX: windows agent: fixed invalid agent output if system memory exceeds 2TB
RAM...
+ * 2267 FIX: mk_db2.aix agent plugin: no longer throws an error when a db2 profile is
not set up properly...
Multisite:
* 1758 Improved exception hander: Shows details without additional debug request,
added mailto link for error report...
diff --git a/agents/plugins/mk_db2.aix b/agents/plugins/mk_db2.aix
index 26f962a..fd47b35 100755
--- a/agents/plugins/mk_db2.aix
+++ b/agents/plugins/mk_db2.aix
@@ -61,7 +61,13 @@ function query_instances {
waitmax 20 << WAITMAX
su $INSTANCE << EOF
- . $HOMEDIR/sqllib/db2profile 2>&1 > /dev/null;
+
+ if [ ! -f $HOMEDIR/sqllib/db2profile ] ;
+ then
+ exit 0
+ fi
+
+ . $HOMEDIR/sqllib/db2profile >/dev/null 2>&1 ;
function compare_version_greater_equal {