convert NTP freq to use generic_stats (#14834)

This commit is contained in:
Zane C. Bowers-Hadley
2023-03-08 16:23:31 -06:00
committed by GitHub
parent f0c9e1f275
commit 2a53c49a5c
2 changed files with 7 additions and 19 deletions

View File

@@ -1,17 +1,11 @@
<?php
require 'includes/html/graphs/common.inc.php';
$ds = 'frequency';
$colour_area = \LibreNMS\Config::get('graph_colours.pinks.0') . '33';
$colour_line = \LibreNMS\Config::get('graph_colours.pinks.0');
$colour_area_max = 'FFEE99';
$graph_max = 100;
$unit_text = 'Frequency';
$ntpclient_rrd = Rrd::name($device['hostname'], ['app', 'ntp-client', $app->app_id]);
$filename = Rrd::name($device['hostname'], ['app', 'ntp-client', $app->app_id]);
if (Rrd::checkRrdExists($ntpclient_rrd)) {
$rrd_filename = $ntpclient_rrd;
if (! Rrd::checkRrdExists($filename)) {
d_echo('RRD "' . $filename . '" not found');
}
require 'includes/html/graphs/generic_simplex.inc.php';
require 'includes/html/graphs/generic_stats.inc.php';

View File

@@ -1,17 +1,11 @@
<?php
require 'includes/html/graphs/common.inc.php';
$ds = 'frequency';
$colour_area = \LibreNMS\Config::get('graph_colours.pinks.0') . '33';
$colour_line = \LibreNMS\Config::get('graph_colours.pinks.0');
$colour_area_max = 'FFEE99';
$graph_max = 100;
$unit_text = 'Frequency';
$ntpdserver_rrd = Rrd::name($device['hostname'], ['app', 'ntp-server', $app->app_id]);
$filename = Rrd::name($device['hostname'], ['app', 'ntp-server', $app->app_id]);
if (Rrd::checkRrdExists($ntpdserver_rrd)) {
$rrd_filename = $ntpdserver_rrd;
if (! Rrd::checkRrdExists($filename)) {
d_echo('RRD "' . $filename . '" not found');
}
require 'includes/html/graphs/generic_simplex.inc.php';