Procházet zdrojové kódy

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.
Sebastian Harl před 14 roky
rodič
revize
2705a45384
1 změnil soubory, kde provedl 4 přidání a 4 odebrání
  1. 4 4
      PNP/templates/check_naf.php

+ 4 - 4
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);