packages/net/nlbwmon/files/nlbwmon.config
Jo-Philipp Wich e32168f9b7 nlbwmon: add package
This commit introduces nlbwmon, the lightweight NetLink BandWidth Montor.

The nlbwmon daemon gathers per-host traffic statistics by querying netlink
accounting data. Due to this approach, the executable is very small and does
not rely on libpcap and CPU intensive raw sockets to monitor traffic.

Besides raw per-host traffic counters, nlbwmon also support rudimentary
traffic classification by observing IP protocols and used port numbers.

Gathered accounting data is stored into a series of database files which
are regularily committed to persistent storage.

Refresh, commit and accounting intervals are freely configurable as well
as the layer7 protocol mapping rules and observed source subnets.

This package also bundles a cli client which can be used to dump the
gathered traffic data as JSON, CSV or plaintext data. A pull request to
add a graphical LuCI frontend for nlbwmon is pending.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2017-07-28 15:30:06 +02:00

51 lines
2.1 KiB
Text

config nlbwmon
# Interval at which the temporary in-memory database is committed to
# the persistent database directory
option commit_interval 24h
# Interval at which traffic counters of still established connections
# are refreshed from netlink information
option refresh_interval 30s
# Storage directory for the database files
option database_directory /var/lib/nlbwmon
# Amount of database generations to retain. If the limit is reached,
# the oldest database files are deleted.
option database_generations 10
# Accounting period interval; may be either in the format YYYY-MM-DD/NN
# to start a new accounting period exactly every NN days, beginning at
# the given date, or a number specifiying the day of month at which to
# start the next accounting period.
#option database_interval '2017-01-17/14' # every 14 days, starting at Tue
#option database_interval '-2' # second last day of month, e.g. 30th in March
option database_interval '1' # first day of month (default)
# The maximum amount of entries that should be put into the database,
# setting the limit to 0 will allow databases to grow indefinitely.
option database_limit 10000
# Whether to preallocate the maximum possible database size in memory.
# This is mainly useful for memory constrained systems which might not
# be able to satisfy memory allocation after longer uptime periods.
# Only effective in conjunction with database_limit, ignored otherwise.
#option database_prealloc 0
# Whether to gzip compress archive databases. Compressing the database
# files makes accessing old data slightly slower but helps to reduce
# storage requirements.
#option database_compress 1
# Protocol description file, used to distinguish traffic streams by
# IP protocol number and port
option protocol_database /usr/share/nlbwmon/protocols
# List of local subnets. Only conntrack streams from or to any of these
# subnets are counted. Logical interface names may be specified to
# resolve the local subnets on the fly.
list local_network '192.168.0.0/16'
list local_network '172.16.0.0/12'
list local_network '10.0.0.0/8'
list local_network 'lan'