Hi,
We are using grafana and loki in kubernetes. I have promtail to send the logs, and in our application we have all json logs with the timestamp of the format:
2023-09-05T21:52:19.989Z
In promtail conf we have stage:
- timestamp:
source: timestamp
format: RFC3339
But logs in grafana explore are still in seconds,
2023-09-05 21:52:19
There are no milliseconds, but i need those as some logs come at the same second, so the ordering is not always correct.
Am i missing something, do i need to make some changes in grafana or different format in the timestamp stage?
Thank you
You can write your own custom format with string such as "2006-01-02T15:04:05.000Z". It also might be a good idea and just write a simple go script to test your time string with the parser.
Hey Tony,
thank you for the feedback. I think i even tried this option as well at some point and it didn’t work. Let me try again with the below stage:
And again, I don’t have milliseconds in my timestamp that appear is grafana explore section.
I am not really a developer or have knowledge of Go thanks for suggestion
Yes, the problem i faced was grafana version. I had little bit older kube-prometheus-stack helm version deployed. When i updated that one, and Grafana was updated to version i think something 9.5 or something. So now i am on version 10+ and miliseconds are there