summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorndarshan <dnarayan@redhat.com>2014-03-14 15:07:03 +0530
committerBala.FA <barumuga@redhat.com>2014-04-29 10:21:36 +0530
commit522783ba9afebcd82869c57090feb8258e52915b (patch)
tree5d4ca6ff98895df341de4838c5b48c902160a8d4 /templates
parent795fc58ef57127f257ea06c8c77ff8fba0662a4e (diff)
Template: Fixed the issues in physical graph templates
Fixed issue with memory template, other templates to have graphs of same size for rendering in ui. Change-Id: Iacfe7e16b16e6a6cccb104dea9fed412b3f533c3 Signed-off-by: ndarshan <dnarayan@redhat.com> Reviewed-on: https://cuckoo.blr.redhat.com:8443/11 Reviewed-by: Sahina Bose <sabose@redhat.com>
Diffstat (limited to 'templates')
-rw-r--r--templates/check_disk_and_inode.php2
-rw-r--r--templates/check_interfaces.php11
-rw-r--r--templates/check_memory.php20
-rw-r--r--templates/check_swap_usage.php2
4 files changed, 20 insertions, 15 deletions
diff --git a/templates/check_disk_and_inode.php b/templates/check_disk_and_inode.php
index 3185544..2dd253f 100644
--- a/templates/check_disk_and_inode.php
+++ b/templates/check_disk_and_inode.php
@@ -63,7 +63,7 @@ foreach ($this->DS as $KEY=>$VAL) {
# create critical line and legend
$def[$k] .= rrd::line2( $VAL['CRIT'], "#FF0000", "Critical\\n");
-
+ $def[$k] .= rrd::comment (" \\n");
}
}
?>
diff --git a/templates/check_interfaces.php b/templates/check_interfaces.php
index 96226e9..1005382 100644
--- a/templates/check_interfaces.php
+++ b/templates/check_interfaces.php
@@ -39,15 +39,18 @@ for ($i = 0; $i < $interface_count; $i++) {
$ds_name[$index+1] = "$interface:: Receiving and ";
$def[$index+1] = rrd::def("value1", $RRDFILE[$index+2], $DS[$index+2], "AVERAGE");
$def[$index+1] .= rrd::cdef ("value2","value1,125000,/");
- $def[$index+1] .= rrd::line1("value2", "#008000", $data_type);
- $def[$index+1] .= rrd::gprint ("value2", array("LAST", "AVERAGE", "MAX"), "%10.4lf Gbps");
+ $def[$index+1] .= rrd::line1("value2", "#008000", "Receiving ");
+ $def[$index+1] .= rrd::gprint ("value2", array("LAST", "AVERAGE", "MAX"), "%6.4lf Gbps");
list ($interface, $data_type) = explode (".", $name[$index+3]);
$interface = str_replace(";","",$interface);
$ds_name[$index+1] .= "Transmission speed";
$def[$index+1] .= rrd::def ("value3", $RRDFILE[$index+3], $DS[$index+3], "AVERAGE");
$def[$index+1] .= rrd::cdef ("value4","value3,125000,/");
- $def[$index+1] .= rrd::line1 ("value4", "#0000ff", $data_type) ;
- $def[$index+1] .= rrd::gprint ("value4", array("LAST", "AVERAGE", "MAX"), "%10.4lf Gbps");
+ $def[$index+1] .= rrd::line1 ("value4", "#0000ff", "Transmission ") ;
+ $def[$index+1] .= rrd::gprint ("value4", array("LAST", "AVERAGE", "MAX"), "%6.4lf Gbps");
+ $def[$index+1] .= rrd::comment (" \\n");
+ $def[$index+1] .= rrd::comment (" \\n");
+ $def[$index+1] .= rrd::comment (" \\n");
}
?>
diff --git a/templates/check_memory.php b/templates/check_memory.php
index d620b66..c06ffc5 100644
--- a/templates/check_memory.php
+++ b/templates/check_memory.php
@@ -18,7 +18,7 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
$def[1]=""; $opt[1]=""; $ds_name[1]="";
-$upper_limit = round($MAX[1] / (1048576),2)
+$upper_limit = round($MAX[1] / (1048576),2);
$opt[1] = "--vertical-label \"$UNIT[1](Total:$upper_limit GB)\" -l 0 -u $upper_limit -r --title \"Memory usage for $hostname / $servicedesc\" --slope-mode -N";
$ds_name[1] = "Memory Usage";
@@ -31,21 +31,21 @@ $def[1] .= "DEF:cached_mem_in=$RRDFILE[1]:$DS[4]:AVERAGE " ;
$def[1] .= rrd::cdef("used_mem_out","used_mem_in,1048576,/");
$def[1] .= "LINE1:used_mem_out#0000ff:\"Used \" ";
-$def[1] .= "GPRINT:used_mem_in:LAST:\"%8.2lf GB LAST \" ";
-$def[1] .= "GPRINT:used_mem_in:MAX:\"%8.2lf GB MAX \" ";
-$def[1] .= "GPRINT:used_mem_in" . ':AVERAGE:"%8.2lf GB AVERAGE \j" ';
+$def[1] .= "GPRINT:used_mem_out:LAST:\"%8.2lf GB LAST \" ";
+$def[1] .= "GPRINT:used_mem_out:MAX:\"%8.2lf GB MAX \" ";
+$def[1] .= "GPRINT:used_mem_out" . ':AVERAGE:"%8.2lf GB AVERAGE \j" ';
$def[1] .= rrd::cdef("buffer_mem_out","buffer_mem_in,1048576,/");
$def[1] .= "LINE1:buffer_mem_out#800080:\"Buffer \" ";
-$def[1] .= "GPRINT:buffer_mem_in:LAST:\"%8.2lf GB LAST \" ";
-$def[1] .= "GPRINT:buffer_mem_in:MAX:\"%8.2lf GB MAX \" ";
-$def[1] .= "GPRINT:buffer_mem_in" . ':AVERAGE:"%8.2lf GB AVERAGE \j" ';
+$def[1] .= "GPRINT:buffer_mem_out:LAST:\"%8.2lf GB LAST \" ";
+$def[1] .= "GPRINT:buffer_mem_out:MAX:\"%8.2lf GB MAX \" ";
+$def[1] .= "GPRINT:buffer_mem_out" . ':AVERAGE:"%8.2lf GB AVERAGE \j" ';
$def[1] .= rrd::cdef("cached_mem_out","cached_mem_in,1048576,/");
$def[1] .= "LINE1:cached_mem_out#008000:\"Cached \" ";
-$def[1] .= "GPRINT:cached_mem_in:LAST:\"%8.2lf GB LAST \" ";
-$def[1] .= "GPRINT:cached_mem_in:MAX:\"%8.2lf GB MAX \" ";
-$def[1] .= "GPRINT:cached_mem_in" . ':AVERAGE:"%8.2lf GB AVERAGE \j" ';
+$def[1] .= "GPRINT:cached_mem_out:LAST:\"%8.2lf GB LAST \" ";
+$def[1] .= "GPRINT:cached_mem_out:MAX:\"%8.2lf GB MAX \" ";
+$def[1] .= "GPRINT:cached_mem_out" . ':AVERAGE:"%8.2lf GB AVERAGE \j" ';
if ($WARN[1] != ""){
$WAR = $WARN[1] / 1048576 ;
diff --git a/templates/check_swap_usage.php b/templates/check_swap_usage.php
index 4d1c0ff..ef62064 100644
--- a/templates/check_swap_usage.php
+++ b/templates/check_swap_usage.php
@@ -35,6 +35,8 @@ if ($WARN[1] != ""){
if ($CRIT[1] != "") {
$CRT = $CRIT[1] / 1048576 ;
$def[1] .= "LINE2:$CRT#FF0000:\"Critical \\n\" ";
+ $def[1] .= "COMMENT:\" \\n\" ";
+ $def[1] .= "COMMENT:\" \\n\" ";
}