-
Notifications
You must be signed in to change notification settings - Fork 126
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow data from external script #154
Comments
I'll have to check how MRTG currently does that, at which interval does it poll the script and what sort of output its expecting. Supporting the same format could be the best option, if possible. However, I'm a little bit hesitant on adding the possiblity of executing external programs from Another option could be to allow more direct input to the database, like something in the style of the old |
Personally, I'm using MRTG in single-run mode, and have it called from crontab every five minutes. Apparently it does support a daemon mode, but I've never used this. When pulling data from an external script, MRTG expects four values, separated by newlines:
Now, realistically, receive and transmit bytes don't have to be bytes. They can be any quantity you want, and can be configured as cumulative (always increasing value), or as a gauge (increasing or decreasing). The uptime and system names are plugged straight in to the output pages too - they can be any bogus value you want, as long as they are present. Having vnstat support this feature would be great (for me, but probably others too). |
Here's a quick reference config for MRTG that you could test if desired (make sure you use backticks to enclose the command, single and double quotes don't work):
And then in /root/mrtg/mrtg-internet.py you have:
|
I'm interested in this feature as well. Namely for getting cellular packet data from qmicli or mmcli example of what qmicli and mmcli reports
|
It would be nice to be able to have vnstat execute an external program to get transfer information and data usage, similar to how MRTG allows you to execute custom commands.
In my example, I have a system watching how much data comes in and out of a certain folder, and would like to see this with vnstat (and then vnstati).
The text was updated successfully, but these errors were encountered: