Module: check_mk
Branch: master
Commit: 208a405859a2b2c3483ffc128f7c16869acf3f0c
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=208a405859a2b2…
Author: Bastian Kuhn <bk(a)mathias-kettner.de>
Date: Wed Dec 9 11:01:10 2015 +0100
#1316 mysql_slave: Levels can now be configured with WATO
---
.werks/1316 | 9 +++++++++
ChangeLog | 1 +
checks/mysql_slave | 1 +
web/plugins/wato/check_parameters.py | 27 +++++++++++++++++++++++++++
4 files changed, 38 insertions(+)
diff --git a/.werks/1316 b/.werks/1316
new file mode 100644
index 0000000..f7b1b9b
--- /dev/null
+++ b/.werks/1316
@@ -0,0 +1,9 @@
+Title: mysql_slave: Levels can now be configured with WATO
+Level: 1
+Component: checks
+Compatible: compat
+Version: 1.2.7i4
+Date: 1449655241
+Class: feature
+
+
diff --git a/ChangeLog b/ChangeLog
index 5eba1d6..d52e000 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -60,6 +60,7 @@
* 1314 apc_sts_source: New Check to monitor if the input source changes on APC STS
devices
* 1315 check_mk_agent.linux: The ps section of the agent now supports long
usernames...
* 2869 ibm_storage_ts, ibm_storage_ts.drive, ibm_storage_ts_library,
ibm_storage_ts.status: new checks for IBM TS3100 Tape Library
+ * 1316 mysql_slave: Levels can now be configured with WATO
* 2660 FIX: fixed windows agent using the wrong working directory...
* 2664 FIX: ps: Speedup in situation with many matching processes...
* 2661 FIX: windows agent: fixed incomplete process list...
diff --git a/checks/mysql_slave b/checks/mysql_slave
index f07b3c8..95945df 100644
--- a/checks/mysql_slave
+++ b/checks/mysql_slave
@@ -119,5 +119,6 @@ check_info['mysql_slave'] = {
"check_function" : check_mysql_slave,
"service_description" : "MySQL DB Slave %s",
"has_perfdata" : True,
+ "group" : "mysql_slave",
}
diff --git a/web/plugins/wato/check_parameters.py b/web/plugins/wato/check_parameters.py
index a8025fa..8cd92b2 100644
--- a/web/plugins/wato/check_parameters.py
+++ b/web/plugins/wato/check_parameters.py
@@ -5470,6 +5470,33 @@ register_check_parameters(
register_check_parameters(
subgroup_applications,
+ "mysql_slave",
+ _("MySQL Slave"),
+ Dictionary(
+ elements = [
+ ( "seconds_behind_master",
+ Tuple(
+ title = _("Max. time behind the master"),
+ help = _("Compares the time which the slave can be behind the
master. "
+ "This rule makes the check raise warning/critical
states if the time is equal to "
+ "or above the configured levels."),
+ elements = [
+ Age(title = _("Warning at")),
+ Age(title = _("Critical at")),
+ ]
+ )
+ ),
+ ],
+ optional_keys = None),
+ TextAscii(
+ title = _("Instance"),
+ help = _("Only needed if you have multiple MySQL Instances on one
server"),
+ ),
+ "dict",
+)
+
+register_check_parameters(
+ subgroup_applications,
"db_bloat",
_("Database Bloat (PostgreSQL)"),
Dictionary(