2020-06-22 22:57:30 +02:00
|
|
|
<?php
|
|
|
|
|
|
2023-02-28 18:00:13 -06:00
|
|
|
$ds = 'availability';
|
|
|
|
|
$unit_text = 'Availability(%)';
|
2020-06-22 22:57:30 +02:00
|
|
|
$float_precision = '3';
|
2023-05-10 22:03:51 +01:00
|
|
|
$scale_min = '0';
|
|
|
|
|
$scale_max = '100';
|
2020-06-22 22:57:30 +02:00
|
|
|
|
2023-08-24 14:40:33 -05:00
|
|
|
$duration = $vars['duration'] ?? 86400;
|
|
|
|
|
if ($duration > 86400) {
|
|
|
|
|
$rrd_filename = Rrd::name($device['hostname'], ['availability', $duration]);
|
2020-06-22 22:57:30 +02:00
|
|
|
|
2023-02-28 18:00:13 -06:00
|
|
|
$colour_line = '000000';
|
|
|
|
|
$colour_area = '8B8BEB44';
|
2020-06-22 22:57:30 +02:00
|
|
|
|
2023-02-28 18:00:13 -06:00
|
|
|
$colour_area_max = 'cc9999';
|
2020-06-22 22:57:30 +02:00
|
|
|
|
2023-08-24 14:40:33 -05:00
|
|
|
$line_text = \LibreNMS\Util\Time::formatInterval($duration);
|
2020-06-22 22:57:30 +02:00
|
|
|
|
2023-02-28 18:00:13 -06:00
|
|
|
$graph_title .= '::' . $line_text;
|
2020-06-22 22:57:30 +02:00
|
|
|
|
2023-02-28 18:00:13 -06:00
|
|
|
$graph_max = 1;
|
2020-06-22 22:57:30 +02:00
|
|
|
|
2023-02-28 18:00:13 -06:00
|
|
|
require 'includes/html/graphs/generic_simplex.inc.php';
|
|
|
|
|
} else {
|
2023-08-24 14:40:33 -05:00
|
|
|
$filename = Rrd::name($device['hostname'], ['availability', $duration]);
|
2023-02-28 18:00:13 -06:00
|
|
|
$descr = '';
|
2020-06-22 22:57:30 +02:00
|
|
|
|
2023-02-28 18:00:13 -06:00
|
|
|
require 'includes/html/graphs/generic_stats.inc.php';
|
|
|
|
|
}
|