${__field.name} just shows value as label

Hello,
I’m trying to display custom field name (${__field.name}) in my grafana but for some reason is just showing “Value

here what I’m getting

here the original before add ${__field.name}, I want to get just supplies description without this part {prtMarkerSuppliesDescription=

{prtMarkerSuppliesDescription=“Kit mantenimient”}
{prtMarkerSuppliesDescription=“T�ner negro”}
{prtMarkerSuppliesDescription=“Unidad imagen”}

here my query.

any advice on how to custom and field name here

What is your datasource?

it’s influx QL

Could you please provide sample data as inline csv por favor? for example.

name,time,host,topic,value
mqtt_consumer_float,1662507929695650760,vps-362a4be9,GPS/Latitude,43.5785
mqtt_consumer_float,1662507940992628730,vps-362a4be9,GPS/Longitude,1.44712
mqtt_consumer_float,1662508438504964767,vps-362a4be9,GPS/Latitude,43.5784
mqtt_consumer_float,1662508449814560959,vps-362a4be9,GPS/Longitude,1.44725
mqtt_consumer_float,1662508934276570198,vps-362a4be9,GPS/Latitude,43.5786

this is what I’m getting exporting the data.

“Time”,“Metric”,“Value”
2022-09-08 18:00:00.000,“{agent_host=”“10.89.13.181"”, prtMarkerSuppliesDescription=““Kit mantenimient””}“,0
2022-09-08 18:00:00.000,”{agent_host=““10.89.13.181"”, prtMarkerSuppliesDescription=”“T ner negro”“}”,9
2022-09-08 18:00:00.000,“{agent_host=”“10.89.13.181"”, prtMarkerSuppliesDescription=““Unidad imagen””}",2

I forgot mencioned… value is the result from 2 queries.

and I using this transformation

image

this looks like export from grafan? can you provide export from influx?I see a few fields missing.
This is so that we have your data in our influxdb

here you are from influx

table _start _stop _time _value _field _measurement agent_host host prtMarkerSuppliesDescription
0 2022-09-09T19:09:37.490418072Z 2022-09-09T20:09:37.490418072Z 2022-09-09T19:10:10Z 0 prtMarkerSuppliesMaxCapacity printerstack 10.89.13.181 vm2-tig-8901 Kit mantenimient
1 2022-09-09T19:09:37.490418072Z 2022-09-09T20:09:37.490418072Z 2022-09-09T19:10:10Z 9 prtMarkerSuppliesMaxCapacity printerstack 10.89.13.181 vm2-tig-8901 T�ner negro
2 2022-09-09T19:09:37.490418072Z 2022-09-09T20:09:37.490418072Z 2022-09-09T19:10:10Z 2 prtMarkerSuppliesMaxCapacity printerstack 10.89.13.181 vm2-tig-8901 Unidad imagen
1 Like

csv view

result,table,_start,_stop,_time,_value,_field,_measurement,agent_host,host,prtMarkerSuppliesDescription
,0,2022-09-09T19:09:37.490418072Z,2022-09-09T20:09:37.490418072Z,2022-09-09T19:10:10Z,0,prtMarkerSuppliesMaxCapacity,printerstack,10.89.13.181,vm2-tig-8901,Kit mantenimient
,1,2022-09-09T19:09:37.490418072Z,2022-09-09T20:09:37.490418072Z,2022-09-09T19:10:10Z,9,prtMarkerSuppliesMaxCapacity,printerstack,10.89.13.181,vm2-tig-8901,T ner negro
,2,2022-09-09T19:09:37.490418072Z,2022-09-09T20:09:37.490418072Z,2022-09-09T19:10:10Z,2,prtMarkerSuppliesMaxCapacity,printerstack,10.89.13.181,vm2-tig-8901,Unidad imagen

1 Like

I would go with using flux instead of influxql

Let me try it using influxql

Sure no problem, but looks good

can you run this in your influxbd:8086?
replace guelo to proper bucket name.

from(bucket: "guelo") 
  |> range(start: v.timeRangeStart, stop: v.timeRangeStop)
  |> filter(fn: (r) => r["_measurement"] == "printerstack")
  |> filter(fn: (r) => r["_field"] == "agent_host" or r["_field"] == "host" or r["_field"] == "prtMarkerSuppliesDescription" or r["_field"] == "prtMarkerSuppliesMaxCapacity")