How can I extract time-series metric in loki-grafana?

  • What Grafana version and what operating system are you using?
    grafana with docker(9.1.3)

  • What are you trying to achieve?
    extract timeseries metric from logs and visualize it with dashboard. for example, extract Loss value(0.001811) from log string below
    2022-09-08 22:46:31 Train Epoch: 14 [59520/60000 (99%)] Loss: 0.001811

  • How are you trying to achieve it?
    create new dashboard, used log browser with query below
    {filename=“/root/train/training/mnist/mnist_1.log”} | pattern <_> Loss: <loss> |label=loss

  • What happened?
    in dashboard, it indicates no data extracted with this query

  • What did you expect to happen?

  • Can you copy/paste the configuration(s) that you are having problems with?

  • Did you receive any errors in the Grafana UI or in related logs? If so, please tell us exactly what they were.

  • Did you follow any online instructions? If so, what is the URL?

welcome to the :grafana: forum, @kmouleejunhyuk

I owuld check out this awesome dashboard on our public sandbox. It has some loki-based time series panels that might give you some clues: