FastNetMon baseline calculation

This logic is obsolete, please do not use it for new installations.

Please try our new baseline recommendation logic.

Baseline calculation for FastNetMon can be slightly tricky, and we prepared scripts to improve your experience during this process.

To start with, please enable visual traffic export and enable InfluxDB support for FastNetMon. Keep it running for 2-3 days (in the best case, for one week to cover all peak hours)

Then, please install dependencies for the script:

sudo pip3 install influxdb

Please download the source code from GitHub:

wget https://raw.githubusercontent.com/FastNetMon/influxdb_baseline/main/influxdb_baseline.py

You need to run it this way:

python3 influxdb_baseline.py

It checks metrics for the last 3 days (you can configure it in the script) and selects more loaded hosts to use them as a threshold. It will need some time (from a few minutes to a few hours, depending on the number of hosts). Example output:

Extracted 64000 hosts from InfluxDB
Peak values for all your hosts
max_packets_outgoing 118860
max_bits_outgoing    1130431688
max_bits_incoming    940248336
max_packets_incoming 217753

According to these values, it should be safe to set threshold_mbps to 1500 and set threshold_pps to 400000 pps. You can add 100-200% to the peak value to reduce the number of false positives.

We suggest setting these values as thresholds, but keep FastNetMon in email notification mode (with BGP Blackhole disabled) for 1 week and then you can put it into production if everything works as expected.

If you see zeroes in output, we recommend ensuring that you have per-host traffic export enabled the following way:

sudo fcli set main influxdb_skip_host_counters false
sudo fcli commit