How to add label filters for labels extracted using Pattern operation

I have a dashboard panel created with Grafana and Loki as the data source. I use Pattern to extract the log pattern and the Extract Fields transformation to extract the fields from this pattern.

filename="/var/log/extracted.log"} | pattern <time> SERVERID=<serverID> THREADID=<threadID> KEYID=<keyID> TASK=<task> DURATION=<duration>

I am trying to add label filters to the panel so the users can see the results based on a specific serverId, taskId, and keyID separately. Is there a way I can do this?

I have added a screenshot of my current panel

1 Like