-
Notifications
You must be signed in to change notification settings - Fork 29
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
MGMT-16977: Mapping Alerts to AlarmEventRecords #73
Conversation
@danielerez: This pull request references MGMT-16977 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the task to target the "4.16.0" version, but no target version was set. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
8a4590c
to
4aaaa5b
Compare
internal/service/alarm_fetcher.go
Outdated
return | ||
} | ||
|
||
func (r *AlarmFetcher) FetchResourcePool(ctx context.Context, clusterId string) (resourcePool data.Object, err error) { |
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.
Do these functions need to be public?
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.
Not really, can be private, fixed. Good catch:)
I only have a minor question about why a function is public. Other than that it looks good. Feel free to merge. |
Added mapping logic to the AlarmFetcher: * For each Alert retrieved from the AlertManager, map to an AlarmEventRecord object. * Use the resource server url for fetching info about resources and pools (needed for resourceID/resourceTypeID properties). Also added an API for fetching alarm probable causes: * This API is not defined by O2ims spec, but we can use it for exposing a custom list of probable causes. * This list is available in data folder (data/alarms/probable_causes.json), and can be customized and maintained by server admins as required. Note: this PR does not include AlarmDictionary support (will be handled separately).
4aaaa5b
to
25fbdef
Compare
Can indeed be private, fixed. Thanks:) |
/retest |
Added mapping logic to the AlarmFetcher:
Also added an API for fetching alarm probable causes:
Note: this PR does not include AlarmDictionary support (will be handled separately).