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

remove hardcoded job labels in prometheus queries #1688

Open
ztzxt opened this issue Jun 10, 2024 · 0 comments
Open

remove hardcoded job labels in prometheus queries #1688

ztzxt opened this issue Jun 10, 2024 · 0 comments

Comments

@ztzxt
Copy link

ztzxt commented Jun 10, 2024

Feature Request

Is your feature request related to a problem? Please describe:

We deployed TiDb via tidb-operator. We are also configuring PodMonitor for prometheus-operator for external prometheus. When we do this, some of the panels in the dashboard are missing. This is due to hard-coded job labels in the prometheus queries such as this. If there were a way to configure these labels or some prefix to them, whole dashboard would work with prometheus-operator.

Describe the feature you'd like:

Ability to overwrite job label in Prometheus queries

Describe alternatives you've considered:

  • Refactoring queries in a way they wouldn't need the job label. Since current metrics in the queries are too generic, probably some other metric should be used.

  • Way to configure job label. Preferably it is templated when providing the config. If it can't be templated, it still would solve our problem.

  • Using metricRelabelings in PodMonitor. Unfortunately, we can't do this as we plan to have more than one cluster scraped by a single Prometheus. We need a way to separate them by at least a namespace

This is how the dashboard looks now for us:
image

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

No branches or pull requests

1 participant