From 02caf4abc79b080352873026ec1cc926b9fae962 Mon Sep 17 00:00:00 2001 From: Adam Amstrong Date: Wed, 28 Oct 2009 23:34:13 +0000 Subject: [PATCH] updates git-svn-id: http://www.observium.org/svn/observer/trunk@498 61d68cd4-352d-0410-923a-c4978735b2b8 --- html/includes/graphs/bgp_updates.inc.php | 24 +++++ html/includes/graphs/cbgp_prefixes.inc.php | 20 +++++ html/includes/graphs/device_icmp.inc.php | 4 +- .../graphs/device_icmp_informational.inc.php | 53 +++++++++++ html/includes/graphs/device_ip.inc.php | 88 ++++++++----------- html/includes/graphs/device_ipfrag.inc.php | 51 +++++++++++ html/includes/graphs/device_tcp.inc.php | 3 +- html/includes/graphs/device_udp.inc.php | 3 +- html/includes/graphs/generic_duplex.inc.php | 9 +- html/includes/graphs/generic_simplex.inc.php | 34 +++---- 10 files changed, 211 insertions(+), 78 deletions(-) create mode 100644 html/includes/graphs/bgp_updates.inc.php create mode 100644 html/includes/graphs/cbgp_prefixes.inc.php create mode 100644 html/includes/graphs/device_icmp_informational.inc.php create mode 100644 html/includes/graphs/device_ipfrag.inc.php diff --git a/html/includes/graphs/bgp_updates.inc.php b/html/includes/graphs/bgp_updates.inc.php new file mode 100644 index 000000000..56c5fa71f --- /dev/null +++ b/html/includes/graphs/bgp_updates.inc.php @@ -0,0 +1,24 @@ + diff --git a/html/includes/graphs/cbgp_prefixes.inc.php b/html/includes/graphs/cbgp_prefixes.inc.php new file mode 100644 index 000000000..2445c388c --- /dev/null +++ b/html/includes/graphs/cbgp_prefixes.inc.php @@ -0,0 +1,20 @@ + diff --git a/html/includes/graphs/device_icmp.inc.php b/html/includes/graphs/device_icmp.inc.php index e98ee7739..2732a936f 100644 --- a/html/includes/graphs/device_icmp.inc.php +++ b/html/includes/graphs/device_icmp.inc.php @@ -2,7 +2,7 @@ include("common.inc.php"); - $rrd_filename = $config['rrd_dir'] . "/" . $hostname . "/netinfo.rrd"; + $rrd_filename = $config['rrd_dir'] . "/" . $hostname . "/netstats-icmp.rrd"; $rrd_options .= " DEF:icmpInMsgs=$rrd_filename:icmpInMsgs:AVERAGE"; $rrd_options .= " DEF:icmpOutMsgs=$rrd_filename:icmpOutMsgs:AVERAGE"; @@ -46,6 +46,4 @@ $rrd_options .= " GPRINT:icmpOutEchoReps:AVERAGE:\ %6.2lf%s"; $rrd_options .= " GPRINT:icmpOutEchoReps:MAX:\ %6.2lf%s\\\\n"; - - ?> diff --git a/html/includes/graphs/device_icmp_informational.inc.php b/html/includes/graphs/device_icmp_informational.inc.php new file mode 100644 index 000000000..2c2218712 --- /dev/null +++ b/html/includes/graphs/device_icmp_informational.inc.php @@ -0,0 +1,53 @@ + diff --git a/html/includes/graphs/device_ip.inc.php b/html/includes/graphs/device_ip.inc.php index 6e707a0ea..6d84b9c88 100644 --- a/html/includes/graphs/device_ip.inc.php +++ b/html/includes/graphs/device_ip.inc.php @@ -1,56 +1,44 @@ diff --git a/html/includes/graphs/device_ipfrag.inc.php b/html/includes/graphs/device_ipfrag.inc.php new file mode 100644 index 000000000..4032d7f7c --- /dev/null +++ b/html/includes/graphs/device_ipfrag.inc.php @@ -0,0 +1,51 @@ + diff --git a/html/includes/graphs/device_tcp.inc.php b/html/includes/graphs/device_tcp.inc.php index a0020f0c3..3ce17fbdf 100644 --- a/html/includes/graphs/device_tcp.inc.php +++ b/html/includes/graphs/device_tcp.inc.php @@ -2,9 +2,8 @@ include("common.inc.php"); - $rrd_filename = $config['rrd_dir'] . "/" . $hostname . "/netinfo.rrd"; + $rrd_filename = $config['rrd_dir'] . "/" . $hostname . "/netstats-tcp.rrd"; - $rrd_options .= " DEF:icmpInMsgs=$rrd_filename:icmpInMsgs:AVERAGE"; $rrd_options .= " DEF:tcpActiveOpens=$rrd_filename:tcpActiveOpens:AVERAGE"; $rrd_options .= " DEF:tcpPassiveOpens=$rrd_filename:tcpPassiveOpens:AVERAGE"; $rrd_options .= " DEF:tcpAttemptFails=$rrd_filename:tcpAttemptFails:AVERAGE"; diff --git a/html/includes/graphs/device_udp.inc.php b/html/includes/graphs/device_udp.inc.php index b49aba5c7..2d4bb2da6 100644 --- a/html/includes/graphs/device_udp.inc.php +++ b/html/includes/graphs/device_udp.inc.php @@ -2,9 +2,8 @@ include("common.inc.php"); - $rrd_filename = $config['rrd_dir'] . "/" . $hostname . "/netinfo.rrd"; + $rrd_filename = $config['rrd_dir'] . "/" . $hostname . "/netstats-udp.rrd"; - $rrd_options .= " DEF:icmpInMsgs=$rrd_filename:icmpInMsgs:AVERAGE"; $rrd_options .= " DEF:udpInDatagrams=$rrd_filename:udpInDatagrams:AVERAGE"; $rrd_options .= " DEF:udpOutDatagrams=$rrd_filename:udpOutDatagrams:AVERAGE"; $rrd_options .= " DEF:udpInErrors=$rrd_filename:udpInErrors:AVERAGE"; diff --git a/html/includes/graphs/generic_duplex.inc.php b/html/includes/graphs/generic_duplex.inc.php index 350616a3e..5cf52ed3f 100644 --- a/html/includes/graphs/generic_duplex.inc.php +++ b/html/includes/graphs/generic_duplex.inc.php @@ -5,7 +5,8 @@ include("common.inc.php"); -if(!$unit_text) {$unit_text = "\ \ \ \ \ \ \ ";} + +$unit_text = str_pad(truncate($unit_text,10),10); $rrd_options .= " DEF:".$out."=".$rrd_filename.":".$rra_out.":AVERAGE"; $rrd_options .= " DEF:".$in."=".$rrd_filename.":".$rra_in.":AVERAGE"; @@ -33,11 +34,11 @@ if($graph_max) { $rrd_options .= " AREA:dout_max#".$colour_area_out_max.":"; } $rrd_options .= " AREA:in#".$colour_area_in.":"; -$rrd_options .= " COMMENT:".$unit_text."Now\ \ \ \ \ \ \ Ave\ \ \ \ \ \ Max"; +$rrd_options .= " COMMENT:'".$unit_text."Now Ave Max"; if($percentile) { - $rrd_options .= "\ \ \ \ \ \ ".$percentile."th\ %\\\\n"; + $rrd_options .= " ".$percentile."th %"; } -$rrd_options .= "\\\\n"; +$rrd_options .= "\\n'"; $rrd_options .= " LINE1.25:in#".$colour_line_in.":In\ "; $rrd_options .= " GPRINT:in:LAST:%6.2lf%s"; $rrd_options .= " GPRINT:in:AVERAGE:%6.2lf%s"; diff --git a/html/includes/graphs/generic_simplex.inc.php b/html/includes/graphs/generic_simplex.inc.php index b10740887..412af42c4 100644 --- a/html/includes/graphs/generic_simplex.inc.php +++ b/html/includes/graphs/generic_simplex.inc.php @@ -5,42 +5,42 @@ include("common.inc.php"); -if(!$unit_text) {$unit_text = "\ \ \ \ \ \ \ ";} +$unit_text = str_pad(truncate($unit_text,10),10); -$rrd_options .= " DEF:".$in."=".$rrd_filename.":".$rra_in.":AVERAGE"; -$rrd_options .= " DEF:".$in."_max=".$rrd_filename.":".$rra_out.":MAX"; +$rrd_options .= " DEF:".$rra."=".$rrd_filename.":".$rra.":AVERAGE"; +$rrd_options .= " DEF:".$rra."_max=".$rrd_filename.":".$rra.":MAX"; if($print_total) { - $rrd_options .= " VDEF:totin=in,TOTAL"; + $rrd_options .= " VDEF:".$rra."_total=rra,TOTAL"; } if($percentile) { - $rrd_options .= " VDEF:percentile_in=in,".$percentile.",PERCENT"; + $rrd_options .= " VDEF:".$rra."_percentile=".$rra.",".$percentile.",PERCENT"; } if($graph_max) { - $rrd_options .= " AREA:in_max#".$colour_area_in_max.":"; + $rrd_options .= " AREA:".$rra."_max#".$colour_area_max.":"; } -$rrd_options .= " AREA:in#".$colour_area_in.":"; -$rrd_options .= " COMMENT:".$unit_text."Now\ \ \ \ \ \ \ Ave\ \ \ \ \ \ Max"; +$rrd_options .= " AREA:".$rra."#".$colour_area.":"; +$rrd_options .= " COMMENT:'".$unit_text."Now Ave Max"; if($percentile) { - $rrd_options .= "\ \ \ \ \ \ ".$percentile."th\ %\\\\n"; + $rrd_options .= "\ \ \ \ \ \ ".$percentile."th\ %"; } -$rrd_options .= "\\\\n"; -$rrd_options .= " LINE1.25:in#".$colour_line_in.":In\ "; -$rrd_options .= " GPRINT:in:LAST:%6.2lf%s"; -$rrd_options .= " GPRINT:in:AVERAGE:%6.2lf%s"; -$rrd_options .= " GPRINT:in_max:MAX:%6.2lf%s"; +$rrd_options .= "\\n'"; +$rrd_options .= " LINE1.25:".$rra."#".$colour_line.":In\ "; +$rrd_options .= " GPRINT:".$rra.":LAST:%6.2lf%s"; +$rrd_options .= " GPRINT:".$rra.":AVERAGE:%6.2lf%s"; +$rrd_options .= " GPRINT:".$rra."_max:MAX:%6.2lf%s"; if($percentile) { - $rrd_options .= " GPRINT:percentile_in:%6.2lf%s"; + $rrd_options .= " GPRINT:".$rra."_percentile:%6.2lf%s"; } $rrd_options .= "\\\\n"; $rrd_options .= " COMMENT:\\\\n"; if($print_total) { - $rrd_options .= " GPRINT:tot:Total\ %6.2lf%s\)\\\\l"; + $rrd_options .= " GPRINT:".$rra."_tot:Total\ %6.2lf%s\)\\\\l"; } if($percentile) { - $rrd_options .= " LINE1:percentile_in#aa0000"; + $rrd_options .= " LINE1:".$rra."_percentile#aa0000"; } ?>