Once daily data from infludb and trouble with linux timestamps

I have a sensor sending me once daily measurements of the depth of oil in my heating oil tank. Data goes through node-red and into influxdb, where it looks like this:

select “time”, “date”, “oildepth” from Oil_level
name: Oil_level
time date oildepth


1632500160626 2021-09-24T16:16:00.627Z 69
1632520669180 2021-09-24T21:57:49.183Z 69
1632537064824 2021-09-25T02:31:04.825Z 69
1632569864567 2021-09-25T11:37:44.568Z 68
1632623226567 2021-09-26T02:27:06.569Z 71
1632709370843 2021-09-27T02:22:50.843Z 69

The time and date fields are added by function nodes in influxdb before storage.
I want to graph oildepth (last column above, 69 etc) vs date, but when I choose measurement/field in the Grafana query editor I get “No data in response”. If I multiply the time stamp field by 1000 I can get a table with three columns: original timestamp translated to dates around 1970, time*1000 which gives me correct dates, and oildepth.
I don’t need to average/sum any data, I just want a simple line graph. So how do I either

a) tell Grafana to put my calculated date field on the x-axis

b) use time on the x-axis but understand that this timestamp is in seconds rather than ms

c) or should I not add timestamps in node-red and let influxdb stamp it when it arrives?

Thanks for your help - simple answers preferred as I am new to Grafana!

Hi @dw1958uk ,

I took your data and mocked it up using the TestData DB datasource, which ships with every Grafana. Those epoch timestamps seemed to work in this case:

Could you please provide screenshots of your issue? This sounds like a query problem. Do you see anything in the network tab of your browser’s dev tools when you trigger the error? Can you perform this workflow to share your unformatted data?

Thanks. I resolved this by deleting the timestamps I was adding in node red (13 digit) and letting influxdb timestamp the data (19 digit). So my graph works. But I still haven’t figured how to tell grafana to ignore the timestamps and use a different field for the x-axis, if I ever wanted to in the future!
Testdb looks interesting. Thanks for your help.
I still haven’t found a systematic and thorough grafana tutorial. Any suggestions where to start?

@dw1958uk the time series visualization was designed for time to exist on the x - axis. You can add multiple y axes in Grafana 8+, and You can also use the new categorical Bar Chart to group data by strings along the x - axes.

There was a great udemy course but it’s getting a bit dated now. We also just redesigned our tutorials section and we are actively expanding it. If you see any holes, or topics you’d like covered, by all means suggest them :+1: :grafana:

Thanks

blocked.gif