Module: check_mk
Branch: master
Commit: 950df178f57220c06addb2cb22a3342a3b1165d2
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=950df178f57220…
Author: Florian Kromer <fk(a)mathias-kettner.de>
Date: Thu May 2 13:27:04 2019 +0200
7296 FIX oracle_dataguard_stats: Add missing metric definitions
CMK-1768
Change-Id: I841c8424068f7ee58d1137625603e3df5166d29d
---
.werks/7296 | 10 +++++
cmk/gui/plugins/metrics/check_mk.py | 18 ++++++++
.../datasets/oracle_dataguard_stats.py | 49 ++++++++++++++++++++++
3 files changed, 77 insertions(+)
diff --git a/.werks/7296 b/.werks/7296
new file mode 100644
index 0000000..831774d
--- /dev/null
+++ b/.werks/7296
@@ -0,0 +1,10 @@
+Title: oracle_dataguard_stats: Add missing metric definitions
+Level: 1
+Component: checks
+Compatible: compat
+Edition: cre
+Version: 1.6.0i1
+Date: 1556796336
+Class: fix
+
+CMK-1768
diff --git a/cmk/gui/plugins/metrics/check_mk.py b/cmk/gui/plugins/metrics/check_mk.py
index 140f899..fbfcb3f 100644
--- a/cmk/gui/plugins/metrics/check_mk.py
+++ b/cmk/gui/plugins/metrics/check_mk.py
@@ -497,6 +497,24 @@ metric_info["writing"] = {
"color": "21/a",
}
+metric_info["apply_finish_time"] = {
+ "title": _("Apply Finish Time"),
+ "unit": "s",
+ "color": "11/a",
+}
+
+metric_info["transport_lag"] = {
+ "title": _("Transport Lag"),
+ "unit": "s",
+ "color": "16/a",
+}
+
+metric_info["apply_lag"] = {
+ "title": _("Apply Lag"),
+ "unit": "s",
+ "color": "21/a",
+}
+
metric_info["rtt"] = {
"title": _("Round trip time"),
"unit": "s",
diff --git a/tests/unit/checks/generictests/datasets/oracle_dataguard_stats.py
b/tests/unit/checks/generictests/datasets/oracle_dataguard_stats.py
new file mode 100644
index 0000000..951596d
--- /dev/null
+++ b/tests/unit/checks/generictests/datasets/oracle_dataguard_stats.py
@@ -0,0 +1,49 @@
+# yapf: disable
+
+
+checkname = 'oracle_dataguard_stats'
+
+
+info = [['TESTDB',
+ 'TESTDBU2',
+ 'PHYSICAL STANDBYapply finish time',
+ '+00 00:00:00.000',
+ 'NOT ALLOWED',
+ 'ENABLED',
+ 'MAXIMUM',
+ 'PERFORMANCE',
+ 'DISABLED',
+ '',
+ '',
+ '',
+ 'APPLYING_LOG'],
+ ['TUX12C', 'TUXSTDB', 'PHYSICAL STANDBY', 'transport
lag', '+00 00:00:00'],
+ ['TUX12C', 'TUXSTDB', 'PHYSICAL STANDBY', 'apply
lag', '+00 00:28:57'],
+ ['TUX12C',
+ 'TUXSTDB',
+ 'PHYSICAL STANDBY',
+ 'apply finish time',
+ '+00 00:00:17.180'],
+ ['TUX12C', 'TUXSTDB', 'PHYSICAL STANDBY', 'estimated
startup time', '20']]
+
+
+discovery = {'': [('TESTDB.TESTDBU2', {}), ('TUX12C.TUXSTDB',
{})]}
+
+
+checks = {'': [('TESTDB.TESTDBU2',
+ {'apply_lag': (3600, 14400)},
+ [(0, 'Database Role physical standbyapply finish time', []),
+ (0, 'Protection Mode performance', []),
+ (0, 'Broker maximum', [])]),
+ ('TUX12C.TUXSTDB',
+ {'apply_lag': (3600, 14400)},
+ [(0, 'Database Role physical standby', []),
+ (0,
+ 'apply finish time 17.0 s',
+ [('apply_finish_time', 17, None, None, None, None)]),
+ (0,
+ 'transport lag 0.00 s',
+ [('transport_lag', 0, None, None, None, None)]),
+ (0,
+ 'apply lag 28 m',
+ [('apply_lag', 1737, 3600, 14400, None, None)])])]}
\ No newline at end of file