Total number of messages per logger as chart

Hi, I’m currently testing a migration from ELK to Loki.

I tried to create a chart which shows the logger names that produces the most messages.
I created a simple query {source=“filebeat”} | json
because the the field logger_name is stored in json.

What is the next step to count the log messages per logger?
Do I have to extend the query or do I have to transform the data?
At least the transform operations doesn’t list me the json fields.

Could someone please help me?
Best regards

Probably something like:

sum by (logger_name) (
  count_over_time({source=“filebeat”} | json [5m])

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