Skip to content
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

Historical data missing #21

Open
augusthjerrild opened this issue Dec 21, 2023 · 2 comments
Open

Historical data missing #21

augusthjerrild opened this issue Dec 21, 2023 · 2 comments

Comments

@augusthjerrild
Copy link

Hi @brocaar!

I've been noticing, that after my update to Chirpstack V4, the historical data (such as received data, SNR, RSSI etc) is reset after the update. So if I updated the 18th of december, then data will show correctly from the 18th and forward, but there is no data before.

Is this a part of the migration script? Or do I need to manually find the data from v3 and move them to V4? (I really hope that it's possible?) :-)

@augusthjerrild
Copy link
Author

augusthjerrild commented Jan 12, 2024

@brocaar

It seems like the issue is the timezone format. I think, in main.go line 2244 and 2301 it should be

tsDate := time.Unix(int64(tsInt), 0).UTC()

So it's UTC time. Otherwise, it seems like it's local time.. :-)

Furthermore the ttl in "MONTH" seems to be wrong - right now the ttl is 61 years. I think 365 should be 12 (12 months).

EDIT:
After I tried to make the fixes myself, I faced a new problem. In the old gateway metrics format we both had rx_count_ok and rx_count where rx_count_ok was the most usable number. And in Chirpstack 4 there is only rx_count. Problem is, that the old rx_count is a very, very high number, so I guess the old rx_count_ok should be the new rx_count. It's the same thing with tx_count.

Does it make sense? :-)

@brocaar
Copy link
Contributor

brocaar commented Jan 25, 2024

Hi @augusthjerrild, I just pushed a fix for the MONTH ttl, good spot 👍

With regards to the timestamp, I think the code is correct as we are interested in the local time, not UTC time. ChirpStack aggregates metrics per hour / day / month. You want these to be the local hour / day / month, not the UTC.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants