Skip to content

want an alert list endpoint in the public API #11005

Description

@hawkw

Currently, the only way to view alerts in the public API is to list the alerts that were dispatched to an alert receiver. This means that there is no way to consume alerts without first creating a receiver, and alerts that a receiver is not subscribed to cannot be accessed. As we use alerts for more things, it will become desirable to be able to list alerts without going through alert receivers. For example, we probably want to have a page in the web console that shows a timeline of all alerts (regardless of whether a receiver is subscribed to them) which the API does not currently let us do.

Therefore, we should add an API for listing alerts. It should probably be ordered by the alert's timestamp and paginated by timestamp and UUID (to ensure that we can uniquely identify the alert when paginating), similar to the audit log. It should also be possible to filter the alert list based on a set of alert classes or alert class globs, and a start/end time range. Luckily, there's already a database query for listing alerts that does all of this, it's just currently only used for omdb commands. It shouldn't be too difficult to wire this into the external API.

Metadata

Metadata

Assignees

No one assigned

    Labels

    fault-managementEverything related to the fault-management initiative (RFD480 and others)nexusRelated to nexus

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions