Files
librenms-librenms/includes/html/graphs/device/availability.inc.php
SourceDoctor 4e6a7291a2 Device Availability Calculation (#11784)
* Device Availability Calculation

* Travis fix

* .

* schema corrections

* flexible duration

* travis

* .

* .

* .

* .

* remove not needed code

* line Text to RRD

* update humantime

* .

* only set up again if device was marked as down

* set RRD area transparency

* save uptime also, to keep last availability as good as possible

* file description correction

* look for outages even if uptime > duration
2020-06-22 22:57:30 +02:00

26 lines
487 B
PHP

<?php
$scale_min = '0';
$scale_max = '100';
$float_precision = '3';
$rrd_filename = rrd_name($device['hostname'], array('availability', $vars['duration']));
$ds = 'availability';
$colour_line = '000000';
$colour_area = '8B8BEB44';
$colour_area_max = 'cc9999';
$line_text = \LibreNMS\Util\Time::humanTime($vars['duration']);
$graph_title .= '::'.$line_text;
$graph_max = 1;
$graph_min = 0;
$unit_text = 'Availability(%)';
require 'includes/html/graphs/generic_simplex.inc.php';