Aaron Daniels 70a05369fb Merge branch 'master' into issue-3550
Conflicts:
	html/includes/graphs/device/sla.inc.php
	includes/polling/cisco-sla.inc.php

- Use standardised RRD functions
2016-08-12 08:22:40 +10:00

22 lines
745 B
PHP

<?php
require 'includes/graphs/common.inc.php';
$sla = dbFetchRow('SELECT `sla_nr` FROM `slas` WHERE `sla_id` = ?', array($vars['id']));
if ($sla['owner']) {
$name .= ' (Owner: '.$sla['owner'].')';
}
$rrd_filename = rrd_name($device['hostname'], array('sla', $sla['sla_nr']));
$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 ';