How to filter AWS ALB logs in loki Grafana?


I’m new to Grafana Loki and decided to use it for our AWS application loadbalancer acess log management (using logstash to get logs from s3 bucket using s3 input plugin and saving to some access.log file and then using promtail to forward the logs to Loki).

I’m able to see the logs in the Grafana but the problem is I don’t have any idea how to filter those logs on basis of status code or request uri or How to add the variables to the loki grafana dashboard. i see only two labels one is Job and other is filename. I’m completely blocked here.

Any help will be much appreciated.

Grafana uses LoqQL language to parse logs. Reference: LogQL | Grafana Loki documentation