Skip to content

Commit

Permalink
fix: Graph formatting for udp-jitter graphs. (librenms#4433)
Browse files Browse the repository at this point in the history
  • Loading branch information
adaniels21487 authored and laf committed Sep 14, 2016
1 parent 8e4be8b commit f7b68c4
Show file tree
Hide file tree
Showing 6 changed files with 53 additions and 42 deletions.
7 changes: 4 additions & 3 deletions html/includes/graphs/device/sla_jitter-icpif.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,12 @@
$rrd_filename = rrd_name($device['hostname'], array('sla', $sla['sla_nr'], 'jitter'));

if (file_exists($rrd_filename)) {
$rrd_options .= " COMMENT:' Cur Min Max\\n'";
$rrd_options .= " COMMENT:' Cur Min Max Avg\\n'";

$rrd_options .= " DEF:ICPIF=" . $rrd_filename . ":ICPIF:AVERAGE ";
$rrd_options .= " LINE1.25:ICPIF#0000ee:'ICPIF ' ";
$rrd_options .= " LINE1.25:ICPIF#0000ee:'ICPIF ' ";
$rrd_options .= " GPRINT:ICPIF:LAST:%3.0lf ";
$rrd_options .= " GPRINT:ICPIF:MIN:%3.0lf ";
$rrd_options .= " GPRINT:ICPIF:MAX:%3.0lf\\\l ";
$rrd_options .= " GPRINT:ICPIF:MAX:%3.0lf ";
$rrd_options .= " GPRINT:ICPIF:AVERAGE:'%3.0lf'\\\l ";
}
20 changes: 11 additions & 9 deletions html/includes/graphs/device/sla_jitter-latency.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,19 @@
$rrd_filename = rrd_name($device['hostname'], array('sla', $sla['sla_nr'], 'jitter'));

if (file_exists($rrd_filename)) {
$rrd_options .= " COMMENT:' Cur Min Max\\n'";
$rrd_options .= " COMMENT:' Cur Min Max Avg\\n'";

$rrd_options .= " DEF:SD=" . $rrd_filename . ":OWAvgSD:AVERAGE ";
$rrd_options .= " LINE1.25:SD#0000ee:'Src to Dst ' ";
$rrd_options .= " GPRINT:SD:LAST:%3.0lf ";
$rrd_options .= " GPRINT:SD:MIN:%3.0lf ";
$rrd_options .= " GPRINT:SD:MAX:%3.0lf\\\l ";
$rrd_options .= " LINE1.25:SD#0000ee:'Src to Dst (ms) ' ";
$rrd_options .= " GPRINT:SD:LAST:'%5.2lf' ";
$rrd_options .= " GPRINT:SD:MIN:'%5.2lf' ";
$rrd_options .= " GPRINT:SD:MAX:'%5.2lf' ";
$rrd_options .= " GPRINT:SD:AVERAGE:'%5.2lf'\\\l ";

$rrd_options .= " DEF:DS=" . $rrd_filename . ":OWAvgDS:AVERAGE ";
$rrd_options .= " LINE1.25:DS#008C00:'Dst to Src ' ";
$rrd_options .= " GPRINT:DS:LAST:%3.0lf ";
$rrd_options .= " GPRINT:DS:MIN:%3.0lf ";
$rrd_options .= " GPRINT:DS:MAX:%3.0lf\\\l ";
$rrd_options .= " LINE1.25:DS#008C00:'Dst to Src (ms) ' ";
$rrd_options .= " GPRINT:DS:LAST:'%5.2lf' ";
$rrd_options .= " GPRINT:DS:MIN:'%5.2lf' ";
$rrd_options .= " GPRINT:DS:MAX:'%5.2lf' ";
$rrd_options .= " GPRINT:DS:AVERAGE:'%5.2lf'\\\l ";
}
20 changes: 11 additions & 9 deletions html/includes/graphs/device/sla_jitter-loss.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,19 @@
$rrd_filename = rrd_name($device['hostname'], array('sla', $sla['sla_nr'], 'jitter'));

if (file_exists($rrd_filename)) {
$rrd_options .= " COMMENT:' Cur Min Max\\n'";
$rrd_options .= " COMMENT:' Cur Min Max Avg\\n'";

$rrd_options .= " DEF:SD=" . $rrd_filename . ":PacketLossSD:AVERAGE ";
$rrd_options .= " LINE1.25:SD#0000ee:'Src to Dst ' ";
$rrd_options .= " GPRINT:SD:LAST:%3.0lf ";
$rrd_options .= " GPRINT:SD:MIN:%3.0lf ";
$rrd_options .= " GPRINT:SD:MAX:%3.0lf\\\l ";
$rrd_options .= " LINE1.25:SD#0000ee:'Src to Dst (ms) ' ";
$rrd_options .= " GPRINT:SD:LAST:'%5.2lf' ";
$rrd_options .= " GPRINT:SD:MIN:'%5.2lf' ";
$rrd_options .= " GPRINT:SD:MAX:'%5.2lf' ";
$rrd_options .= " GPRINT:SD:AVERAGE:'%5.2lf'\\\l ";

$rrd_options .= " DEF:DS=" . $rrd_filename . ":PacketLossDS:AVERAGE ";
$rrd_options .= " LINE1.25:DS#008C00:'Dst to Src ' ";
$rrd_options .= " GPRINT:DS:LAST:%3.0lf ";
$rrd_options .= " GPRINT:DS:MIN:%3.0lf ";
$rrd_options .= " GPRINT:DS:MAX:%3.0lf\\\l ";
$rrd_options .= " LINE1.25:DS#008C00:'Dst to Src (ms) ' ";
$rrd_options .= " GPRINT:DS:LAST:'%5.2lf' ";
$rrd_options .= " GPRINT:DS:MIN:'%5.2lf' ";
$rrd_options .= " GPRINT:DS:MAX:'%5.2lf' ";
$rrd_options .= " GPRINT:DS:AVERAGE:'%5.2lf'\\\l ";
}
17 changes: 10 additions & 7 deletions html/includes/graphs/device/sla_jitter-lost.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,23 +18,26 @@
$rrd_filename = rrd_name($device['hostname'], array('sla', $sla['sla_nr'], 'jitter'));

if (file_exists($rrd_filename)) {
$rrd_options .= " COMMENT:' Cur Min Max\\n'";
$rrd_options .= " COMMENT:' Cur Min Max Avg\\n'";

$rrd_options .= " DEF:POS=" . $rrd_filename . ":PacketOutOfSequence:AVERAGE ";
$rrd_options .= " LINE1.25:POS#0000ee:'Out of Sequence ' ";
$rrd_options .= " LINE1.25:POS#0000ee:'Out of Sequence ' ";
$rrd_options .= " GPRINT:POS:LAST:%3.0lf ";
$rrd_options .= " GPRINT:POS:MIN:%3.0lf ";
$rrd_options .= " GPRINT:POS:MAX:%3.0lf\\\l ";
$rrd_options .= " GPRINT:POS:MAX:%3.0lf ";
$rrd_options .= " GPRINT:POS:AVERAGE:'%3.0lf'\\\l ";

$rrd_options .= " DEF:MIA=" . $rrd_filename . ":PacketMIA:AVERAGE ";
$rrd_options .= " LINE1.25:MIA#008C00:'Missing in Action ' ";
$rrd_options .= " LINE1.25:MIA#008C00:'Missing in Action ' ";
$rrd_options .= " GPRINT:MIA:LAST:%3.0lf ";
$rrd_options .= " GPRINT:MIA:MIN:%3.0lf ";
$rrd_options .= " GPRINT:MIA:MAX:%3.0lf\\\l ";
$rrd_options .= " GPRINT:MIA:MAX:%3.0lf ";
$rrd_options .= " GPRINT:MIA:AVERAGE:'%3.0lf'\\\l ";

$rrd_options .= " DEF:PLA=" . $rrd_filename . ":PacketLateArrival:AVERAGE ";
$rrd_options .= " LINE1.25:PLA#CC0000:'Late Arrival ' ";
$rrd_options .= " LINE1.25:PLA#CC0000:'Late Arrival ' ";
$rrd_options .= " GPRINT:PLA:LAST:%3.0lf ";
$rrd_options .= " GPRINT:PLA:MIN:%3.0lf ";
$rrd_options .= " GPRINT:PLA:MAX:%3.0lf\\\l ";
$rrd_options .= " GPRINT:PLA:MAX:%3.0lf ";
$rrd_options .= " GPRINT:PLA:AVERAGE:'%3.0lf'\\\l ";
}
11 changes: 6 additions & 5 deletions html/includes/graphs/device/sla_jitter-mos.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,12 @@
$rrd_filename = rrd_name($device['hostname'], array('sla', $sla['sla_nr'], 'jitter'));

if (file_exists($rrd_filename)) {
$rrd_options .= " COMMENT:' Cur Min Max\\n'";
$rrd_options .= " COMMENT:' Cur Min Max Avg\\n'";

$rrd_options .= " DEF:MOS=" . $rrd_filename . ":MOS:AVERAGE ";
$rrd_options .= " LINE1.25:MOS#0000ee:'Mean Opinion Score ' ";
$rrd_options .= " GPRINT:MOS:LAST:%3.0lf ";
$rrd_options .= " GPRINT:MOS:MIN:%3.0lf ";
$rrd_options .= " GPRINT:MOS:MAX:%3.0lf\\\l ";
$rrd_options .= " LINE1.25:MOS#0000ee:'Mean Opinion Score ' ";
$rrd_options .= " GPRINT:MOS:LAST:%3.2lf ";
$rrd_options .= " GPRINT:MOS:MIN:%3.2lf ";
$rrd_options .= " GPRINT:MOS:MAX:%3.2lf ";
$rrd_options .= " GPRINT:MOS:AVERAGE:'%3.2lf'\\\l ";
}
20 changes: 11 additions & 9 deletions html/includes/graphs/device/sla_jitter.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,19 @@
$rrd_filename = rrd_name($device['hostname'], array('sla', $sla['sla_nr'], 'jitter'));

if (file_exists($rrd_filename)) {
$rrd_options .= " COMMENT:' Cur Min Max\\n'";
$rrd_options .= " COMMENT:' Cur Min Max Avg\\n'";

$rrd_options .= " DEF:SD=" . $rrd_filename . ":AvgSDJ:AVERAGE ";
$rrd_options .= " LINE1.25:SD#0000ee:'Src to Dst ' ";
$rrd_options .= " GPRINT:SD:LAST:%3.0lf ";
$rrd_options .= " GPRINT:SD:MIN:%3.0lf ";
$rrd_options .= " GPRINT:SD:MAX:%3.0lf\\\l ";
$rrd_options .= " LINE1.25:SD#0000ee:'Src to Dst (ms) ' ";
$rrd_options .= " GPRINT:SD:LAST:'%5.2lf' ";
$rrd_options .= " GPRINT:SD:MIN:'%5.2lf' ";
$rrd_options .= " GPRINT:SD:MAX:'%5.2lf' ";
$rrd_options .= " GPRINT:SD:AVERAGE:'%5.2lf'\\\l ";

$rrd_options .= " DEF:DS=" . $rrd_filename . ":AvgDSJ:AVERAGE ";
$rrd_options .= " LINE1.25:DS#008C00:'Dst to Src ' ";
$rrd_options .= " GPRINT:DS:LAST:%3.0lf ";
$rrd_options .= " GPRINT:DS:MIN:%3.0lf ";
$rrd_options .= " GPRINT:DS:MAX:%3.0lf\\\l ";
$rrd_options .= " LINE1.25:DS#008C00:'Dst to Src (ms) ' ";
$rrd_options .= " GPRINT:DS:LAST:'%5.2lf' ";
$rrd_options .= " GPRINT:DS:MIN:'%5.2lf' ";
$rrd_options .= " GPRINT:DS:MAX:'%5.2lf' ";
$rrd_options .= " GPRINT:DS:AVERAGE:'%5.2lf'\\\l ";
}

0 comments on commit f7b68c4

Please sign in to comment.