Module: check_mk
Branch: master
Commit: dc303d29a64707cd8e531de063546f39f866a4eb
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=dc303d29a64707…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu Jun 5 11:41:05 2014 +0200
Added PNP-template for new mysql_slave check
---
checks/mysql_slave | 2 +-
pnp-templates/check_mk-mysql_slave.php | 34 ++++++++++++++++++++++++++++++++
2 files changed, 35 insertions(+), 1 deletion(-)
diff --git a/checks/mysql_slave b/checks/mysql_slave
index 56868d1..cf413d6 100644
--- a/checks/mysql_slave
+++ b/checks/mysql_slave
@@ -82,7 +82,7 @@ check_info['mysql_slave'] = {
"check_function" : check_mysql_slave,
"inventory_function" : inventory_mysql_slave,
"service_description" : "MySQL DB Slave",
- "has_perfdata" : False,
+ "has_perfdata" : True,
"group" : "mysql_slave",
}
diff --git a/pnp-templates/check_mk-mysql_slave.php
b/pnp-templates/check_mk-mysql_slave.php
new file mode 100644
index 0000000..2161e65
--- /dev/null
+++ b/pnp-templates/check_mk-mysql_slave.php
@@ -0,0 +1,34 @@
+<?php
+# +------------------------------------------------------------------+
+# | ____ _ _ __ __ _ __ |
+# | / ___| |__ ___ ___| | __ | \/ | |/ / |
+# | | | | '_ \ / _ \/ __| |/ / | |\/| | ' / |
+# | | |___| | | | __/ (__| < | | | | . \ |
+# | \____|_| |_|\___|\___|_|\_\___|_| |_|_|\_\ |
+# | |
+# | Copyright Mathias Kettner 2014 mk(a)mathias-kettner.de |
+# +------------------------------------------------------------------+
+#
+# This file is part of Check_MK.
+# The official homepage is at
http://mathias-kettner.de/check_mk.
+#
+# check_mk is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation in version 2. check_mk is distributed
+# in the hope that it will be useful, but WITHOUT ANY WARRANTY; with-
+# out even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE. See the GNU General Public License for more de-
+# ails. You should have received a copy of the GNU General Public
+# License along with GNU Make; see the file COPYING. If not, write
+# to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+# Boston, MA 02110-1301 USA.
+
+$opt[1] = "--vertical-label 'Seconds' -l0 --title \"Seconds behind
master\" ";
+
+$def[1] = "DEF:sec=$RRDFILE[1]:$DS[1]:MAX ";
+$def[1] .= "AREA:sec#80f000:\"Slave lag\" ";
+$def[1] .= "LINE:sec#408000 ";
+$def[1] .= "GPRINT:sec:LAST:\"%7.2lf sec LAST\" ";
+$def[1] .= "GPRINT:sec:MAX:\"%7.2lf sec MAX\" ";
+
+?>