Net-Traffic and Network diagram doesn't work anymore

Hi, I have the issue, that for somehow reason there is a date in the future in the statistics, and since that, the Net-Traffic and Network diagram doesn’t work anymore.

How I can delete this day, or reset the statistics?

Can you post a screenshot of the Services > Time Server page ?

1 Like

Sorry, is in German. If needed I can change the setup.

And not sure, if this is relevant. I had on the 11th January 2022 a long downtime (> 10h) because I got a stronger energy line for a e-car charging station. Maybe the FW start with a wrong time, before it makes a time update.

The current time is total correct

[root@pluto2021 vnstat]# date
Tue Mar 22 04:27:27 PM CET 2022

Your system has correct time but for some reason there are rrd files with weird dates. The nuclear option is to stop collectd, then rm all the rrd/ files, then start collectd fresh. Or take a backup without log files, re-install ipfire, and restore. You will start clean w/o logs which eventually will populate.

I have done

/etc/init.d/collectd stop
mv /var/log/rrd /var/log/rrd.save
/etc/init.d/collectd start

but the result is still the same as I’m my original post.

You copied the whole /var/log/rrd/ tree to a /var/log/rrd.save/ dir. When you started collectd you should have gotten an error, /var/log/rrd does not exist, so mkdir /var/log/rrd then /etc/init.d/collectd start … starts without complaints. The dirs/files in /var/log/rrd/ should have today’s date.

(tested on my VM)

but the cgi-bin/traffic.cgi still shows data from the past. I looked at the code. vnstat keeps its data in a db in /var/log/vnstat/vnstat.db Move that db to vnstat.save.db and look at your net-traffic after a while. I did on the VM, now it shows data from today.

image

vnstat.db is a sqlite 3.x db so you can actually get rid of the bad data with sql.

3 Likes

yes, you are right, I also create the rrd new, before I have restarted the collected.

stop collected, delete vnstat.db, and start collected, doesn’t change anything, because it does not recreate the vnstat.db, also not after hours. But I did a init 6 and after that the vnstat.db was back with the right dates.

After that, it takes almost 1h before I can see the right data.

Thx for support!

2 Likes