Files
librenms-librenms/includes/html/graphs/device/nfsen_common.inc.php
Zane C. Bowers-Hadley 0a6ded9ba3 nfdump support for with NFSen (#10376)
* rework the nfsen stuff

* add the new netflow stats page

* update the docs for nfsen

* add the functions back in

* readd the defaults

* rework lowest_five_minutes into lowest_time

* nfsen_channel_rrds removed and will rework it in later post rewriting

* rework something that accidentally got nuked in merging

* rework formatting a bit

* remove a accidentaly added chunk of text =^.^=

* rework some tag capitalization

* remove a accidentally added [

* '='=>' = '
2019-08-06 19:16:34 -05:00

45 lines
1.2 KiB
PHP

<?php
$simple_rrd = true;
foreach ((array)\LibreNMS\Config::get('nfsen_rrds', []) as $nfsenrrds) {
if ($nfsenrrds[(strlen($nfsenrrds) - 1)] != '/') {
$nfsenrrds .= '/';
}
$nfsen_filename=nfsen_hostname($device['hostname']);
if (is_file($nfsenrrds.$nfsen_filename.'.rrd')) {
$rrd_filename = $nfsenrrds.$nfsen_filename.'.rrd';
$flowtypes = array('tcp', 'udp', 'icmp', 'other');
$rrd_list = array();
$nfsen_iter = 1;
foreach ($flowtypes as $flowtype) {
$rrd_list[$nfsen_iter]['filename'] = $rrd_filename;
$rrd_list[$nfsen_iter]['descr'] = $flowtype;
$rrd_list[$nfsen_iter]['ds'] = $dsprefix.$flowtype;
// set a multiplier which in turn will create a CDEF if this var is set
if ($dsprefix == 'traffic_') {
$multiplier = '8';
}
$colours = 'blues';
$nototal = 0;
$units = '';
$unit_text = $dsdescr;
$scale_min = '0';
if ($_GET['debug']) {
print_r($rrd_list);
}
$nfsen_iter++;
}
}
}
require 'includes/html/graphs/generic_multi_simplex_seperated.inc.php';