Skip to content

Conversation

@sradco
Copy link

@sradco sradco commented Jan 5, 2026

Added a mapping of layer(cluster/namespace/compute) and
component to each alert rule.

Based on openshift/enhancements#1917

@sradco sradco changed the title Add component mapping to alert rules [WIP]Add component mapping to alert rules Jan 5, 2026
@sradco sradco force-pushed the add_alert_rule_mapping branch 3 times, most recently from 8feaad6 to 20f8b4d Compare January 7, 2026 09:16
@sradco
Copy link
Author

sradco commented Jan 11, 2026

Hi @machadovilaca , @avlitman, @simonpasquier Hi, Please review this PR.

@sradco sradco changed the title [WIP]Add component mapping to alert rules Add component mapping to alert rules Jan 12, 2026
@sradco sradco force-pushed the add_alert_rule_mapping branch from 20f8b4d to 8d7e4c6 Compare January 12, 2026 13:11
@simonpasquier
Copy link

I thought that development was supposed to happen in https://github.com/openshift/monitoring-plugin/?

@machadovilaca
Copy link
Owner

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
as long as that one is not merged to the feature branch in openshift/monitoring-plugin, we can't open PRs there

Comment on lines 41 to 45
Items []struct {
RuleId string `json:"ruleId"`
Component *string `json:"component,omitempty"`
Layer *string `json:"layer,omitempty"`
} `json:"items"`
Copy link
Owner

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

Comment on lines 34 to 36
// 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)
Copy link
Owner

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>
@sradco sradco force-pushed the add_alert_rule_mapping branch from 8d7e4c6 to 887f95f Compare January 15, 2026 18:52
@sradco
Copy link
Author

sradco commented Jan 15, 2026

@machadovilaca I updated the PR based on your feedback. Please review.

@simonpasquier
Copy link

as long as that one is not merged to the feature branch in openshift/monitoring-plugin, we can't open PRs there

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.

@sradco
Copy link
Author

sradco commented Jan 16, 2026

@simonpasquier once we will finish adding all the features to the branch I will split it to logical commits.

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.

3 participants