mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
* Email embed graphs * Allow attachment for non-html Add setting to webui Correct $auth setting * Cleanups, throw RrdGraphException instead of returning an error image. Generate the error image later, giving more control. Reduce code duplication a little * Style and lint fixes Change to flags * Add baseline for lint errors I don't know how to resolve * oopsie, changed the code after generating the baseline * Tiny cleanups. Make set DeviceCache primary, it is free. * Docs. * email_html note * Allow control of graph embed at the email transport level to override the global config. * Allow control of graph embed at the email transport level to override the global config. * Add INLINE_BASE64 to make it easier to create inline image tags
20 lines
639 B
PHP
20 lines
639 B
PHP
<?php
|
|
|
|
require 'includes/html/graphs/common.inc.php';
|
|
|
|
$rrd_filename = Rrd::name($device['hostname'], ['app', 'nginx', $app->app_id]);
|
|
|
|
if (Rrd::checkRrdExists($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'";
|
|
}
|