How to hide undefined tags from graph alias

  • What Grafana version and what operating system are you using?
    4.6.0
    This can’t be upgraded at the moment.

  • What are you trying to achieve?
    I have simple graph on my dashboard, which plot some metrics. To make metric names more easy to read I use aliases in for like:
    IG:$_tag_ig, phase: $_tag_phase
    ig and phase are selectors on the dashboard and they are set if they are selected in group_by selector.

  • How are you trying to achieve it?
    Use tags in alias

  • What happened?
    When I group by only one tag, for example, by phase I see this
    IG:$_tag_ig, phase: 1, IG:$_tag_ig, phase: 2

  • What did you expect to happen?
    How can I hide tags which are not defined?

  • Can you copy/paste the configuration(s) that you are having problems with?
    No
    Template variables:
    group_by: --none–,ig, phase
    ig: 1,2,3
    phase: 1,2

tag names: ig, phase

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

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