librenms/includes/discovery/ntp.inc.php

37 lines
1.1 KiB
PHP
Raw Normal View History

<?php
/*
* LibreNMS module to capture NTP statistics
*
* Copyright (c) 2016 Aaron Daniels <aaron@daniels.id.au>
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version. Please see LICENSE.txt at the top level of
* the source code distribution for details.
*
* This module will display NTP details from various device types.
* To display, modules must store data in for following format:
* Array
* (
* [UID] => 9093
* [peer] => 10.0.99.66
* [port] => 123
* [stratum] => 4
* [peerref] => 131.242.253.96
* [label] => 10.0.99.66:123
* [status] => 0
* [error] =>
* )
*/
2018-04-25 02:20:21 +00:00
use LibreNMS\Config;
if (file_exists(Config::get('install_dir') . "/includes/discovery/ntp/{$device['os_group']}.inc.php")) {
include Config::get('install_dir') . "/includes/discovery/ntp/{$device['os_group']}.inc.php";
}
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
2018-05-09 01:37:06 +00:00
if ($device['os'] == 'awplus') {
include 'includes/discovery/ntp/awplus.inc.php';
}