-
Notifications
You must be signed in to change notification settings - Fork 12.2k
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
Alerting: Add ability to include aliases with hyphen in InfluxDB #32224
Conversation
e489c64
to
439ba3f
Compare
439ba3f
to
9fd63d2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There's some room for improvement of the tests, but not a blocker for this PR
- Convert to Go standard tests
- Seems like table-driven tests could be a good fit for some of the tests
Agree @marefr, should we create a broader ticket to start do some refactoring? |
@dsotirakis Our approach is to try and fix things as we change code. For this one you can probably create an issue if that helps. Note that this has milestone 7.5.0 and needs to be backported into v7.5.x branch for it to actually be included in the release build. Please add backport label |
You probably want to add "add to changelog" label so that it show up in the changelog for the release. Title can be improved a bit I think. We normally uses the alerting tag for the title, see for example https://github.com/grafana/grafana/blob/master/CHANGELOG.md#features-and-enhancements-1 |
… aliases (#32224) * Notifications: InfluxDB - fix regex to include metrics with hyphen * Add hyphen check in tests
… aliases (#32224) * Notifications: InfluxDB - fix regex to include metrics with hyphen * Add hyphen check in tests
… aliases (grafana#32224) * Notifications: InfluxDB - fix regex to include metrics with hyphen * Add hyphen check in tests
What this PR does / why we need it:
Tiny fix, to make InfluxDB metrics include hyphens (
-
) in their names when aliasing.Which issue(s) this PR fixes:
Fixes #31284
Special notes for your reviewer:
Steps:
cpu
andhost
metrics.cpu
andhost
tocpu-a
andhost-a
to reproduce.Before:
After: