Files
librenms-librenms/doc/Extensions/NFSen.md

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

195 lines
5.6 KiB
Markdown
Raw Normal View History

# NFSen
> The installation of NFSen is out of scope for this document / LibreNMS
## Configuration
The following is the configuration that can be used:
!!! setting "external/nfsen"
```bash
lnms config:set nfsen_enable true
lnms config:set nfsen_split_char '_'
lnms config:set nfsen_rrds.+ '/var/nfsen/profiles-stat/live/'
lnms config:set nfsen_rrds.+ '/var/nfsen/profiles-stat'
lnms config:set nfsen_base.+ '/var/nfsen/'
lnms config:set nfsen_suffix '_yourdomain_com'
```
Set `lnms config:set nfsen_enable true` to enable NFSen support.
`nfsen_rrds` This value tells us where your NFSen rrd files
live. This can also be an array to specify more directories like:
!!! setting "external/nfsen"
```bash
lnms config:set nfsen_rrds.+ '/var/nfsen/profiles-stat/sitea/'
lnms config:set 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.
feature: Updated Nfsen integration support (#6003) * add single pool based poller for php-fpm * add the page for php-fpm * add graph for php-fpm * I agree to the conditions of the Contributor Agreement contained in doc/General/Contributing.md. * use named OID as suggest by @laf * document PHP-FPM monitoring * link it in the index * clean up the named oid * add how to grab the script in question * add f2b poller * add f2b app page * add f2b graph * add fail2ban notes * minor formatting cleanup * ...more formatting cleanup * rename it so it can be called via the app page * Revert "rename it so it can be called via the app page" This reverts commit 0bde88a03840138fa28b75606e3cd269ce023f67. * *rename it so it can be called via the apps page *setup the apps page to call it * renamed the graph * now include fail2ban in the apps properly * correct the wget command so it does not stomp on phpfpm-sp * update the fail2ban poller for the newest fail2ban script and now build multiple RRDs * update for now graphing firewalled and banned * update fail2ban docs to match the newest snmpd extend method * search automatically for jails and graph them * graphs the currently banned for a fail2ban jail * change the tital of the graph for the total banned to make it more descriptive * Add a explanation of the two variables in the total graph. * misc. white space cleans ups * misc. white space cleanup * minor white space cleanup * correct descr lenght * correct descr lenght * Update fail2ban.inc.php * Use rrd_name properly * note the cache file bits * make caching optional and note why * Update to new RrdDefinition class * And the use statement ;/ * Messed the second rrd_def * correct two minor errors that did not seem to be causing issues * don't use $vars as per pull #5994 * don't use $vars as per pull #5994 * fix jails graphs * Remove loops and temp variables * whitespace * Change graph so we don't get fractions * add the common nfsen channel include * add nfsen channel flows graph * add nfsen channel packet graph * add nfsen channel traffic graph * update nfsen for channel support * the nfsen general page * add the nfsen channel page * update the docs on nfsen to be more clear about configuring it * white space cleanup * white space cleanup * misc code cleanup * now consistently uses all the same quotes * minor code cleanups * Update nfsen_channel_common.inc.php * minor white space cleanup
2017-03-02 09:03:45 -06:00
!!! setting "external/nfsen"
```bash
lnms config:set nfsen_rrds.+ '/var/nfsen/profiles-stat/live'
```
feature: Updated Nfsen integration support (#6003) * add single pool based poller for php-fpm * add the page for php-fpm * add graph for php-fpm * I agree to the conditions of the Contributor Agreement contained in doc/General/Contributing.md. * use named OID as suggest by @laf * document PHP-FPM monitoring * link it in the index * clean up the named oid * add how to grab the script in question * add f2b poller * add f2b app page * add f2b graph * add fail2ban notes * minor formatting cleanup * ...more formatting cleanup * rename it so it can be called via the app page * Revert "rename it so it can be called via the app page" This reverts commit 0bde88a03840138fa28b75606e3cd269ce023f67. * *rename it so it can be called via the apps page *setup the apps page to call it * renamed the graph * now include fail2ban in the apps properly * correct the wget command so it does not stomp on phpfpm-sp * update the fail2ban poller for the newest fail2ban script and now build multiple RRDs * update for now graphing firewalled and banned * update fail2ban docs to match the newest snmpd extend method * search automatically for jails and graph them * graphs the currently banned for a fail2ban jail * change the tital of the graph for the total banned to make it more descriptive * Add a explanation of the two variables in the total graph. * misc. white space cleans ups * misc. white space cleanup * minor white space cleanup * correct descr lenght * correct descr lenght * Update fail2ban.inc.php * Use rrd_name properly * note the cache file bits * make caching optional and note why * Update to new RrdDefinition class * And the use statement ;/ * Messed the second rrd_def * correct two minor errors that did not seem to be causing issues * don't use $vars as per pull #5994 * don't use $vars as per pull #5994 * fix jails graphs * Remove loops and temp variables * whitespace * Change graph so we don't get fractions * add the common nfsen channel include * add nfsen channel flows graph * add nfsen channel packet graph * add nfsen channel traffic graph * update nfsen for channel support * the nfsen general page * add the nfsen channel page * update the docs on nfsen to be more clear about configuring it * white space cleanup * white space cleanup * misc code cleanup * now consistently uses all the same quotes * minor code cleanups * Update nfsen_channel_common.inc.php * minor white space cleanup
2017-03-02 09:03:45 -06:00
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.
feature: Updated Nfsen integration support (#6003) * add single pool based poller for php-fpm * add the page for php-fpm * add graph for php-fpm * I agree to the conditions of the Contributor Agreement contained in doc/General/Contributing.md. * use named OID as suggest by @laf * document PHP-FPM monitoring * link it in the index * clean up the named oid * add how to grab the script in question * add f2b poller * add f2b app page * add f2b graph * add fail2ban notes * minor formatting cleanup * ...more formatting cleanup * rename it so it can be called via the app page * Revert "rename it so it can be called via the app page" This reverts commit 0bde88a03840138fa28b75606e3cd269ce023f67. * *rename it so it can be called via the apps page *setup the apps page to call it * renamed the graph * now include fail2ban in the apps properly * correct the wget command so it does not stomp on phpfpm-sp * update the fail2ban poller for the newest fail2ban script and now build multiple RRDs * update for now graphing firewalled and banned * update fail2ban docs to match the newest snmpd extend method * search automatically for jails and graph them * graphs the currently banned for a fail2ban jail * change the tital of the graph for the total banned to make it more descriptive * Add a explanation of the two variables in the total graph. * misc. white space cleans ups * misc. white space cleanup * minor white space cleanup * correct descr lenght * correct descr lenght * Update fail2ban.inc.php * Use rrd_name properly * note the cache file bits * make caching optional and note why * Update to new RrdDefinition class * And the use statement ;/ * Messed the second rrd_def * correct two minor errors that did not seem to be causing issues * don't use $vars as per pull #5994 * don't use $vars as per pull #5994 * fix jails graphs * Remove loops and temp variables * whitespace * Change graph so we don't get fractions * add the common nfsen channel include * add nfsen channel flows graph * add nfsen channel packet graph * add nfsen channel traffic graph * update nfsen for channel support * the nfsen general page * add the nfsen channel page * update the docs on nfsen to be more clear about configuring it * white space cleanup * white space cleanup * misc code cleanup * now consistently uses all the same quotes * minor code cleanups * Update nfsen_channel_common.inc.php * minor white space cleanup
2017-03-02 09:03:45 -06:00
!!! setting "external/nfsen"
```bash
lnms config:set nfsen_rrds.+ '/var/nfsen/profiles-stat'
```
feature: Updated Nfsen integration support (#6003) * add single pool based poller for php-fpm * add the page for php-fpm * add graph for php-fpm * I agree to the conditions of the Contributor Agreement contained in doc/General/Contributing.md. * use named OID as suggest by @laf * document PHP-FPM monitoring * link it in the index * clean up the named oid * add how to grab the script in question * add f2b poller * add f2b app page * add f2b graph * add fail2ban notes * minor formatting cleanup * ...more formatting cleanup * rename it so it can be called via the app page * Revert "rename it so it can be called via the app page" This reverts commit 0bde88a03840138fa28b75606e3cd269ce023f67. * *rename it so it can be called via the apps page *setup the apps page to call it * renamed the graph * now include fail2ban in the apps properly * correct the wget command so it does not stomp on phpfpm-sp * update the fail2ban poller for the newest fail2ban script and now build multiple RRDs * update for now graphing firewalled and banned * update fail2ban docs to match the newest snmpd extend method * search automatically for jails and graph them * graphs the currently banned for a fail2ban jail * change the tital of the graph for the total banned to make it more descriptive * Add a explanation of the two variables in the total graph. * misc. white space cleans ups * misc. white space cleanup * minor white space cleanup * correct descr lenght * correct descr lenght * Update fail2ban.inc.php * Use rrd_name properly * note the cache file bits * make caching optional and note why * Update to new RrdDefinition class * And the use statement ;/ * Messed the second rrd_def * correct two minor errors that did not seem to be causing issues * don't use $vars as per pull #5994 * don't use $vars as per pull #5994 * fix jails graphs * Remove loops and temp variables * whitespace * Change graph so we don't get fractions * add the common nfsen channel include * add nfsen channel flows graph * add nfsen channel packet graph * add nfsen channel traffic graph * update nfsen for channel support * the nfsen general page * add the nfsen channel page * update the docs on nfsen to be more clear about configuring it * white space cleanup * white space cleanup * misc code cleanup * now consistently uses all the same quotes * minor code cleanups * Update nfsen_channel_common.inc.php * minor white space cleanup
2017-03-02 09:03:45 -06:00
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.
```bash
cd /var/nfsen/profiles-stat/sitea/
ln -s mychannel.rrd librenmsdeviceIP.rrd
```
feature: Updated Nfsen integration support (#6003) * add single pool based poller for php-fpm * add the page for php-fpm * add graph for php-fpm * I agree to the conditions of the Contributor Agreement contained in doc/General/Contributing.md. * use named OID as suggest by @laf * document PHP-FPM monitoring * link it in the index * clean up the named oid * add how to grab the script in question * add f2b poller * add f2b app page * add f2b graph * add fail2ban notes * minor formatting cleanup * ...more formatting cleanup * rename it so it can be called via the app page * Revert "rename it so it can be called via the app page" This reverts commit 0bde88a03840138fa28b75606e3cd269ce023f67. * *rename it so it can be called via the apps page *setup the apps page to call it * renamed the graph * now include fail2ban in the apps properly * correct the wget command so it does not stomp on phpfpm-sp * update the fail2ban poller for the newest fail2ban script and now build multiple RRDs * update for now graphing firewalled and banned * update fail2ban docs to match the newest snmpd extend method * search automatically for jails and graph them * graphs the currently banned for a fail2ban jail * change the tital of the graph for the total banned to make it more descriptive * Add a explanation of the two variables in the total graph. * misc. white space cleans ups * misc. white space cleanup * minor white space cleanup * correct descr lenght * correct descr lenght * Update fail2ban.inc.php * Use rrd_name properly * note the cache file bits * make caching optional and note why * Update to new RrdDefinition class * And the use statement ;/ * Messed the second rrd_def * correct two minor errors that did not seem to be causing issues * don't use $vars as per pull #5994 * don't use $vars as per pull #5994 * fix jails graphs * Remove loops and temp variables * whitespace * Change graph so we don't get fractions * add the common nfsen channel include * add nfsen channel flows graph * add nfsen channel packet graph * add nfsen channel traffic graph * update nfsen for channel support * the nfsen general page * add the nfsen channel page * update the docs on nfsen to be more clear about configuring it * white space cleanup * white space cleanup * misc code cleanup * now consistently uses all the same quotes * minor code cleanups * Update nfsen_channel_common.inc.php * minor white space cleanup
2017-03-02 09:03:45 -06:00
!!! setting "external/nfsen"
```bash
lnms config:set nfsen_split_char '_'
```
This value tells us what to replace the full stops `.` in the devices
hostname with.
!!! setting "external/nfsen"
```bash
lnms config:set 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
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
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).
The default location for nfdump is `/usr/bin/nfdump`. If nfdump
is located elsewhere, set it with
!!! setting "external/binaries"
```bash
lnms config:set nfdump /usr/local/bin/nfdump
```
!!! setting "external/nfsen"
```bash
lnms config:set nfsen_last_max 153600
lnms config:set nfsen_top_max 500
lnms config:set nfsen_top_N '[10, 20, 50, 100, 200, 500]'
lnms config:set nfsen_top_default 20
lnms config:set nfsen_stat_default srcip
lnms config:set nfsen_order_default packets
lnms config:set nfsen_last_default 900
lnms config:set nfsen_lasts "{'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'}"
```
!!! setting "external/nfsen"
```bash
lnms config:set 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.
!!! setting "external/nfsen"
```bash
lnms config:set nfsen_top_max 500
```
The above is max number of items to be displayed.
Numbers larger than this will be set to this.
!!! setting "external/nfsen"
```bash
lnms config:set nfsen_top_N '[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.
!!! setting "external/nfsen"
```bash
lnms config:set nfsen_top_default 20
```
The above sets default top number to use from the drop down.
!!! setting "external/nfsen"
```bash
lnms config:set 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
```
!!! setting "external/nfsen"
```bash
lnms config:set 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
```
!!! setting "external/nfsen"
```bash
lnms config:set nfsen_last_default 900
```
The above is the last default to use from the drop down.
!!! setting "external/nfsen"
```bash
lnms config:set nfsen_lasts "{'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'}"
```
feature: Updated Nfsen integration support (#6003) * add single pool based poller for php-fpm * add the page for php-fpm * add graph for php-fpm * I agree to the conditions of the Contributor Agreement contained in doc/General/Contributing.md. * use named OID as suggest by @laf * document PHP-FPM monitoring * link it in the index * clean up the named oid * add how to grab the script in question * add f2b poller * add f2b app page * add f2b graph * add fail2ban notes * minor formatting cleanup * ...more formatting cleanup * rename it so it can be called via the app page * Revert "rename it so it can be called via the app page" This reverts commit 0bde88a03840138fa28b75606e3cd269ce023f67. * *rename it so it can be called via the apps page *setup the apps page to call it * renamed the graph * now include fail2ban in the apps properly * correct the wget command so it does not stomp on phpfpm-sp * update the fail2ban poller for the newest fail2ban script and now build multiple RRDs * update for now graphing firewalled and banned * update fail2ban docs to match the newest snmpd extend method * search automatically for jails and graph them * graphs the currently banned for a fail2ban jail * change the tital of the graph for the total banned to make it more descriptive * Add a explanation of the two variables in the total graph. * misc. white space cleans ups * misc. white space cleanup * minor white space cleanup * correct descr lenght * correct descr lenght * Update fail2ban.inc.php * Use rrd_name properly * note the cache file bits * make caching optional and note why * Update to new RrdDefinition class * And the use statement ;/ * Messed the second rrd_def * correct two minor errors that did not seem to be causing issues * don't use $vars as per pull #5994 * don't use $vars as per pull #5994 * fix jails graphs * Remove loops and temp variables * whitespace * Change graph so we don't get fractions * add the common nfsen channel include * add nfsen channel flows graph * add nfsen channel packet graph * add nfsen channel traffic graph * update nfsen for channel support * the nfsen general page * add the nfsen channel page * update the docs on nfsen to be more clear about configuring it * white space cleanup * white space cleanup * misc code cleanup * now consistently uses all the same quotes * minor code cleanups * Update nfsen_channel_common.inc.php * minor white space cleanup
2017-03-02 09:03:45 -06:00
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.