Option to always qualify data with Query label

  • What Grafana version and what operating system are you using?


  • What are you trying to achieve?

I have a panel that is showing the results of 2 queries. The first returns some data values, the second some capacity values. Sometimes the data values can be very small compared to the capacity values:

I’ve added a dashboard variable to suppress the capacity data:


  • How are you trying to achieve it?

The variable sets value ($caplimit) that is used in a result filter for the query that gets the capacity values. When set, it causes all the capacity values to be excluded (as intended) and no data to be returned by the second query. I’d sooner not run the query at all, but that’s another argument.

This results in the graph being redrawn with the axis sized for the data, rather than the capacity, so we can see what is happening in the data:

  • What happened?

Normally, the data from the first query is prefixed with 'A ’ and the data from the second query is prefixed with 'B '. My overrides are set up to expect this. When I activated the variable to suppress the data from the second query, the data from the first query lost its leading 'A ', meaning my overrides no longer matched it.

  • What did you expect to happen?

I didn’t expect the output from the first query (prefixed 'A ') to be modified if I suppressed the results of the second query. The fact the B query hasn’t returned any data, shouldn’t change the output from the A query.

  • Can you copy/paste the configuration(s) that you are having problems with?

Result filter for query B:

Variable setup:

Panel Transforms:

Time series names change if the B query runs but doesn’t return any data. Specifically, they loose their 'A ’ qualifier.

  • Did you receive any errors in the Grafana UI or in related logs? If so, please tell us exactly what they were.

No, other than that the field names for the time series changed so they no longer matched my overrides.

  • Did you follow any online instructions? If so, what is the URL?


Worked around by changing the regex’s for the overrides from '^A VALUE$' to '^[A]?[ ]?VALUE$', but my point is that I shouldn’t have to. Filtering out a set of results shouldn’t break my overrides.

I’ve not tested it, but if I have three queries - A, B and C - and I filter the B results out, will the C results turn up with a B prefix? That’s really misleading and unpredictable…