device: Add NTP support for Allied Telesis AWPlus products (#8580)

* Add support for Allied Telesis AlliedWare Plus products

- Uses mibs from 5.4.7-2.1 for AlliedWare Plus products
- Updates Legacy AlliedWare mibs
- Added Allied Telesis svg

* Remove unnecessary "trim" from snmpget

* Add new line to end of file

* Minor fixes for commit

* awplus: initial ntp commit

This isn't completely working, however initial patch of it partially working

* awplus: Add NTP support

- Fixed polling issues for awplus. Now offset and delay graphs work.

- html/includes/graphs/device/ntp_*.inc.php
--  Removed extra "\" from MAX count which showed up in Graph legend

- html/includes/graphs/device/ntp_delay.inc.php
-- Present legend in either seconds, or milliseconds (depending on vendor)

- html/includes/graphs/device/ntp_dispersion.inc.php
-- Present legend in either seconds, or milliseconds (depending on vendor)

- html/includes/graphs/device/ntp_offset.inc.php
-- Removed rrd minimum (-l 0). This is because offset can be below 0.
--- It's better for the graph to auto scale than set a fixed minimum to display here.

- html/includes/graphs/device/ntp_stratum.inc.php
-- Changed graph to go from 0 to max of 16. NTP Stratum can only be 0 to 16.

* awplus: Add NTP test data

* updated awplus ntp poller

* device: awplus convert NTP poller into seconds

* device: fix NTP graph formatting

* device: Improve NTP formatting

* device: unset awplus NTP variable

* fix formatting

* device: awplus change NTP from numerical OIDs to named

* device: update awplus ntp json tests

* device: fix cisco and awplus ntp database creation

* device: update awplus json
This commit is contained in:
mattie47
2018-05-09 13:37:06 +12:00
committed by Tony Murray
parent b94ad929b8
commit e898075c36
11 changed files with 425 additions and 199 deletions

View File

@@ -21,7 +21,8 @@ $components = $components[$device['device_id']];
include "includes/graphs/common.inc.php";
$rrd_options .= " -l 0 -E ";
$rrd_options .= " COMMENT:'Delay Now Min Max\\n'";
$rrd_options .= " --vertical-label='Seconds'";
$rrd_options .= " COMMENT:'Delay (s) Now Min Max\\n'";
$rrd_additions = "";
$count = 0;
@@ -37,10 +38,10 @@ foreach ($components as $id => $array) {
}
$rrd_additions .= " DEF:DS" . $count . "=" . $rrd_filename . ":delay:AVERAGE ";
$rrd_additions .= " LINE1.25:DS" . $count . "#" . $color . ":'" . str_pad(substr($array['peer'].' (s)', 0, 15), 15) . "'" . $stack;
$rrd_additions .= " GPRINT:DS" . $count . ":LAST:%7.0lf ";
$rrd_additions .= " GPRINT:DS" . $count . ":MIN:%7.0lf ";
$rrd_additions .= " GPRINT:DS" . $count . ":MAX:%7.0lf\\\l ";
$rrd_additions .= " LINE1.25:DS" . $count . "#" . $color . ":'" . str_pad(substr($array['peer'], 0, 15), 15) . "'" . $stack;
$rrd_additions .= " GPRINT:DS" . $count . ":LAST:%7.2lf ";
$rrd_additions .= " GPRINT:DS" . $count . ":MIN:%7.2lf ";
$rrd_additions .= " GPRINT:DS" . $count . ":MAX:%7.2lf\\l ";
$count++;
}
}