Module: check_mk
Branch: master
Commit: 6545588d6d67fa699dc808c01ae88adc478bdfdd
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=6545588d6d67fa…
Author: Goetz Golla <gg(a)mathias-kettner.de>
Date: Sat Aug 30 13:10:33 2014 +0200
#0654 oracle_instance: now also monitors the log mode
---
.werks/654 | 9 +++++++++
ChangeLog | 1 +
checks/oracle_instance | 9 +++++++--
3 files changed, 17 insertions(+), 2 deletions(-)
diff --git a/.werks/654 b/.werks/654
new file mode 100644
index 0000000..d0997d2
--- /dev/null
+++ b/.werks/654
@@ -0,0 +1,9 @@
+Title: oracle_instance: now also monitors the log mode
+Level: 1
+Component: checks
+Compatible: compat
+Version: 1.2.5i6
+Date: 1409397002
+Class: feature
+
+
diff --git a/ChangeLog b/ChangeLog
index 6d81f87..529707a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -39,6 +39,7 @@
* 1146 nfsmounts: supported by AIX agent now...
* 1103 windows agent: now able to omit context text of logfiles...
* 1150 netstat: new check for monitoring TCP/UDP connections and Linux and AIX...
+ * 0654 oracle_instance: now also monitors the log mode
* 1051 FIX: tcp_conn_stats: fix missing performance data...
* 1142 FIX: winperf_ts_sessions: fix computation, check has never really worked
* 1090 FIX: zfsget: fixed exception which happened on incomplete zfs entries
diff --git a/checks/oracle_instance b/checks/oracle_instance
index 0e86525..ba98fca 100644
--- a/checks/oracle_instance
+++ b/checks/oracle_instance
@@ -56,10 +56,15 @@ def check_oracle_instance(item, _no_params, info):
# ORACLE is sick and cannot handle timezone changes >:-P
up_seconds = max(0, int(up_seconds))
infotext += ", Logins %s, Version %s, Role %s, " \
- "%s, Force-Logging %s, Up since %s (%s)" % (
+ "%s, Force-Logging %s, Up since %s (%s), Log Mode %s" %
(
logins.lower(), version, database_role, \
archiver, force_logging, time.strftime("%F %T",
time.localtime(time.time() - up_seconds)), \
- get_age_human_readable(up_seconds))
+ get_age_human_readable(up_seconds), log_mode)
+
+ # log_mode should not be "NOARCHIVELOG"
+ if log_mode == 'NOARCHIVELOG':
+ state = max(state,1)
+ infotext += "(!)"
perfdata = [('uptime', up_seconds)]
return state, infotext, perfdata