Files
librenms-librenms/includes/html/graphs/device/sla.inc.php
PipoCanaja 7e2ce6179a Added VRP ICMP SLA (NQA in huawei naming) support (#12973)
* added VRP icmpAppl SLA (NQA in huawei naming) support

* style

* style

* remove unnecessary values in RRD

* enable SLA for VRP devices

* tests
2021-07-03 15:16:38 +02:00

24 lines
770 B
PHP

<?php
require 'includes/html/graphs/common.inc.php';
$sla = dbFetchRow('SELECT `sla_nr` FROM `slas` WHERE `sla_id` = ?', [$vars['id']]);
if ($sla['owner']) {
$name .= ' (Owner: ' . $sla['owner'] . ')';
}
$rrd_filename = Rrd::name($device['hostname'], ['sla', $sla['sla_nr']]);
$rrd_options .= ' -l 0 ';
$rrd_options .= " COMMENT:'Round Trip Time Cur Min Max\\n'";
$rrd_options .= " DEF:rtt=$rrd_filename:rtt:AVERAGE ";
$rrd_options .= ' VDEF:avg=rtt,AVERAGE ';
$rrd_options .= " LINE1:avg#CCCCFF:'Average':dashes";
$rrd_options .= ' GPRINT:rtt:AVERAGE:%4.1lfms\\l ';
$rrd_options .= " LINE1:rtt#CC0000:'RTT'";
$rrd_options .= ' GPRINT:rtt:LAST:%4.1lfms ';
$rrd_options .= ' GPRINT:rtt:MIN:%4.1lfms ';
$rrd_options .= ' GPRINT:rtt:MAX:%4.1lfms\\l ';