Module: check_mk
Branch: master
Commit: c47068c656fa2e4b1ca5cfcdfe95bd1f88c0bcec
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=c47068c656fa2e…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Fri Feb 25 16:32:27 2011 +0100
Fixed growth in df trend graphs
---
pnp-rraconf/check_mk-df.rra.cfg | 2 +-
pnp-templates/check_mk-df.php | 7 ++++---
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/pnp-rraconf/check_mk-df.rra.cfg b/pnp-rraconf/check_mk-df.rra.cfg
index f701388..74019b8 120000
--- a/pnp-rraconf/check_mk-df.rra.cfg
+++ b/pnp-rraconf/check_mk-df.rra.cfg
@@ -1 +1 @@
-avg-max.rra.cfg
\ No newline at end of file
+avg-max-min.rra.cfg
\ No newline at end of file
diff --git a/pnp-templates/check_mk-df.php b/pnp-templates/check_mk-df.php
index 4c44a97..c28e4ac 100644
--- a/pnp-templates/check_mk-df.php
+++ b/pnp-templates/check_mk-df.php
@@ -66,10 +66,11 @@ if (isset($DS[2])) {
$range = sprintf("%.1fh", $hours);
$opt[2] = "--vertical-label '+/- MB / $range' -l -1 -u 1 --title
'$hostname: Trend for $fstitle' ";
- $def[2] = "DEF:growth=$RRDFILE[2]:$DS[2]:AVERAGE ";
+ $def[2] = "DEF:growth_max=$RRDFILE[2]:$DS[2]:MAX ";
+ $def[2] .= "DEF:growth_min=$RRDFILE[2]:$DS[2]:MIN ";
$def[2] .= "DEF:trend=$RRDFILE[3]:$DS[3]:AVERAGE ";
- $def[2] .= "CDEF:growth_pos=growth,0,MAX ";
- $def[2] .= "CDEF:growth_neg=growth,0,MIN ";
+ $def[2] .= "CDEF:growth_pos=growth_max,0,MAX ";
+ $def[2] .= "CDEF:growth_neg=growth_min,0,MIN ";
$def[2] .= "HRULE:0#c0c0c0 ";
$def[2] .= "AREA:growth_pos#3060f0:\"Grow\" ";
$def[2] .= "AREA:growth_neg#30f060:\"Shrink \" ";