Hi everyone,
I’m having trouble writing a Loki query in Grafana that returns the total number of logs for each status code (e.g., how many 200 status logs, how many 304 status logs, etc.). I’ve tried several queries, but most of them don’t compile correctly.
Here’s an example of what I’ve tried:
sum by (status) (count_over_time({job="nginx"}[1h]))
I’m using Loki as my data source and need to group the logs by the status
label. Can anyone help me figure out what’s wrong with my query or suggest a better approach?
Thanks in advance for your help!