Module: check_mk
Branch: master
Commit: 31eba3f247e17f87f419f3039901cf5b31609225
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=31eba3f247e17f…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Wed Jan 20 16:06:14 2016 +0100
#2908 FIX oracle_locks: Fixed handling of ORA- errors as sent from e.g. older AIX agents
---
.werks/2908 | 9 +++++++++
ChangeLog | 1 +
checks/oracle_locks | 8 +++++++-
3 files changed, 17 insertions(+), 1 deletion(-)
diff --git a/.werks/2908 b/.werks/2908
new file mode 100644
index 0000000..ec89990
--- /dev/null
+++ b/.werks/2908
@@ -0,0 +1,9 @@
+Title: oracle_locks: Fixed handling of ORA- errors as sent from e.g. older AIX agents
+Level: 1
+Component: checks
+Compatible: compat
+Version: 1.2.7i4
+Date: 1453301932
+Class: fix
+
+
diff --git a/ChangeLog b/ChangeLog
index a2e7472..6448029 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -194,6 +194,7 @@
* 2927 FIX: Fix links to logwatch logfiles in case of several special characters in
the name...
* 2891 FIX: mcafee_av_client: fixed wrong params handling after WATO configuration
* 2907 FIX: chrony: Fixed exception in discovery function when daemon is not running
+ * 2908 FIX: oracle_locks: Fixed handling of ORA- errors as sent from e.g. older AIX
agents
Multisite:
* 2684 Added icons for downloading agent data / walks of hosts...
diff --git a/checks/oracle_locks b/checks/oracle_locks
index 59fe9a1..84ebafa 100644
--- a/checks/oracle_locks
+++ b/checks/oracle_locks
@@ -44,8 +44,14 @@ def check_oracle_locks(item, params, info):
for line in info:
warn, crit = params["levels"]
- if line[0] == item and line[1] <> '':
+ # Skip over line before ORA- errors (e.g. sent by AIX agent from 2014)
+ if line == ["ERROR:"]:
+ continue
+ if line[0].startswith('ORA-'):
+ return (3, 'Found error in agent output "%s"' % '
'.join(line))
+
+ if line[0] == item and line[1] != '':
sid, sidnr, serial, machine, program, process, osuser, ctime, \
object_owner, object_name = line