Labeling datapoints in Chronograf


#1

I have a large database in InfluxDB where I have created a structure of Fields labeled
Site
Tag_ID
Type
Units

Then there is a value which is coming from a SCADA system. I now have three months of data at 1 minute samples where there is only one unique Tag_ID for a datapoint and the Site, Type and Units never vary for that Tag_ID.

For example Tank Level is
Tag_Id=800208
Site = Jones Road
Type = Level
Units = m

When displaying in Chronograf it calls the line 800208.Last value but I want to call the line “Jones Road Tank Level (m)”
How can I rename the line label to embed the Type field value and Units field value associated with that Tag_ID?


#2

If I understand you correctly, you should be able to use an AS statement to alias the results.

For example,

SELECT mean("usage_system") AS "mean_usage_system" FROM "telegraf"."autogen"."cpu" WHERE time > :dashboardTime: GROUP BY time(:interval:) FILL(null)

Is this what you’re trying to do?