cper
March 1, 2022, 9:19am
1
Hi,
we have a bucket in Influxdb (InfluxDB 2.0.7) that shows the date with milliseconds precision in raw data, and when we use the same query from Grafana (Grafana Server 8.0.6) the date shows only seconds precision.
In Influxdb:
02022-02-28T09:47:31.595Z INF
02022-02-28T09:47:31.598Z ERR
02022-02-28T09:47:31.851Z WAR
02022-02-28T09:47:31.856Z ERR
02022-02-28T09:47:31.861Z WAR
As you see, the timestamp we are querying is in fact in milliseconds precision.
While in Grafana we get:
2022-02-28 09:47:31 INF
2022-02-28 09:47:31 ERR
2022-02-28 09:47:31 WAR
2022-02-28 09:47:31 ERR
2022-02-28 09:47:31 WAR
How can we make Grafana show the date in milliseconds precision too?
Thanks in advance
1 Like
grant2
March 1, 2022, 10:19am
2
In the Influx datasource settings, maybe try changing the Min Time Interval to 1ms?
From here :
1 Like
cper
March 1, 2022, 10:59am
3
Hi, thanks for your reply, but it didn’t change the way Grafana shows the date.
looks similar to this, @cper
maybe you should jump on that thread
opened 10:02PM - 11 May 22 UTC
Issue happening with both MySQL 5.6, and latest version of PostgreSQL
Basic T… imeSeries chart.
I have 4 records in the table and millisecond resolution datetime properly shows up (both in Grafana table and chart view)
![image](https://user-images.githubusercontent.com/5315603/167954054-26bbc04a-1671-4b0b-a70f-9d5377c259f1.png)
After inserting one more record, the query starts to return seconds resolution, even though I didn't touch the query.
![image](https://user-images.githubusercontent.com/5315603/167953959-d2145e48-b1b2-439c-99e7-4474a1750859.png)
Also note I text DIFF - ed the EXPANDED query and there is no difference just that it queried 5 samples instead of 4.
I expect to get millisecond resolution queried always, regardless of how many records are in the table.
In MySQL timestamp(3) column type used, in PostgreSQL timestamp without timezone (with 3 precision)
How to reproduce?
Create table, insert some {'2022.05.12 23:40:50.398', anyValue} values, and millisecond display eventually changes to seconds by itself without changing the query.
Use the following query:
SELECT
DateTime AS "time",
Value
FROM table
ORDER by DateTime
**Environment**:
- Grafana version: v8.5.0 (6134e3cf3)
- Data source type & version: MySQL 5.6, and latest PostgreSQL both reproducable
- OS Grafana is installed on: Win10
- User OS & Browser: Win10 + Google Chrome
- Grafana plugins: Built-in TimeSeries
- Others:
1 Like
I had the same problem. Just using this time format had solved it:
YYYY-MM-DD hh:mm:ssS
Now it looks better:
Regards
2 Likes
cper
December 2, 2022, 10:01am
6
Thanks, that was interesting, I tried it but it didn’t work either