Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Target: Alias vs AliasBy; Group vs GroupBy #179

Open
kevitan opened this issue Oct 26, 2021 · 1 comment
Open

Target: Alias vs AliasBy; Group vs GroupBy #179

kevitan opened this issue Oct 26, 2021 · 1 comment

Comments

@kevitan
Copy link
Contributor

kevitan commented Oct 26, 2021

These 2 groups of fields seem remarkably similar, and I'm not sure which to use. are both needed? It seems that at least for Target.Group vs Target.GroupBy, the former has a little more type safety, but is a little clunkier to use. It seems also that if I declare a Tag to group on, it does not end up in the query, while it does show up in the panel JSON:

{
  "params": [
    "k8s_cluster"
  ],
  "type": "tag"
},

Query:
... GROUP BY time(1s) fill(null)

For Target.Alias vs Target.AliasBy, I don't know if it's working properly, because the legend does not show the series breakdown in the legend. Again, the syntax of these two is different, but the effect seems to be the same in the panel JSON, though it doesn't seem to make a difference in the query.
"aliasBy": "$tag_k8s_cluster" in the panel JSON has no effect on the query for the panel.

@GiedriusS
Copy link
Collaborator

Unfortunately but Grafana doesn't have a strict schema for dashboards so the answer probably depends on which version you are using. We've had plans to separate fields according to major Grafana versions but it never came to fruition.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants