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

Expose tags in Prometheus metrics #3524

Closed
1 task done
mateuszdrab opened this issue Aug 3, 2023 · 1 comment
Closed
1 task done

Expose tags in Prometheus metrics #3524

mateuszdrab opened this issue Aug 3, 2023 · 1 comment
Labels
feature-request Request for new features to be added

Comments

@mateuszdrab
Copy link

⚠️ Please verify that this feature request has NOT been suggested before.

  • I checked and didn't find similar feature request

🏷️ Feature Request Type

API

🔖 Feature description

As the tags feature is very useful in storing additional data about monitors, I have realized that it would provide extra value if those tags were exposed to the Prometheus compatible metrics endpoint at /metrics.
In my case, the use case would be to provide a severity label on the monitors so that it could then be used to alter the severity of the Prometheus alert. There are some monitors I'd like Prometheus to alert on at lower than critical severity which is the default.
It could also be useful in other scenarios

✔️ Solution

Expose tags as labels or meta-labels with the __ prefix so that users could use the relabeling process to keep/rename/drop tags as needed.
I think the meta-metric approach would be best and is something that various native service discovery mechanisms already provide in Prometheus.

❓ Alternatives

Perhaps meta labels could also be exposed for enabled notification channels, which for some users could be useful in deciding which alerts are critical or not. For example, if the monitor notification channel A is enabled, then it would also mean the Prometheus alert needs to have a higher severity (which can be achieved through relabels).

📝 Additional Context

No response

@mateuszdrab mateuszdrab added the feature-request Request for new features to be added label Aug 3, 2023
@mateuszdrab
Copy link
Author

Nevermind, as I posted I checked for PRs instead of issues and here it goes 😂
#898

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request Request for new features to be added
Projects
None yet
Development

No branches or pull requests

1 participant