From 2705a45384eaf213b8aea91984c3678072c25df6 Mon Sep 17 00:00:00 2001 From: Sebastian Harl Date: Wed, 22 Jun 2011 11:27:13 +0200 Subject: [PATCH] check_naf PNP templ: Print nav* totals at bottom of the legend. In the case of navi* (INodes), the total was not previously included in the legend at all, making it easy to mix up the 'total' line with the 'used' value in case a very small percentage was in use. In general, printing the total at the bottom imho makes the graph easier to read, as the legend now describes the graph from bottom to top. --- PNP/templates/check_naf.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/PNP/templates/check_naf.php b/PNP/templates/check_naf.php index 698c438..5228037 100644 --- a/PNP/templates/check_naf.php +++ b/PNP/templates/check_naf.php @@ -233,9 +233,6 @@ while( count($this->DS) > 0 ) { $def[$graphs] .= rrd::cdef ("df", "dt,du,-,so,-"); - $def[$graphs] .= rrd::line1 ("vt", "#000000", "Whole Volume "); - $def[$graphs] .= rrd::gprint ("vt", array("LAST","MAX","AVERAGE"), "%6.2lf%S", "\\n"); - $def[$graphs] .= rrd::area ("du", "#AAAAAA", "Data\: used space "); $def[$graphs] .= rrd::gprint ("du", array("LAST","MAX","AVERAGE"), "%6.2lf%S", "\\n"); @@ -251,6 +248,9 @@ while( count($this->DS) > 0 ) { $def[$graphs] .= rrd::area ("su", "#0000CC", "Snap\: used space ", "STACK"); $def[$graphs] .= rrd::gprint ("su", array("LAST","MAX","AVERAGE"), "%6.2lf%S", "\\n"); + $def[$graphs] .= rrd::line1 ("vt", "#000000", "Whole Volume "); + $def[$graphs] .= rrd::gprint ("vt", array("LAST","MAX","AVERAGE"), "%6.2lf%S", "\\n"); + } elseif (substr($VAL['NAME'], 0, 6) == 'naviu_') { @@ -267,9 +267,9 @@ while( count($this->DS) > 0 ) { $def[$graphs] .= rrd::def ("it", $v_it['RRDFILE'], $v_it['DS'], "AVERAGE"); $def[$graphs] .= rrd::area ("it", "#00FF00"); - $def[$graphs] .= rrd::line1 ("it", "#000000"); $def[$graphs] .= rrd::area ("iu", "#0000FF", "INodes used\: "); $def[$graphs] .= rrd::gprint ("iu", array("LAST","MAX","AVERAGE"), "%7.2lf%S"); + $def[$graphs] .= rrd::line1 ("it", "#000000", "Total INodes\\n"); $def[$graphs] .= wc($v_iu);