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

GetAlarmData

GetAlarmData

Execution Availability

Try It Out

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

Query Parameters

Request Inputs

Query Parameters

  • startTimeLong

    Optional. The start time.

  • endTimeLong

    Optional. The end time.

  • limitInteger

    Optional. The maximum number of returned records.

  • conditionsList

    Optional. The conditions to filter the results.

  • countboolean

    Optional. Whether to query the message count.

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.

  • historiesListRequired

    See histories.

    • alarmUuidStringRequired

      The alarm UUID.

    • namespaceStringRequired

      The namespace.

    • metricNameStringRequired

      The metric name.

    • accountUuidStringRequired

      The account UUID.

    • resourceUuidStringRequired

      The resource UUID.

    • resourceTypeStringRequired

      The resource type.

    • alarmStatusStringRequired

      The alarm status.

    • alarmNameStringRequired

      The alarm name.

    • thresholdDoubleRequired

      The alarm threshold.

    • periodIntegerRequired

      The threshold duration.

    • labelsStringRequired

      The label list.

    • metricValueDoubleRequired

      The metric value.

    • timelongRequired

      The time that the alarm record was generated.

Endpoint

GET/zstack/v1/zwatch/alarm-histories

/zstack/v1/zwatch/alarm-histories

Operation ID

GetAlarmData

Permalink

Request Example

curl -X GET 'http://{host}/zstack/v1/zwatch/alarm-histories?startTime=1&endTime=1&limit=1&conditions=<conditions>&count=True&excludeOtherAccount=True&endpointUuid=<endpointUuid>&systemTags=<systemTags>&userTags=<userTags>' -H 'Authorization: OAuth {sessionUuid}'

Response Example

200
{ "histories": [ { "alarmUuid": "143b24a12d193c1992c4774dc3b34fda", "namespace": "ZStack/VM", "metricName": "CPUUsedUtilization", "accountUuid": "90aea7a1dfe93cf7bd3379254dddbdf9", "resourceUuid": "4e6bb5390d3938cb9ce830a4766ee4d8", "resourceType": "VmInstanceVO", "alarmStatus": "Alarm", "alarmName": "test-alarm", "threshold": 90.0, "labels": "VMUuid Equal 4e6bb5390d3938cb9ce830a4766ee4d8, CPUNum Equal 2", "metricValue": 10.0, "comparisonOperator": "LessThan", "time": 1.510669257141E12 } ] }

Change History

This API has no change history records yet.

View all change history