mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
add NTP client/server application poller. fix powerdns_latency graphtype. from Dennis de Houx.
git-svn-id: http://www.observium.org/svn/observer/trunk@2612 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
20
html/includes/graphs/application/ntpclient_freq.inc.php
Normal file
20
html/includes/graphs/application/ntpclient_freq.inc.php
Normal file
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
include("includes/graphs/common.inc.php");
|
||||
|
||||
$scale_min = 0;
|
||||
$ds = "frequency";
|
||||
$colour_area = "F6F6F6";
|
||||
$colour_line = "B3D0DB";
|
||||
$colour_area_max = "FFEE99";
|
||||
$graph_max = 100;
|
||||
$unit_text = "Frequency";
|
||||
$ntpclient_rrd = $config['rrd_dir'] . "/" . $device['hostname'] . "/app-ntpclient-".$app['app_id'].".rrd";
|
||||
|
||||
if (is_file($ntpclient_rrd)) {
|
||||
$rrd_filename = $ntpclient_rrd;
|
||||
}
|
||||
|
||||
include("includes/graphs/generic_simplex.inc.php");
|
||||
|
||||
?>
|
32
html/includes/graphs/application/ntpclient_stats.inc.php
Normal file
32
html/includes/graphs/application/ntpclient_stats.inc.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
include("includes/graphs/common.inc.php");
|
||||
|
||||
$colours = "mixed";
|
||||
$nototal = (($width<224) ? 1 : 0);
|
||||
$unit_text = "Milliseconds";
|
||||
$rrd_filename = $config['rrd_dir'] . "/" . $device['hostname'] . "/app-ntpclient-".$app['app_id'].".rrd";
|
||||
$array = array(
|
||||
'offset' => array('descr' => 'Offset'),
|
||||
'jitter' => array('descr' => 'Jitter'),
|
||||
'noise' => array('descr' => 'Noise'),
|
||||
'stability' => array('descr' => 'Stability')
|
||||
);
|
||||
|
||||
$i = 0;
|
||||
|
||||
if (is_file($rrd_filename)) {
|
||||
foreach ($array as $ds => $vars) {
|
||||
$rrd_list[$i]['filename'] = $rrd_filename;
|
||||
$rrd_list[$i]['descr'] = $vars['descr'];
|
||||
$rrd_list[$i]['ds'] = $ds;
|
||||
$rrd_list[$i]['colour'] = $config['graph_colours'][$colours][$i];
|
||||
$i++;
|
||||
}
|
||||
} else {
|
||||
echo("file missing: $file");
|
||||
}
|
||||
|
||||
include("includes/graphs/generic_multi_line.inc.php");
|
||||
|
||||
?>
|
33
html/includes/graphs/application/ntpdserver_bits.inc.php
Normal file
33
html/includes/graphs/application/ntpdserver_bits.inc.php
Normal file
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
// $units = "b";
|
||||
// $total_units = "B";
|
||||
// $colours_in = "greens";
|
||||
//$multiplier = "0";
|
||||
// $colours_out = "blues";
|
||||
|
||||
$nototal = 1;
|
||||
|
||||
$ds_in = "packets_recv";
|
||||
$ds_out = "packets_sent";
|
||||
|
||||
$graph_title .= "::packets";
|
||||
$unit_text = "Packets";
|
||||
|
||||
$colour_line_in = "330033";
|
||||
$colour_line_out = "FF6600";
|
||||
$colour_area_in = "AA66AA";
|
||||
$colour_area_out = "FFDD88";
|
||||
$colour_area_in_max = "CC88CC";
|
||||
$colour_area_out_max= "FFEFAA";
|
||||
|
||||
$ntpdserver_rrd = $config['rrd_dir'] . "/". $device['hostname'] . "/app-ntpdserver-".$app['app_id'].".rrd";
|
||||
|
||||
if (is_file($ntpdserver_rrd)) {
|
||||
$rrd_filename = $ntpdserver_rrd;
|
||||
}
|
||||
|
||||
// include("includes/graphs/generic_bits.inc.php");
|
||||
include("includes/graphs/generic_duplex.inc.php");
|
||||
|
||||
?>
|
20
html/includes/graphs/application/ntpdserver_freq.inc.php
Normal file
20
html/includes/graphs/application/ntpdserver_freq.inc.php
Normal file
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
include("includes/graphs/common.inc.php");
|
||||
|
||||
$scale_min = 0;
|
||||
$ds = "frequency";
|
||||
$colour_area = "F6F6F6";
|
||||
$colour_line = "B3D0DB";
|
||||
$colour_area_max = "FFEE99";
|
||||
$graph_max = 100;
|
||||
$unit_text = "Frequency";
|
||||
$ntpdserver_rrd = $config['rrd_dir'] . "/" . $device['hostname'] . "/app-ntpdserver-".$app['app_id'].".rrd";
|
||||
|
||||
if (is_file($ntpdserver_rrd)) {
|
||||
$rrd_filename = $ntpdserver_rrd;
|
||||
}
|
||||
|
||||
include("includes/graphs/generic_simplex.inc.php");
|
||||
|
||||
?>
|
31
html/includes/graphs/application/ntpdserver_packets.inc.php
Normal file
31
html/includes/graphs/application/ntpdserver_packets.inc.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
include("includes/graphs/common.inc.php");
|
||||
|
||||
$scale_min = 0;
|
||||
$nototal = (($width<224) ? 1 : 0);
|
||||
$unit_text = "Packets";
|
||||
$rrd_filename = $config['rrd_dir'] . "/" . $device['hostname'] . "/app-ntpdserver-".$app['app_id'].".rrd";
|
||||
$array = array(
|
||||
'packets_drop' => array('descr' => 'Dropped', 'colour' => '880000FF'),
|
||||
'packets_ignore' => array('descr' => 'Ignored', 'colour' => 'FF8800FF')
|
||||
);
|
||||
|
||||
$i = 0;
|
||||
|
||||
if (is_file($rrd_filename)) {
|
||||
foreach ($array as $ds => $vars) {
|
||||
$rrd_list[$i]['filename'] = $rrd_filename;
|
||||
$rrd_list[$i]['descr'] = $vars['descr'];
|
||||
$rrd_list[$i]['ds'] = $ds;
|
||||
$rrd_list[$i]['colour'] = $vars['colour'];
|
||||
$i++;
|
||||
}
|
||||
} else {
|
||||
echo("file missing: $file");
|
||||
}
|
||||
|
||||
// include("includes/graphs/generic_multi_line.inc.php");
|
||||
include("includes/graphs/generic_multi_simplex_seperated.inc.php");
|
||||
|
||||
?>
|
32
html/includes/graphs/application/ntpdserver_stats.inc.php
Normal file
32
html/includes/graphs/application/ntpdserver_stats.inc.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
include("includes/graphs/common.inc.php");
|
||||
|
||||
$colours = "mixed";
|
||||
$nototal = (($width<224) ? 1 : 0);
|
||||
$unit_text = "Milliseconds";
|
||||
$rrd_filename = $config['rrd_dir'] . "/" . $device['hostname'] . "/app-ntpdserver-".$app['app_id'].".rrd";
|
||||
$array = array(
|
||||
'offset' => array('descr' => 'Offset'),
|
||||
'jitter' => array('descr' => 'Jitter'),
|
||||
'noise' => array('descr' => 'Noise'),
|
||||
'stability' => array('descr' => 'Stability')
|
||||
);
|
||||
|
||||
$i = 0;
|
||||
|
||||
if (is_file($rrd_filename)) {
|
||||
foreach ($array as $ds => $vars) {
|
||||
$rrd_list[$i]['filename'] = $rrd_filename;
|
||||
$rrd_list[$i]['descr'] = $vars['descr'];
|
||||
$rrd_list[$i]['ds'] = $ds;
|
||||
$rrd_list[$i]['colour'] = $config['graph_colours'][$colours][$i];
|
||||
$i++;
|
||||
}
|
||||
} else {
|
||||
echo("file missing: $file");
|
||||
}
|
||||
|
||||
include("includes/graphs/generic_multi_line.inc.php");
|
||||
|
||||
?>
|
20
html/includes/graphs/application/ntpdserver_stratum.inc.php
Normal file
20
html/includes/graphs/application/ntpdserver_stratum.inc.php
Normal file
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
include("includes/graphs/common.inc.php");
|
||||
|
||||
$scale_min = 0;
|
||||
$ds = "stratum";
|
||||
$colour_area = "FFCECE";
|
||||
$colour_line = "880000";
|
||||
$colour_area_max = "FFCCCC";
|
||||
$graph_max = 0;
|
||||
$unit_text = "Stratum";
|
||||
$ntpdserver_rrd = $config['rrd_dir'] . "/" . $device['hostname'] . "/app-ntpdserver-".$app['app_id'].".rrd";
|
||||
|
||||
if (is_file($ntpdserver_rrd)) {
|
||||
$rrd_filename = $ntpdserver_rrd;
|
||||
}
|
||||
|
||||
include("includes/graphs/generic_simplex.inc.php");
|
||||
|
||||
?>
|
36
html/includes/graphs/application/ntpdserver_uptime.inc.php
Normal file
36
html/includes/graphs/application/ntpdserver_uptime.inc.php
Normal file
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
include("includes/graphs/common.inc.php");
|
||||
|
||||
$scale_min = 0;
|
||||
$ds = "uptime";
|
||||
//$colour_area = "CEFFCE";
|
||||
//$colour_line = "008800";
|
||||
$colour_area = "EEEEEE";
|
||||
$colour_line = "36393D";
|
||||
$colour_area_max = "FFEE99";
|
||||
$graph_max = 0;
|
||||
$unit_text = "Seconds";
|
||||
$ntpdserver_rrd = $config['rrd_dir'] . "/" . $device['hostname'] . "/app-ntpdserver-".$app['app_id'].".rrd";
|
||||
|
||||
if (is_file($ntpdserver_rrd)) {
|
||||
$rrd_filename = $ntpdserver_rrd;
|
||||
}
|
||||
|
||||
include("includes/graphs/common.inc.php");
|
||||
|
||||
$rrd_options .= " DEF:uptime=".$rrd_filename.":uptime:AVERAGE";
|
||||
$rrd_options .= " CDEF:cuptime=uptime,86400,/";
|
||||
if ($width<224) {
|
||||
$rrd_options .= " 'COMMENT:Days Cur Min Max Avg\\n'";
|
||||
} else {
|
||||
$rrd_options .= " 'COMMENT:Days Current Minimum Maximum Average\\n'";
|
||||
}
|
||||
$rrd_options .= " AREA:cuptime#".$colour_area.":";
|
||||
$rrd_options .= " LINE1.25:cuptime#".$colour_line.":Uptime";
|
||||
$rrd_options .= " GPRINT:cuptime:LAST:%6.2lf";
|
||||
$rrd_options .= " GPRINT:cuptime:AVERAGE:%6.2lf";
|
||||
$rrd_options .= " GPRINT:cuptime:MAX:%6.2lf";
|
||||
$rrd_options .= " GPRINT:cuptime:AVERAGE:%6.2lf\\n";
|
||||
|
||||
?>
|
@@ -4,8 +4,8 @@
|
||||
|
||||
$scale_min = 0;
|
||||
$ds = "latency";
|
||||
$colour_area = "6699FF";
|
||||
$colour_line = "336699";
|
||||
$colour_area = "F6F6F6";
|
||||
$colour_line = "B3D0DB";
|
||||
$colour_area_max = "FFEE99";
|
||||
$graph_max = 100;
|
||||
$unit_text = "Latency";
|
||||
|
Reference in New Issue
Block a user