This script implements example notify script in Python which implements JSON interface for FastNetMon Advanced.
NB! JSON based script uses different arguments from text based notify script.
This script implemented in Python and does not need any additional libraries.
It prints all information received from FastNetMon to log file /tmp/fastnetmon_notify_script.log. Download example notify script from GitHub:
wget https://raw.githubusercontent.com/FastNetMon/fastnetmon_notify_python/main/notify_json.py
Please put it to file
sudo cp notify_json.py /usr/local/bin/notify_json.py
And set executable bit for it:
sudo chmod +x /usr/local/bin/notify_json.py
You need to use following mode from FastNetMon to use this script properly:
sudo fcli set main notify_script_enabled enable sudo fcli set main notify_script_format json sudo fcli set main notify_script_path /usr/local/bin/notify_json.py sudo fcli commit
More documentation about JSON formats you could find here