Can Promtail capture log as a block?

Hi,

I have log data that looks like this:
1/1/2021 10:01:23 AM Memory
1/1/2021 10:01:23 AM 2300 Mb
1/1/2021 10:01:23 AM 23%
1/1/2021 10:01:13 AM Memory
1/1/2021 10:01:13 AM 2310 Mb

As you can see, the information I want to capture are in every 3 separate lines. Is it possible to get the 3 values as one “group” so I can display on Grafana?

Thank you!

Hi,

As of Loki 2.0, i would suggest you check the multiline parsing stages.

Good Luck

Thanks @wlargou. I’ve already used it but it doesn’t seem to achieve the way I want so I was wondering if there is any alternative.

Thanks again.

hi @wlargou, I am wondering if you happen to know how to put label(s) (with the same timestamp) as legend on a dashboard? Data source is Loki or “Prometheus-Loki”.

Thanks in advance.

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