Module: check_mk
Branch: master
Commit: 729686cd74e039d9adbad8f4eebcf646cb29b1cf
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=729686cd74e039…
Author: Florian Heigl <fh(a)mathias-kettner.de>
Date: Fri Jul 13 14:18:37 2012 +0200
tsm_stagingpools: Update RRD template for better overview with multiple TSM farms
---
pnp-templates/check_mk-tsm_stagingpools.php | 28 +++++++++++++-------------
1 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/pnp-templates/check_mk-tsm_stagingpools.php
b/pnp-templates/check_mk-tsm_stagingpools.php
index eeb77a6..d45c231 100644
--- a/pnp-templates/check_mk-tsm_stagingpools.php
+++ b/pnp-templates/check_mk-tsm_stagingpools.php
@@ -23,25 +23,25 @@
# to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
# Boston, MA 02110-1301 USA.
-# bisect the pool name from service description, this didn't work
-#$parts = explode(" ", $servicedesc);
-#$pool = $parts[1];
-$opt[1] = "-l0 --vertical-label \"Tapes\" --title \"Occupancy of
pool\" ";
+# cut TSM part from service description
+$item = substr($servicedesc, 16);
+# if ___ is in the item, then we have info on the TSM farm and the Poolname
+# split it. otherwise, keep the item name unchanged.
+$parts = explode("___", $item);
+$info = (isset($parts[1])) ? $parts[1] . " (".$parts[0].")" : $item;
-$def[1] = "DEF:tapes=$RRDFILE[1]:$DS[1]:MAX ";
-$def[1] .= "DEF:free=$RRDFILE[2]:$DS[1]:MAX ";
-$def[1] .= "DEF:util=$RRDFILE[3]:$DS[1]:MAX ";
-
-
-$def[1] .= "AREA:tapes#cd853f:\"Tapes in Pool \" ";
-$def[1] .= "AREA:free#a000ff:\"Free Tapes \" ";
-$def[1] .= "LINE:util#000000:\"Utilization \" ";
-# FIXME:
-# add warn/crit lines
+$opt[1] = "-l0 --vertical-label \"Tapes\" --title \"Occupancy of
$info\" ";
+$def[1] = "DEF:tapes=$RRDFILE[1]:$DS[1]:MAX ".
+ "DEF:free=$RRDFILE[2]:$DS[1]:MAX ".
+ "DEF:util=$RRDFILE[3]:$DS[1]:MAX ".
+ "AREA:tapes#cd853f:\"Tapes in Pool \" ".
+ "AREA:free#a000ff:\"Free Tapes \" ".
+ "LINE3:util#5f1010:\"Utilization \" ".
+ "";
?>