Use the value of a label in Loki to create a Grafana metric

I know there are many ways to filter and count loglines from Loki and create metrics/graphs based on the count number.
But I would like to create a graph by using (for example) the value size from a query like {host="myhost", app="nginx", logtype="access"}. So, the value of size should be determine the graph on the y-axis.

I know this can be done by creating an exporter for prometheus, but I bet there should be a simple way to achieve that using Loki ?!

Try parsing the log then using line_format to expose the value.

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