mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
* add sagan instance fetch function * add sagan discovery * add sagan poller * add sagan graphs * add graph sources * add sagan to apps page * remove alert * more app graph work * polling fix * re-order keys and add alert key * correct field key usage * add alert and fix a missing unit * more unit fixes * add alert status * add alert rules for sagan * fix a missing : after S while I am here in the json stat tool helper... also add tests * now add the tests * add docs * point php-cs-fixer at two files * remove-unneeded sagan instance fetch function * convert to use app_data * style fix * apply bennet-esyoil's suggestions here as well * update for the new app model * convert poller to the new method * convert the sagan device app page * convert sagan * doc cleanup
29 lines
675 B
PHP
29 lines
675 B
PHP
<?php
|
|
|
|
$name = 'sagan';
|
|
$unit_text = 'Bytes';
|
|
$colours = 'psychedelic';
|
|
$dostack = 0;
|
|
$printtotal = 0;
|
|
$addarea = 0;
|
|
$transparency = 15;
|
|
|
|
if (isset($vars['sinstance'])) {
|
|
$rrd_filename = Rrd::name($device['hostname'], ['app', $name, $app->app_id, $vars['sinstance']]);
|
|
} else {
|
|
$rrd_filename = Rrd::name($device['hostname'], ['app', $name, $app->app_id]);
|
|
}
|
|
|
|
$rrd_list = [];
|
|
if (Rrd::checkRrdExists($rrd_filename)) {
|
|
$rrd_list[] = [
|
|
'filename' => $rrd_filename,
|
|
'descr' => 'Bytes',
|
|
'ds' => 'bytes',
|
|
];
|
|
} else {
|
|
d_echo('RRD "' . $rrd_filename . '" not found');
|
|
}
|
|
|
|
require 'includes/html/graphs/generic_multi_line.inc.php';
|