Skip to main content
Platform O&M/Cloud Monitoring/Monitoring and Alarm/SNS/ZWatch Operations/Alarm Operations
GETAlarm OperationsSince 2.3SynchronousAuth Required

QueryAlarm

QueryAlarm

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 fails, or vice versa. For more information, see error.

    • codeStringRequired

      The error code, which is a numbered or alphanumeric code that specifies an error. For example, SYS.1000, HOST.1001.

    • descriptionStringRequired

      The brief description of the error.

    • detailsStringRequired

      The details about the error.

    • elaborationStringRequired

      The reserved field. Default value: null.

    • opaqueLinkedHashMapRequired

      The reserved field. Default value: null.

    • causeErrorCodeRequired

      The root error, which is the associated root cause of the current error. If no root error exists, this parameter is null.

  • inventoriesListRequired

    See inventories.

    • uuidStringRequired

      The resource UUID.

    • nameStringRequired

      Th resource name.

    • descriptionStringRequired

      The detailed description of the resource.

    • periodIntegerRequired

      The threshold duration.

    • namespaceStringRequired

      The namespace.

    • metricNameStringRequired

      The metric name.

    • thresholdDoubleRequired

      The threshold.

    • repeatIntervalIntegerRequired

      The alarm repeat interval.

    • createDateTimestampRequired

      The creation date.

    • lastOpDateTimestampRequired

      The last operation date.

    • comparisonOperatorComparisonOperatorRequired

      See comparisonOperator.

      • nameStringRequired

        The resource name.

      • ordinalintRequired

        No description provided.

    • statusAlarmStatusRequired

      See status.

      • OKAlarmStatusRequired

        The alarm is in normal status.

      • AlarmAlarmStatusRequired

        The alarm is triggered.

      • InsufficientDataAlarmStatusRequired

        The data is insufficient.

    • labelsListRequired

      See labels.

      • uuidStringRequired

        The resource UUID.

      • keyStringRequired

        The label key.

      • operatorStringRequired

        The comparison operator.

      • valueStringRequired

        The label value.

    • actionsListRequired

      See actions.

      • alarmUuidStringRequired

        The alarm UUID.

      • actionTypeStringRequired

        The action type.

      • actionUuidStringRequired

        The 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