Module: check_mk
Branch: master
Commit: 20be233907bab18a9c28733483658311960280bf
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=20be233907bab1…
Author: Simon Betz <si(a)mathias-kettner.de>
Date: Thu Oct 6 15:13:02 2016 +0200
3910 oracle_instance: noarchivelog can now be ignored
---
.werks/3910 | 9 +++++++++
ChangeLog | 1 +
checks/oracle_instance | 7 ++++---
web/plugins/wato/check_parameters.py | 11 ++++++++++-
4 files changed, 24 insertions(+), 4 deletions(-)
diff --git a/.werks/3910 b/.werks/3910
new file mode 100644
index 0000000..e411b6f
--- /dev/null
+++ b/.werks/3910
@@ -0,0 +1,9 @@
+Title: oracle_instance: noarchivelog can now be ignored
+Level: 1
+Component: checks
+Compatible: compat
+Version: 1.4.0i2
+Date: 1475759543
+Class: feature
+
+
diff --git a/ChangeLog b/ChangeLog
index b420317..4a66614 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -4,6 +4,7 @@
Checks & Agents:
* 3841 cups_queues: thresholds are now configurable in WATO...
+ * 3910 oracle_instance: noarchivelog can now be ignored
* 3894 FIX: mkeventd_status: Fixed bug in case Event Console is not running
* 3907 FIX: oracle_tablespaces: simplyfied free space calculation depending on
version...
* 3819 FIX: windows agent: fixed 2 bugs related to mrpe...
diff --git a/checks/oracle_instance b/checks/oracle_instance
index 6912488..5871164 100644
--- a/checks/oracle_instance
+++ b/checks/oracle_instance
@@ -50,8 +50,8 @@ def inventory_oracle_instance(info):
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:
+ value = params.get(param)
+ if value != None and column == data:
state = max(state, value)
if value == 1:
infotext += '(!)'
@@ -125,7 +125,8 @@ def check_oracle_instance(item, params, info):
if name != '_MGMTDB' and sid != '-MGMTDB':
infotext += ', Log Mode %s' % (log_mode.lower())
state, infotext = state_marker(state, infotext, 'archivelog',
log_mode, 'ARCHIVELOG')
- state, infotext = state_marker(state, infotext,
'noarchivelog',log_mode, 'NOARCHIVELOG')
+ if not params.get('ignore_noarchivelog', False):
+ state, infotext = state_marker(state, infotext,
'noarchivelog',log_mode, 'NOARCHIVELOG')
# force logging is only usable when archivelog is enabled
if log_mode == 'ARCHIVELOG':
diff --git a/web/plugins/wato/check_parameters.py b/web/plugins/wato/check_parameters.py
index dfcdb3c..a45a1f5 100644
--- a/web/plugins/wato/check_parameters.py
+++ b/web/plugins/wato/check_parameters.py
@@ -7631,7 +7631,16 @@ register_check_parameters(
Age(title = _("Warning if below")),
Age(title = _("Critical if below")),
]
- )),
+ )),(
+ 'ignore_noarchivelog',
+ Checkbox(
+ title = _("Ignore state of no-archive log"),
+ label = _("Enable"),
+ help = _("If active, only a single summary item is displayed.
The summary "
+ "will explicitly mention sensors in warn/crit state
but the "
+ "sensors that are ok are aggregated."),
+ default_value = False)
+ ),
],
),
TextAscii(