Files
librenms-librenms/html/includes/graphs/application/nginx_req.inc.php
Tony Murray 57650e4ffc Remove nfs requirement for distributed poller (with rrdtool 1.5+)
Use data_update instead of rrd_update/rrd_create and influx_update
Centralize rrd file check so we can check against a remote rrdcached server too
Use rrd_name() to generate rrd file names
2016-07-07 21:10:06 -05:00

23 lines
665 B
PHP

<?php
require 'includes/graphs/common.inc.php';
$rrd_filename = rrd_name($device['hostname'], array('app', 'nginx', $app['app_id']));
if (is_file($rrd_filename)) {
$rrd_options .= ' -b 1000 ';
$rrd_options .= ' -l 0 ';
$rrd_options .= ' DEF:a='.$rrd_filename.':Requests:AVERAGE';
$rrd_options .= " COMMENT:'Requests Current Average Maximum\\n'";
$rrd_options .= ' AREA:a#98FB98';
$rrd_options .= " LINE1.5:a#006400:'Requests '";
$rrd_options .= " GPRINT:a:LAST:'%6.2lf %s'";
$rrd_options .= " GPRINT:a:AVERAGE:'%6.2lf %s'";
$rrd_options .= " GPRINT:a:MAX:'%6.2lf %s\\n'";
}
else {
$error_msg = 'Missing RRD';
}