I’m currently working to eliminate gaps in the data history of the Edge on the Backend. I already had InfluxDB2 connected to the Backend when the Edge ran into a network problem. As a result, gaps appeared in the data history of the Edge.
To solve this problem, I added RRD4J on the Edge to collect the data locally on the Edge, and on the Backend, I activated AggregatedInfluxDB. This is the AggregatedInfluxDB configuration.
Timedata.AggregatedInfluxDB collects the data when the Edge is connected to the Backend. However, if the Edge is down, the data-aggregated bucket does not receive any missing data after reconnection.
I was debugging ApiBackend. The ApiBackend resends the historical data when the API detects any connection failure between the Edge and the Backend. However, Timedata.AggregatedInfluxDB does not recover any missing data. If anyone has worked with this before, please give a hand to solve this problem.
your configuration looks ok. I wonder about your problem description. You wrote
..However, if the Edge is down, the data-aggregated bucket does not receive any missing data after reconnection…
Is it a typo? Or do you mean with “Edge is down” that the internet connection between edge and backend is broken.
The resend mechanism you describe handles the case when the “Backend” is down. And it works well in our case. I have not checked it, but I think we are using an identical configuration.
As far as I remember the resend mechanism has a random waiting time of 60-90min. So have you waited for 90min until you have checked the data again?
When the “Edge” is done, there is no data collection at all and therefore the resend mechanism can not do anything, when the edge is up again.
Regarding the description problem, I mean by “Edge is down” that the internet connection between Edge and the backend is broken.
After the reconnection of the edge with the backend, the ApiBackend extracts the data from RRD4J and resends it to the backend. But Timedata.AggregatedInfluxDB does not work with me at all. I think the issue is related to the interaction between Timedata.AggregatedInfluxDB and InfluxDB 2.
Currently, InfluxDB 2 is connected to Timedata.InfluxDB, and I added InfluxDB 1.8, which I connected to Timedata.AggregatedInfluxDB. and I make the ApiBackend to resend data immediately when the Edge reconnects to the backend in order to speed up debugging. With this setup, data aggregation works correctly.
Now, I am trying to replace RRD4J with InfluxDB as a local database(edge side), but this approach does not work. The ApiBackend is unable to extract data from InfluxDB and send it to the backend, unlike with RRD4J. I am not sure why InfluxDB does not work in this scenario.
Do you think there is a way to make the ApiBackend capable of extracting historical data from InfluxDB?
For example, when viewing monthly historical data in the UI (UI/history), the UI sends a request to the backend, which retrieves the data from InfluxDB and responds with the corresponding historical data.