Module: check_mk
Branch: master
Commit: 10ff6ead79674fb6ed8ca7657e0a2c1a2ba1ec76
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=10ff6ead79674f…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Tue Dec 9 15:23:59 2014 +0100
#1735 FIX oracle_instance: Inventory function deals better with old bogus agent output
---
.werks/1735 | 9 +++++++++
ChangeLog | 1 +
checks/oracle_instance | 8 ++++++--
3 files changed, 16 insertions(+), 2 deletions(-)
diff --git a/.werks/1735 b/.werks/1735
new file mode 100644
index 0000000..4cf49d1
--- /dev/null
+++ b/.werks/1735
@@ -0,0 +1,9 @@
+Title: oracle_instance: Inventory function deals better with old bogus agent output
+Level: 1
+Component: checks
+Compatible: compat
+Version: 1.2.5i7
+Date: 1418135014
+Class: fix
+
+
diff --git a/ChangeLog b/ChangeLog
index a89671d..4a30051 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -153,6 +153,7 @@
* 1747 FIX: zfsget: try to speed up agent code for Linux/Solaris/FreeBSD by using -t
filesystem,volume...
* 1659 FIX: windows agent: fixed output of 64 bit performance counters...
* 1748 FIX: win_dhcp_pools: fix naming of WATO rules and informal WARN/CRIT levels in
performance data
+ * 1735 FIX: oracle_instance: Inventory function deals better with old bogus agent
output
Multisite:
* 1508 Allow input of plugin output and perfdata when faking check results...
diff --git a/checks/oracle_instance b/checks/oracle_instance
index d814312..5607ba3 100644
--- a/checks/oracle_instance
+++ b/checks/oracle_instance
@@ -38,7 +38,12 @@ factory_settings["oracle_instance_defaults"] = {
def inventory_oracle_instance(info):
- return [ (line[0], {} ) for line in info ]
+ # Skip ORA- error messages from broken old oracle agent
+ # <<<oracle_instance:sep(124)>>>
+ # ORA-99999 tnsping failed for +ASM1
+ return [ (line[0], {} ) for line in info
+ if not (line[0].startswith('ORA-') and line[0][4].isdigit())
+ and len(line[0]) < 20 ]
def check_oracle_instance(item, params, info):
@@ -56,7 +61,6 @@ def check_oracle_instance(item, params, info):
state = 0
for line in info:
if line[0] == item:
-
# In case of a general error (e.g. authentication failed), the second
# column contains the word "FAILURE"
if line[1] == 'FAILURE':