VnStat Graphs lose track after router restart

so after starting my openwrt network
the router BT HH5A restarted and VnStat Graphs started from the begining?
what's gone wrong?

1 Like

luci-app-nlbwmon would be an alternative that includes everything necessary for persistent stats by default.

it seems like a working solution
but I am a newbie and don't know where to get that code and how to edit it and don't know what is my directory.
can you guide me through that?

1 Like

I like nlbwmon for the granularity you can achieve, but over several months, I've ended up with a couple of those months lost due to corrupted db faults.

I use vnstat for it's simplicity and ability to list bandwidth by interface:

  • [5 Minute]
  • [Hourly]
  • [Monthly]
  • [Yearly]
    and never had an issue with it.

Run them both. They're quite complementary to the other in their strengths.

I totally agree, I'd kind of prefer vnstat as well - but nlbwmon is just about good enough, although the much better integration into OpenWrt (including fine grained control over the level of persistency) is what made me switch over. Sure, I could implement the same for vnstat, but… it's already there, for nlbwmon, without me having to do anything…

can you give me baby steps on how to set the location of the vnstat database in /etc/vnstat.conf. to another directory so I won't lose the vnstat after router restart? @slh

In a nutshell, you will need to set up persistent storage ie: usb.

Once you have that configured and working, it's just a matter of editing the /etc/vnstat.conf
# location of the database directory
DatabaseDir "mount point/file" pointing to your usb mount point/file.