Module: check_mk
Branch: master
Commit: 6e5ea6786b2a0535e4d85b1478297eef7ffdefcc
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=6e5ea6786b2a05…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Tue Dec 9 16:42:38 2014 +0100
#1738 FIX oracle_instance: Be compatible to old oracle agent outputs
---
.werks/1738 | 9 +++++++++
ChangeLog | 1 +
checks/oracle_instance | 10 +++++++++-
3 files changed, 19 insertions(+), 1 deletion(-)
diff --git a/.werks/1738 b/.werks/1738
new file mode 100644
index 0000000..f9ae8c0
--- /dev/null
+++ b/.werks/1738
@@ -0,0 +1,9 @@
+Title: oracle_instance: Be compatible to old oracle agent outputs
+Level: 1
+Component: checks
+Compatible: compat
+Version: 1.2.5i7
+Date: 1418139738
+Class: fix
+
+
diff --git a/ChangeLog b/ChangeLog
index 47e6f17..e8074a8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -156,6 +156,7 @@
* 1735 FIX: oracle_instance: Inventory function deals better with old bogus agent
output
* 1736 FIX: lparstat_aix: Trying to deal with more kind of lparstat output...
* 1737 FIX: mk_sap: Working around garbled SAP state file when multiple instances
were running parallel
+ * 1738 FIX: oracle_instance: Be compatible to old oracle agent outputs
Multisite:
* 1508 Allow input of plugin output and perfdata when faking check results...
diff --git a/checks/oracle_instance b/checks/oracle_instance
index 5607ba3..5f8e108 100644
--- a/checks/oracle_instance
+++ b/checks/oracle_instance
@@ -66,10 +66,18 @@ def check_oracle_instance(item, params, info):
if line[1] == 'FAILURE':
return 2, " ".join(line[2:])
+ state = 0
+
+ # Be compatible to old oracle agent plugin output
+ if len(line) == 6:
+ sid, version, openmode, logins, _unused, _unused2 = line
+ infotext = 'Status %s, Version %s, Logins %s' % (openmode,
version, logins.lower())
+ state, infotext = state_marker(state, infotext, 'logins', logins,
'RESTRICTED')
+ return state, infotext
+
sid, version, openmode, logins, archiver, up_seconds, dbid, \
log_mode, database_role, force_logging, name = line
- state = 0
infotext = "Database Name %s, Status %s" % \
(name, openmode)