Module: check_mk
Branch: master
Commit: 34fe71e04b3e37765db70a3ffafd5daec6c0d51e
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=34fe71e04b3e37…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Mon Oct 21 14:37:40 2013 +0200
oracle_jobs: fixed issue with incorrect column count
---
ChangeLog | 1 +
checks/oracle_jobs | 30 +++++++++++++++---------------
2 files changed, 16 insertions(+), 15 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 939a72a..39aa259 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -72,6 +72,7 @@
* FIX: apache_status: If ReqPerSec and BytesPerSec are not reported by
the agent, no PNP graphs for them are drawn.
(This is the case if ExtendedStatus set to Off in Apache config)
+ * FIX: oracle_jobs: fixed issues with incorrect column count in check output
WATO:
diff --git a/checks/oracle_jobs b/checks/oracle_jobs
index 394e247..af88bc4 100644
--- a/checks/oracle_jobs
+++ b/checks/oracle_jobs
@@ -25,16 +25,16 @@
# Boston, MA 02110-1301 USA.
# <<<oracle_jobs>>>
-# IODBSZ1 SYS SM$CLEAN_AUTO_SPLIT_MERGE SCHEDULED 0 763 TRUE 24.04.13 00:00:00,600000
EUROPE/VIENNA - SUCCEEDED 0
-# IODBSZ1 SYS RSE$CLEAN_RECOVERABLE_SCRIPT SCHEDULED 0 763 TRUE 24.04.13 00:00:00,100000
EUROPE/VIENNA - SUCCEEDED 0
-# IODBSZ1 SYS BSLN_MAINTAIN_STATS_JOB SCHEDULED 0 110 TRUE 29.04.13 00:00:00,300000
+01:00 BSLN_MAINTAIN_STATS_SCHED SUCCEEDED 0
-# IODBSZ1 SYS DRA_REEVALUATE_OPEN_FAILURES SCHEDULED 0 97 TRUE 01.01.70 00:00:00,000000
+02:00 MAINTENANCE_WINDOW_GROUP SUCCEEDED 0
-# IODBSZ1 SYS ORA$AUTOTASK_CLEAN SCHEDULED 0 763 TRUE 24.04.13 03:00:00,900000
EUROPE/VIENNA DAILY_PURGE_SCHEDULE SUCCEEDED 0
-# IODBSZ1 SYS PURGE_LOG SCHEDULED 0 763 TRUE 24.04.13 03:00:00,800000 EUROPE/VIENNA
DAILY_PURGE_SCHEDULE SUCCEEDED 0
-# IODBSZ1 ORACLE_OCM MGMT_CONFIG_JOB SCHEDULED 0 97 TRUE 01.01.70 00:00:00,000000 +02:00
MAINTENANCE_WINDOW_GROUP SUCCEEDED 1
-# IODBSZ1 ORACLE_OCM MGMT_STATS_CONFIG_JOB SCHEDULED 0 3 TRUE 01.05.13 01:01:01,000000
+01:00 - SUCCEEDED 1
-# IODBSZ1 EXFSYS RLM$SCHDNEGACTION SCHEDULED 0 18954 TRUE 23.04.13 14:51:57,000000 +02:00
- SUCCEEDED 0
-# IODBSZ1 EXFSYS RLM$EVTCLEANUP SCHEDULED 0 18202 TRUE 23.04.13 13:41:48,200000 +01:00 -
SUCCEEDED 0
+# IODBSZ1 SYS SM$CLEAN_AUTO_SPLIT_MERGE SCHEDULED 0 763 TRUE 24.04.13 00:00:00,600000
EUROPE/VIENNA - SUCCEEDED
+# IODBSZ1 SYS RSE$CLEAN_RECOVERABLE_SCRIPT SCHEDULED 0 763 TRUE 24.04.13 00:00:00,100000
EUROPE/VIENNA - SUCCEEDED
+# IODBSZ1 SYS BSLN_MAINTAIN_STATS_JOB SCHEDULED 0 110 TRUE 29.04.13 00:00:00,300000
+01:00 BSLN_MAINTAIN_STATS_SCHED SUCCEEDED
+# IODBSZ1 SYS DRA_REEVALUATE_OPEN_FAILURES SCHEDULED 0 97 TRUE 01.01.70 00:00:00,000000
+02:00 MAINTENANCE_WINDOW_GROUP SUCCEEDED
+# IODBSZ1 SYS ORA$AUTOTASK_CLEAN SCHEDULED 0 763 TRUE 24.04.13 03:00:00,900000
EUROPE/VIENNA DAILY_PURGE_SCHEDULE SUCCEEDED
+# IODBSZ1 SYS PURGE_LOG SCHEDULED 0 763 TRUE 24.04.13 03:00:00,800000 EUROPE/VIENNA
DAILY_PURGE_SCHEDULE SUCCEEDED
+# IODBSZ1 ORACLE_OCM MGMT_CONFIG_JOB SCHEDULED 0 97 TRUE 01.01.70 00:00:00,000000 +02:00
MAINTENANCE_WINDOW_GROUP SUCCEEDED
+# IODBSZ1 ORACLE_OCM MGMT_STATS_CONFIG_JOB SCHEDULED 0 3 TRUE 01.05.13 01:01:01,000000
+01:00 - SUCCEEDED
+# IODBSZ1 EXFSYS RLM$SCHDNEGACTION SCHEDULED 0 18954 TRUE 23.04.13 14:51:57,000000 +02:00
- SUCCEEDED
+# IODBSZ1 EXFSYS RLM$EVTCLEANUP SCHEDULED 0 18202 TRUE 23.04.13 13:41:48,200000 +01:00 -
SUCCEEDED
def inventory_oracle_jobs(info):
inventory = []
@@ -80,17 +80,17 @@ def check_oracle_jobs(item, params, info):
perfdata.append(("duration", last_duration))
# 01.05.13 01:01:01,000000 +01:00
- next_run = " ".join(line[7:9])
+ next_run = " ".join(line[7:-3])
if next_run.startswith("01.01.70 00:00:00"):
- if line[-1] == "-":
+ if line[-2] == "-":
next_run = "not scheduled (!)"
state = max(state, 1)
else:
- next_run = line[10]
+ next_run = line[-2]
output.append("Next Run: %s" % next_run)
- txt = "Last Run Status: %s" % (line[11])
- if line[11] != "SUCCEEDED":
+ txt = "Last Run Status: %s" % (line[-1])
+ if line[-1] != "SUCCEEDED":
txt += " (!!)"
state = max(state, 2)
output.append(txt)