Files
librenms-librenms/includes/html/pages/device/nfsen.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

53 lines
1.5 KiB
PHP

<?php
print_optionbar_start();
$link_array = array(
'page' => 'device',
'device' => $device['device_id'],
'tab' => 'nfsen',
);
echo generate_link('General', $link_array, array('nfsen' => 'general'));
echo '|';
echo generate_link('Stats', $link_array, array('nfsen' => 'stats'));
$printedChannel = false;
$nfsen_hostname = nfsen_hostname($device['hostname']);
foreach (\LibreNMS\Config::get('nfsen_rrds') as $nfsenDir) {
$hostDir = $nfsenDir.'/'.$nfsen_hostname.'/';
if (is_dir($hostDir)) {
$nfsenRRDchannelGlob = $hostDir.'*.rrd';
foreach (glob($nfsenRRDchannelGlob) as $nfsenRRD) {
$channel = str_replace(array($hostDir, '.rrd'), '', $nfsenRRD);
if (!$printedChannel) {
echo '|Channels:';
$printedChannel = true;
} else {
echo ',';
}
if ($vars['channel'] == $channel) {
$channelFilter = $hostDir.$channel.'-filter.txt';
}
echo generate_link($channel, $link_array, array('nfsen' => 'channel', 'channel' => $channel));
}
}
}
print_optionbar_end();
if (!$vars['nfsen']) {
$vars['nfsen'] = 'general';
}
if (is_file('includes/html/pages/device/nfsen/'.mres($vars['nfsen']).'.inc.php')) {
include 'includes/html/pages/device/nfsen/'.mres($vars['nfsen']).'.inc.php';
} else {
include 'includes/html/pages/device/nfsen/general.inc.php';
}
$pagetitle[] = 'Netflow';