Skip to main content
O&M Management/Monitoring APIs/Monitoring and Alarm APIs/Alarm
GETAlarmSince 2.3SynchronousAuth Required

Query Alarm

Query Alarm

Execution Availability

Try It Out

Submit a mock request using the current auth context and example-driven inputs.

Request Inputs

This API requires no request parameters.

Responses

200 OK

On success, this API returns the following response structure.

  • errorErrorCodeRequired

    The error code. If not null, the operation failed. This field is null on success. See error for details.

    • codeStringRequired

      The error code number. A globally unique identifier for the error, for example, SYS.1000, HOST.1001.

    • descriptionStringRequired

      A brief description of the error.

    • detailsStringRequired

      Detailed information about the error.

    • elaborationStringRequired

      A reserved field. Default is null.

    • opaqueLinkedHashMapRequired

      A reserved field. Default is null.

    • causeErrorCodeRequired

      The root error. The source error that caused the current error. This field is null if there is no root error.

  • inventoriesListRequired

    See inventories for details.

    • uuidStringRequired

      The UUID of the resource. Uniquely identifies the resource.

    • nameStringRequired

      Resource name.

    • descriptionStringRequired

      Detailed description of the resource.

    • periodIntegerRequired

      Threshold duration.

    • namespaceStringRequired

      Namespace.

    • metricNameStringRequired

      Metric name.

    • thresholdDoubleRequired

      Threshold.

    • repeatIntervalIntegerRequired

      Alarm repeat interval.

    • createDateTimestampRequired

      Creation time.

    • lastOpDateTimestampRequired

      Last modification time.

    • comparisonOperatorComparisonOperatorRequired

      See comparisonOperator for details.

      • nameStringRequired

        Resource name.

      • ordinalintRequired

        No description provided.

    • statusAlarmStatusRequired

      See status for details.

      • OKAlarmStatusRequired

        Monitoring.

      • AlarmAlarmStatusRequired

        Triggered.

      • InsufficientDataAlarmStatusRequired

        Insufficient data.

    • labelsListRequired

      See labels for details.

      • uuidStringRequired

        The UUID of the resource. Uniquely identifies the resource.

      • keyStringRequired

        Label key.

      • operatorStringRequired

        Comparison operator.

      • valueStringRequired

        Label value.

    • actionsListRequired

      See actions for details.

      • alarmUuidStringRequired

        Alarm UUID.

      • actionTypeStringRequired

        Alarm action type.

      • actionUuidStringRequired

        Alarm action UUID.

Endpoint

GET/zstack/v1/zwatch/alarms

/zstack/v1/zwatch/alarms

Operation ID

QueryAlarm

Permalink

Request Example

curl -X GET 'http://{host}/zstack/v1/zwatch/alarms' -H 'Authorization: OAuth {sessionUuid}'

Response Example

200
{ "inventories": [ { "uuid": "5c9ef4b25c2a485da77eab50745d53cf", "name": "VM CPU Alarm", "comparisonOperator": "LessThanOrEqualTo", "period": 60.0, "namespace": "ZStack/VM", "metricName": "org.zstack.zwatch.datatype.Metric@565e1ebe", "threshold": 30.0, "repeatInterval": 1800.0, "status": "Alarm", "state": "Enabled", "createDate": "Jul 6, 2018 1:50:51 PM", "lastOpDate": "Jul 6, 2018 1:50:51 PM", "labels": [ { "uuid": "5ab29656f8df43a3a78d672af8940896", "key": "VMUuid", "operator": "\u003d", "value": "b128326b8b944c0499992c00cabd4711" } ], "actions": [ { "alarmUuid": "2028f51e88b6449fb33442215810845f", "actionType": "sns", "actionUuid": "9486671b2f4c4413976f1d6938ac1d01" } ] } ] }

Change History

This API has no change history records yet.

View all change history