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 #648

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Target alias #648

wants to merge 1 commit into from

Conversation

JaSei
Copy link

@JaSei JaSei commented Feb 6, 2024

What does this do?

Some targets (Influx for example) use alias instead of legendFormat (which is Prometheus "alias"). This commit setup both of them by current legendFormat.

Why is it a good idea?

For Influxdb SqlTarget isn't now possible to set "alias" via Target. Of course is possible to use InfluxDBTarget (https://github.com/weaveworks/grafanalib/blob/main/grafanalib/influxdb.py) but there missing other options (like hide, because it's not child of Target). So I've chosen solution to extend Target to support all needed for my influx.

Context

Questions

If you don't like this solution, I see other solutions

  1. add new alias option - similar as Add support for alias expressions in data targets #285
  2. InfluxDBTarget class should be inherit from Target

…hich is Prometheus 'alias'). This commit setup both of them by legendFormat.
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

Successfully merging this pull request may close these issues.

None yet

1 participant