Module: check_mk
Branch: master
Commit: 000dd1d85756fc5d1964fbe89d500e3f3f7f6d8a
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=000dd1d85756fc…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Fri Jul 20 10:27:22 2012 +0200
Better title for PNP graph of mysql_capacity
---
pnp-templates/check_mk-mysql_capacity.php | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/pnp-templates/check_mk-mysql_capacity.php
b/pnp-templates/check_mk-mysql_capacity.php
index ee8d070..5c142e5 100644
--- a/pnp-templates/check_mk-mysql_capacity.php
+++ b/pnp-templates/check_mk-mysql_capacity.php
@@ -26,12 +26,10 @@
# Cut the relevant bits from the Nagios Service Description.
# This is a little complicated.
-$item = substr($servicedesc, 14);
-$item = str_replace("_Size", "", $item);
-$dbname = $item;
+$servicedesc = str_replace("_", " ", $servicedesc);
-$opt[1] = "--lower=0 --upper=".($CRIT[1]+10)." --vertical-label
\"Bytes\" --title \"MySQL DB $dbname Size\" ";
+$opt[1] = "--lower=0 --upper=".($CRIT[1]+10)." --vertical-label
\"Bytes\" --title \"$servicedesc\" ";
# Paint nice gradient using MySQLs colours.
$def[1] = rrd::def("var1", $RRDFILE[1], $DS[1], "MAX")
. rrd::gradient('var1', '015a84', 'e97b00',
'Database Size', 50)