Hi Alun,
On Thu, Feb 24, 2022 at 02:23:54PM +0000, Alun Jones via users wrote:
I've been thinking a bit about how I could
maintain my own stats, over
lunch. The easiest way of getting a raw count (in my setup) would just be
ip(6)tables rules in the INPUT, FORWARD and OUTPUT chains. Just use the
counters from those.
That is in fact how BitFolk is doing it, because of having to
disregard internal data flows.
But then I started thinking about when the VM reboots
(or I reload
the firewall) and then started thinking about recording to a
database. Catching edge cases like this does make it less trivial
than just scraping your existing, definitive data from somewhere.
When people start monitoring anything they usually start to use
software that collects and persists all kinds of metrics, like
node_exporter or collectd or whatever, so that solves that issue for
them, and allows for monitoring all kinds of things besides
bandwidth.
It could perhaps be seen as overkill for one VM.
Cheers,
Andy
--
https://bitfolk.com/ -- No-nonsense VPS hosting