How to show only critical errors in Grafana with Loki?

I’ve read some documentation with LogQL and what I can do, but the closest thing I could find was in the Log labels using |= "errors" kind of gives what I want, but it also shows green logs that have the wording “error” in it. What I would like it some kind of filter that will only show the “red” critical errors. Is there a way to do that?

1 Like

Hi @formburden Can you share your example log lines?

Is it structured? in that case you can use logfmt or json formatter and filter based only on labels like log level.
|logfmt | level="error". That won’t display any wording with error

1 Like

Oh I see, logfmt, I’ll have to read up more about that. This was pretty much what I was looking for. Thank you!

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