Module: check_mk
Branch: master
Commit: f5fc987e94315aa05fa2a96cd14de59cdf1ddc6c
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=f5fc987e94315a…
Author: Goetz Golla <gg(a)mathias-kettner.de>
Date: Mon Jan 12 10:56:00 2015 +0100
df: another change to pnp template so that it can deal with both service descriptions,
"fs_" and "Filesystem"
---
pnp-templates/check_mk-df.php | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/pnp-templates/check_mk-df.php b/pnp-templates/check_mk-df.php
index 8e6e8a1..6d843c4 100644
--- a/pnp-templates/check_mk-df.php
+++ b/pnp-templates/check_mk-df.php
@@ -41,7 +41,12 @@ foreach ($NAME as $i => $n) {
# RRDtool Options
#$servicedes=$NAGIOS_SERVICEDESC
-$fsname = str_replace("_", "/", substr($servicedesc,11));
+if (substr($servicedesc, 0, 3) == 'fs_') {
+ $fsname = str_replace("_", "/", substr($servicedesc,3));
+} else {
+ $fsname = str_replace("_", "/", substr($servicedesc,11));
+}
+
$fstitle = $fsname;
# Hack for windows: replace C// with C:\