Using Influx v1.8.3, Grafana v8.1.2 and the OpenWeatherMap Telegraf plugin I am trying to come up with a way to show forecasted weather data. The OpenWeatherMap API allows for grabbing weather ‘X’ amount of hours or days in the future. I can’t seem to come up with a way for this data to be plotted within Grafana in a time series graph panel with the correct future timestamp though. The way the data gets imported into Influx is:
Field ‘hourly_1_temp’ has temperature data for 1 hour from now
Field hourly_1_dt’ has epoch timestamp of future date for the above field, 1 hour from now
Field ‘hourly_2_temp’ has temperature data for 2 hours from now
Field ‘hourly_2_dt’ has epoch timestamp of future date for the above field, 2 hours from now
And so on…
Right now if I select the hourly_1_temp field it gets the timestamp of when it was inserted into the DB, or the last time the query ran, like any normal measurement. Is there a simple way I’m missing of somehow specifying that another field be used for the timestamp, or a way to link the two together? I’ve looked through a few of the Transformation options but can’t seem to come up with anything.