Warning
Before starting with this guide we recommend to try our new baseline recommendation logic as it offers better integration with FastNetMon.
Please be careful, this tool is experimental new feature, please do not use it without proper and very detailed testing.
You can download current version here
Known restrictions:
- Removes all existing non global host groups
- IPv4 only
- Does not reload FastNetMon automatically
Dependencies:
- Metric (per host bandwidth) export to Clickhouse
- API access to FastNetMon and you need to enable API
Threshold calculation tool has following configuration file at /etc/fastnetmon/baseline_magician.conf:
{ "clickhouse_host": "127.0.0.1", "clickhouse_port": 9000, "calculaton_period": 604800, "clickhouse_database": "fastnetmon", "clickhouse_table": "host_metrics", "api_user": "admin", "api_password": "XXX", "api_host": "127.0.0.1", "api_port": 10007, "generate_incoming_packet_threshold": true, "incoming_packet_expression": "value * 2", "generate_incoming_bit_threshold": true, "incoming_bit_expression": "value * 3", "generate_incoming_flow_threshold": true, "incoming_flow_expression": "value + 200", "remove_existing_hostgroups": true, "aggregation_function": "max" }
All fields with expression suffix keep math expressions to calculate threshold/baseline value from aggregated value (using aggregation_function) of particular threshold from Clickhouse (calculated over last 7 days).
And run it this way:
sudo chmod +x baseline_magician sudo ./baseline_magician
This tool can create host group for each your network according to thresholds configured according to average bandwidth usage from Clickhouse.
NB! This tool removes all your existing host groups and keeps only global host group. Be very careful.
It does not restart FastNetMon to apply changes. You need to do it manually. In case of any issues, please report them to our support team.
This tool is open source and you can find source code here.