Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

Contrail Alert Streaming

Contrail alerts are provided on a per-user visible entity (UVE) basis. Contrail analytics raise or clear alerts using Python-coded rules that examine the contents of the UVE and the configuration of the object. Some rules are built in. Others can be added using Python stevedore plugins.

This topic describes Contrail alerts capabilities.

Alert API Format

The Contrail alert analytics API provides the following:

  • Read access to the alerts as part of the UVE GET APIs.

  • Alert acknowledgement using POST requests.

  • UVE and alert streaming using server-sent events (SSEs).

For example:

GET http://<analytics-ip>:8081/analytics/alarms

In the example:

  • An any_of attribute contains alarm rules defined in the format [ [rule1 AND rule2 AND ... AND ruleN] ... OR [rule11 AND rule22 AND ... AND ruleNN] ]

  • Alerts are raised on a per-UVE basis and can be retrieved by a GET on a UVE.

  • An ack indicates if the alert has been acknowledged or not.

  • A token is used by clients when requesting acknowledgements.

Analytics APIs for Alerts

The following examples show the API to use to display alerts and alarms and to acknowledge alarms.

  • To retrieve a list of alerts raised against the control node named aXXsYY.

    This is available for all UVE table types.

  • To retrieve a list of all alarms in the system.

  • To acknowledge an alarm.

    Acknowledged and unacknowledged alarms can be queried specifically using the following URL query parameters along with the GET operations listed previously.

Analytics APIs for SSE Streaming

The following examples show the API to use to retrieve all or portions of SE streams.

  • To retrieve an SSE-based stream of UVE updates for the control node alarms.

    This is available for all UVE table types. If the tablefilt URL query parameter is not provided, all UVEs are retrieved.

  • To retrieve only the alerts portion of the SSE-based stream of UVE updates instead of the entire content.

    This is available for all UVE table types. If the tablefilt URL query parameter is not provided, all UVEs are retrieved.

Built-in Node Alerts

The following built-in node alerts can be retrieved using the APIs listed in Analytics APIs for Alerts.