Module: check_mk
Branch: master
Commit: b59de29a9ba49a4647f707851755ea879b52ad05
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=b59de29a9ba49a…
Author: Simon Betz <si(a)mathias-kettner.de>
Date: Wed Jan 25 10:50:30 2017 +0100
4297 FIX oracle_instance: fixed discovery function
Some old {{mk_oracle}} plugin outputs are wrong formatted
such that discovery function detects wrong items.
Change-Id: I2c57f266cb2e6806a5f51e9ee1f1d19c4cd75c4e
---
.werks/4297 | 11 +++++++++++
ChangeLog | 1 +
checks/oracle_instance | 9 +++++++--
3 files changed, 19 insertions(+), 2 deletions(-)
diff --git a/.werks/4297 b/.werks/4297
new file mode 100644
index 0000000..d18cb9e
--- /dev/null
+++ b/.werks/4297
@@ -0,0 +1,11 @@
+Title: oracle_instance: fixed discovery function
+Level: 1
+Component: checks
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.4.0i4
+Date: 1485337707
+
+Some old {{mk_oracle}} plugin outputs are wrong formatted
+such that discovery function detects wrong items.
diff --git a/ChangeLog b/ChangeLog
index cd0ace3..57e939a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -61,6 +61,7 @@
* 4012 FIX: Fixed broken windows MSI packages (Installer error 2725)...
* 4014 FIX: Windows Agent / Eventlogs with vista_api: Fixed numerous bugs and memory
leaks...
* 4283 FIX: check_mail_loop: Now using "mail to" address in To header
+ * 4297 FIX: oracle_instance: fixed discovery function...
Multisite:
* 4169 View action: Default values of sticky, notification and persistent options can
now be configured via global settings....
diff --git a/checks/oracle_instance b/checks/oracle_instance
index 5871164..8665ea5 100644
--- a/checks/oracle_instance
+++ b/checks/oracle_instance
@@ -30,6 +30,12 @@
# TUX2|12.1.0.1.0|OPEN|ALLOWED|STARTED|6735|1297771692|ARCHIVELOG|PRIMARY|NO|TUX2
#
TUX5|12.1.0.1.1|MOUNTED|ALLOWED|STARTED|82883|1297771692|NOARCHIVELOG|PRIMARY|NO|0|TUX5
+# <<<oracle_instance:sep(124)>>>$
+# +ASM|FAILURE|ORA-99999 tnsping failed for +ASM $
+# ERROR:$
+# ORA-28002: the password will expire within 1 days$
+
+
factory_settings["oracle_instance_defaults"] = {
"logins" : 2,
"noforcelogging" : 1,
@@ -44,11 +50,10 @@ def inventory_oracle_instance(info):
# 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 ]
+ and len(line[0]) < 20 and len(line) >= 6 ]
def check_oracle_instance(item, params, info):
-
def state_marker(state, infotext, param, column, data):
value = params.get(param)
if value != None and column == data: