mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
git-svn-id: http://www.observium.org/svn/observer/trunk@3240 61d68cd4-352d-0410-923a-c4978735b2b8
28 lines
824 B
PHP
28 lines
824 B
PHP
<?php
|
|
|
|
// Polls ntp-client statistics from script via SNMP
|
|
|
|
$rrd_filename = $config['rrd_dir'] . "/" . $device['hostname'] . "/app-ntpclient-".$app['app_id'].".rrd";
|
|
$options = "-O qv";
|
|
$oid = "nsExtendOutputFull.9.110.116.112.99.108.105.101.110.116";
|
|
|
|
$ntpclient = snmp_get($device, $oid, $options);
|
|
|
|
echo(" ntp-client");
|
|
|
|
list ($offset, $frequency, $jitter, $noise, $stability) = explode("\n", $ntpclient);
|
|
|
|
if (!is_file($rrd_filename))
|
|
{
|
|
rrdtool_create($rrd_filename, "--step 300 \
|
|
DS:offset:GAUGE:600:-1000:1000 \
|
|
DS:frequency:GAUGE:600:-1000:1000 \
|
|
DS:jitter:GAUGE:600:-1000:1000 \
|
|
DS:noise:GAUGE:600:-1000:1000 \
|
|
DS:stability:GAUGE:600:-1000:1000 ".$config['rrd_rra']);
|
|
}
|
|
|
|
rrdtool_update($rrd_filename, "N:$offset:$frequency:$jitter:$noise:$stability");
|
|
|
|
?>
|