Why am I unable to perform a Mean Transform over a field parsed by Loki?

I’m using the Grafana 7.5.4 along with Loki 2.1.0. With new Loki queries, I have successfully parsed fields from my logs.

{filename=~"home/data/logs/backup_dag/push_targets/.*/*.log"} 
|= "abs.network"
| logfmt

Now I’m trying to apply the following Transforms in the Dashboard pannel with Table visualization selected:
Labels to filedsFilter by name (selected upload field) → Reduce (selected Mean)

For some reason Mean, Min, Max etc don’t work, but First, First(non null), Last, Last(non null) do work.

I kinda have no idea why this is happening though, if I remove the Reduce Transform I seem to have a valid table on which all functions could be applied
Any ideas?

Can’t add more the two images :expressionless: as a new user:

Table dashboard pannel after I remove Reduce:

Hey @rafayak

I think this is more of a question for #support; this question does not appear to be Loki-specific.

I’m curious though why you don’t perform these transformations with LogQL - is there some limiting factor here?

@dannykopping I got the idea of this from the Loki issues on github. The issue describes a problem similar to mine.

Also, what I’m trying to do s create a metric (a single number) to show in my dashboard

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