-
Notifications
You must be signed in to change notification settings - Fork 96
feat: add alerting API and types #528
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: main
Are you sure you want to change the base?
Conversation
klauspost
left a comment
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.
Some clarification needed.
| AlertInternalSubSys = "alert_internal" | ||
| AlertWebhookSubSys = "alert_webhook" | ||
| AlertKafkaSubSys = "alert_kafka" |
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.
Shouldn't these be included in AlertEvent?
I kinda assume "webhook" can return more than one alert.. or at least subsystems will be able to in the future.
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.
The AlertInternalSubSys, AlertWebhookSubSys, AlertKafkaSubSys are configuration subsystems
This is required for a feature in EOS to send alerts to configured targets / internally;
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.
I was thinking in the type Alert struct.
| // GetAlerts retrieves alerts from the MinIO server with the specified options. | ||
| // It returns an iterator that yields AlertEvent objects. | ||
| // Type filtering is case-insensitive and handled server-side. |
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.
Will "current" events be returned right away? Will events re-fire at regular intervals? What be expected from the API?
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.
GetAlerts is a streaming API that:
- Makes a POST request to /admin/alerts
- Returns alerts as a stream decoded from JSON
- Uses Interval option to control the check interval on server side
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.
I was implying it should be documented.
b06eac6 to
5a93af7
Compare
Add alert types (AlertType, AlertEvent, AlertDetails) and the GetAlerts admin API for retrieving license and certificate expiry alerts.
5a93af7 to
7895a80
Compare
Add alert types (AlertType, AlertEvent, AlertDetails) and the GetAlerts admin API for retrieving license and certificate expiry alerts.