-
Notifications
You must be signed in to change notification settings - Fork 1
Add component mapping to alert rules #8
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
base: add-alert-management-api-base
Are you sure you want to change the base?
Add component mapping to alert rules #8
Conversation
8feaad6 to
20f8b4d
Compare
|
Hi @machadovilaca , @avlitman, @simonpasquier Hi, Please review this PR. |
20f8b4d to
8d7e4c6
Compare
|
I thought that development was supposed to happen in https://github.com/openshift/monitoring-plugin/? |
@simonpasquier these PRs are against the branch used for openshift#657 |
| Items []struct { | ||
| RuleId string `json:"ruleId"` | ||
| Component *string `json:"component,omitempty"` | ||
| Layer *string `json:"layer,omitempty"` | ||
| } `json:"items"` |
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.
if we use a map we can reuse updateClassificationPayload
internal/managementrouter/router.go
Outdated
| // Classification updates (single and bulk) | ||
| r.HandleFunc("/api/v1/alerting/classification/{ruleId}", httpRouter.UpdateClassification).Methods(http.MethodPatch) | ||
| r.HandleFunc("/api/v1/alerting/classification", httpRouter.BulkUpdateClassification).Methods(http.MethodPatch) |
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.
missing rules from the path
/api/v1/alerting/rules/{ruleId}/classification: we are updating the rule with ruleId -> classification
/api/v1/alerting/rules/classification: we are updating rules -> classification
Signed-off-by: Shirly Radco <sradco@redhat.com>
Signed-off-by: Shirly Radco <sradco@redhat.com>
Signed-off-by: Shirly Radco <sradco@redhat.com>
8d7e4c6 to
887f95f
Compare
|
@machadovilaca I updated the PR based on your feedback. Please review. |
As it has been communicated elsewhere, we wont' be able to review a giant PR in openshift/monitoring-plugin. My expectation was that we would review PRs directly in openshift/monitoring-plugin. |
|
@simonpasquier once we will finish adding all the features to the branch I will split it to logical commits. |
Added a mapping of layer(cluster/namespace/compute) and
component to each alert rule.
Based on openshift/enhancements#1917