Skip to content

Graph label issues: Group by format does not distinguish multiple values, alias does not support partitions #312

@bijwaard

Description

@bijwaard

Dear all,

I found two ways to change the field label in the Grafana legend with the tdengine plugin:

  • using alias which supports naming fields separated by comma's and overrides "group by format"
  • using "group by format" which currently doesn't seem to display the field names (they all get the same name in the legend)

It would be great if the group by format would also support using field names, either by reusing the field-name in the query or by explicitly giving each field a name like in the alias. Or alternatively, that I can use the group format result inside the alias.

I have queries on my supertable rt_table like:
select _wstart as ts,avg(v0) as L1,avg(v1) as L2,avg(v2) as L3,sensor,signal,type from lvsensors.rt_table where sensor='${SelectedSensor}' and signal='power_median' and type in '${SelectedType} and ts > $from and ts < $to partition by sensor,signal,type interval($interval) fill(null);
And would like to use the field-names L1, L2 and L3 in the legend as well as some of the partition names, so that I can create an alias like <field-name>-{{type}}, where {{type}} is either active or reactive using the multi-select variable $SelectedType.

I currently have separate queries for each $SelectedType with different alias (L1-active,L2-active,L3-active respectively L1-reactive,L2-reactive,L3-reactive), but cannot multi-select the type to (un)display the them. I would like to do the same with $SelectedSensor to enable showing all sensor graphs in one timeseries panel instead of the repeating rows I have now with legend name {{sensor}}:<field-name>-{{type}} and the following query:

select _wstart as ts,avg(v0) as L1,avg(v1) as L2,avg(v2) as L3,sensor,signal,type from lvsensors.rt_table where sensor in '${SelectedSensor}' and signal='power_median' and type in '${SelectedType} and ts > $from and ts < $to partition by sensor,signal,type interval($interval) fill(null);

Image

P.s. Thanks for this great plugin, I'm trying to use tdengine as alternative to influxdb and noticed big performance gains for memory as well as processing on the server- and client-side. Still have to see how the performance is after moving multiple-years of data form influxdb to tdengine.

Kind regards,
Dennis

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions