How to make graph based on already written time

Hello,

i have logs wirtten like this:

3190 t=2021-02-01,22:54:12 u=61 0
3191 t=2021-02-01,22:54:20 u=26 0
3192 t=2021-02-01,22:54:30 u=114 0

All i care about are the ones with t= nad u= infont of them, what i want to visuliaze is that at the time t=2021-02-01,22:54:12 → u=61 happened.

Graph should have two axes -
x= t=2021-02-01,22:54:12
y= u=61
and so on.

I read these logs from already wirten text file, which makes think a bit more diffult i guess, which means i cant rely on the time of sending logs to grafana, its all sended at the same time.

Thank you for your answers.
With best regards,
Oto Weinlich

Hi,

You should definitely parse and fomat your time as timestamps for better resulats/graphs. Check loki processing stages or also the fmt functions.

Hope it helps.

Good Luck

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.