mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
cdf457fbc5
* add poller * add a generic alert graph * add support for .total * add the initial work on the suricata app page * add applayer flow sources * more rrd work and add more fields * add a missing graph to the suricata page * add suricata to the apps page * all working now for suricata * add some suricata alert examples * all done with the php * update the application docs for Suricata * add another note about Suricata stats in the docs * add the test file * add the test JSON * remove a unneeded newline from the appication docs * correct the type uptime type * packets graph should by packets/sec * minor formatting cleanup * one more minor formatting cleanup * shot in the dark to see if something fixes the angry linter * fix snmpsim file * add metrics * add values to the metrics * add a missing comma to the json * add a missing line to snmprec and cleanup json a bit * a few more minor changes to see if this makes it happy... regened via scripts/json-app-tool.php * see if this will make it happy * add suricata to app discovery and hope that fixes it... take a shot in the dark as to why the linter errors strangely on two of the files * fix json * add a missing ] to the json * rename two graphs so it does not trigger one alert and add a missing metric * whoops, *_alertString is not a metric
30 lines
710 B
PHP
30 lines
710 B
PHP
<?php
|
|
|
|
$name = 'suricata';
|
|
$app_id = $app['app_id'];
|
|
$unit_text = 'bytes/sec';
|
|
$colours = 'psychedelic';
|
|
$dostack = 0;
|
|
$printtotal = 0;
|
|
$addarea = 0;
|
|
$transparency = 15;
|
|
|
|
if (isset($vars['instance'])) {
|
|
$rrd_filename = Rrd::name($device['hostname'], ['app', $name, $app['app_id'], $vars['instance']]);
|
|
} 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';
|