Files
librenms-librenms/doc/Extensions/NFSen.md
T
Tony MurrayandGitHub 699aa8a042 Consolidate configuration settings and implement dynamic webui settings (#9809)
* initial db/defaults dump

* numeric values

* Remove $config['time']

* Use config_definitions.json

* try setting definition as a complete array

* a little more

* fix format

* WIP converting dynamic setting pages

* rewriting the webui

* remove legacy and add translations

* finish email section

* improve navigation
update js a bit

* Import the remaining existing settings

* Update backend still some wip
migration

* fix config loading (db not overriding defaults)

* some cleanup

* more array collapsing

* update settings

* Settings search

* add purge settings to ui, order groups and sections

* collapse more arrays

* Auth definitions WIP

* remove needless slash escapes

* add warning to json

* moving settings from defaults.inc

* remove slow_statistics

* Move rrdtool settings to the poller section

* Use translations more consistently

* removing more settings from defaults.inc.php

* show setting name in tooltip

* allow help text to be shown on mobile

* disable settings that are set in config.php

* Implement undo and reset to default.

* Vue.js functional

* Vue.js WIP

* Implement tabs component

* accordion WIP

* lodash ver update

* two items

* Accordion somewhat working

* hash navigation

* Refine Accordion

* Fix up tab styling a bit

* Cleaner tab selected property
Hide html while loading

* spinner?

* Icon support
property for accordion to active

* WIP

* Tabs/Sections from ajax

* Setting Component skeletons

* Dynamic Component resolution

* Basic functionality

* toggle class

* Refactor components

* translate tabs and accordions

* simple array attempt

* improve readonly tooltip

* array styling

* array value editing

* organize snmp info

* Handle initial tab/section in url

* Use Laravel to parse tab/section, dump old

* Draggable array entries

* v-tooltip, for clickable (and touch) help tooltips
disable draggable

* Navigation WIP

* Navigation WIP

* groups computed

* filter settings

* fix event reference

* vue.js i18n initial

* missing description = just setting name

* en fallback

* tidy up the language support and js generation

* persist value to db

* fix issue with 0

* Delete settings from DB instead of setting them to default

* ldap-groups
fixup style

* Default dashboard selection

* fix array of options instead of object

* allow custom validation for settings

* translate options in SettingSelect

* SNMP v3 WIP

* fix setting arrays

* Split persist out of set

* Hook up events for SNMP v3 Auth
correct Config::persist behaviour with arrays

* dependent settings (primitive for now)
actually update the settings values in the LibrenmsSettings component

* more complex "when" behaviour

* remove un-needed seeder

* add poller_modules.cisco-qfp

* remove en.json (disable warning)

* don't set default for log_dir or log_file, otherwise it won't be processed correctly

* Fix module order
add some missing settings

* more config corrections

* correct graphs
correct loading values set to null (although it should have no difference)
remove project_name_version

* Add nfsen settings.  Docs are very confusing, so might have flubbed something
remove option for array definition of select option as numeric indexes messes it up

* Correct more upstream config differences

* Config cleanup after a bunch of merges.

* Fixes

* add version tags to js/css files
remove old js

* Print out full settings list read-only

* Add http_proxy setting
fix indents in config_definitions.json

* repeaters default is 0 (aka 20)

* cleanups

* rewrite the dynamic config docs

* add language docs

* Don't show snmp v3 auth add/remove if disabled by config.php
2019-10-16 21:22:05 +00:00

5.4 KiB

source: Extensions/NFSen.md path: blob/master/doc/

NFSen

The installation of NFSen is out of scope for this document / LibreNMS

Configuration

The following is the configuration that can be used:

$config['nfsen_enable'] = 1;
$config['nfsen_split_char']   = '_';
$config['nfsen_rrds'][]   = '/var/nfsen/profiles-stat/live/';
$config['nfsen_rrds'][] = '/var/nfsen/profiles-stat';
$config['nfsen_base'][] = '/var/nfsen/';
$config['nfsen_suffix']   = "_yourdomain_com";

Set $config['nfsen_enable'] = 1; to enable NFSen support.

$config['nfsen_rrds'] This value tells us where your NFSen rrd files live. This can also be an array to specify more directories like:

$config['nfsen_rrds'][] = '/var/nfsen/profiles-stat/sitea/';
$config['nfsen_rrds'][] = '/var/nfsen/profiles-stat/siteb/';

Although for most setups, it will look like below, with the profiles-stat/live directory being where it stores the general RRDs for data sources.

$config['nfsen_rrds'][] = '/var/nfsen/profiles-stat/live';

If you wish to render info for configure channels for a device, you need add the various profile-stat directories your system uses, which for most systems will be as below.

$config['nfsen_rrds'][] = '/var/nfsen/profiles-stat';

When adding sources to nfsen.conf, it is important to use the hostname that matches what is configured in LibreNMS, because the rrd files NfSen creates is named after the source name (ident), and it doesn't allow you to use an IP address instead. However, in LibreNMS, if your device is added by an IP address, add your source with any name of your choice, and create a symbolic link to the rrd file.

cd /var/nfsen/profiles-stat/sitea/
ln -s mychannel.rrd librenmsdeviceIP.rrd
$config['nfsen_split_char']   = '_';

This value tells us what to replace the full stops . in the devices hostname with.

$config['nfsen_suffix']   = "_yourdomain_com";

The above is a very important bit as device names in NfSen are limited to 21 characters. This means full domain names for devices can be very problematic to squeeze in, so therefor this chunk is usually removed.

On a similar note, NfSen profiles for channels should be created with the same name.

Stats Defaults and Settings

Below are the default settings used with nfdump for stats.

For more defaulted information on that, please see nfdump(1).

$config['nfsen_last_max'] = 153600;
$config['nfsen_top_max'] = 500;
$config['nfsen_top_N']=array( 10, 20, 50, 100, 200, 500 );
$config['nfsen_top_default']=20;
$config['nfsen_stat_default']='srcip';
$config['nfsen_order_default']='packets';
$config['nfsen_last_default']=900;
$config['nfsen_lasts']=array(
                            '300'=>'5 minutes',
                            '600'=>'10 minutes',
                            '900'=>'15 minutes',
                            '1800'=>'30 minutes',
                            '3600'=>'1 hour',
                            '9600'=>'3 hours',
                            '38400'=>'12 hours',
                            '76800'=>'24 hours',
                            '115200'=>'36 hours',
                            '153600'=>'48 hours',
                            );
$config['nfsen_last_max'] = 153600;

The above is the max value in seconds one may pull stats for. The higher this is, the more CPU and disk intensive the search will be.

Numbers larger than this will be set to this.

$config['nfsen_top_max'] = 500;

The above is max number of items to be displayed.

Numbers larger than this will be set to this.

$config['nfsen_top_N']=array( 10, 20, 50, 100, 200, 500 );

The above is a array containing a list for the drop down menu how many top items should be returned.

$config['nfsen_top_default']=20;

The above sets default top number to use from the drop down.

$config['nfsen_stat_default']='srcip';

The above sets default stat type to use from the drop down.

record  Flow Records
ip       Any IP Address
srcip    SRC IP Address
dstip    DST IP Address
port     Any Port
srcport  SRC Port
dstport  DST Port
srctos   SRC TOS
dsttos   DST TOS
tos      TOS
as       AS
srcas    SRC AS
dstas    DST AS
$config['nfsen_order_default']='packets';

The above sets default order type to use from the drop down. Any of the following below are currently supported.

flows    Number of total flows for the time period.
packet   Number of total packets for the time period.
bytes    Number of total bytes for the time period.
pps      Packets Per Second
bps      Bytes Per Second
bpp      Bytes Per Packet
$config['nfsen_last_default']=900;

The above is the last default to use from the drop down.

$config['nfsen_lasts']=array(
                            '300'=>'5 minutes',
                            '600'=>'10 minutes',
                            '900'=>'15 minutes',
                            '1800'=>'30 minutes',
                            '3600'=>'1 hour',
                            '9600'=>'3 hours',
                            '38400'=>'12 hours',
                            '76800'=>'24 hours',
                            '115200'=>'36 hours',
                            '153600'=>'48 hours',
                            );

The above associative array contains time intervals for how far back to go. The keys are the length in seconds and the value is just a description to display.