Query Metric Data HTTP Receivers

GET/zstack/v1/zwatch/metrics/httpreceivers
GET/zstack/v1/zwatch/metrics/httpreceivers/{uuid}

Headers

Authorization: OAuth the-session-uuid

Curl Example

curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X GET http://localhost:8080/zstack/v1/zwatch/metrics/httpreceivers?q=name=CloudMonitor
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X GET http://localhost:8080/zstack/v1/zwatch/metrics/httpreceivers/6e17a72176453e9e9a4b2783d1219fe4

Queryable Fields

Run the CLI command line tool, enter QueryMetricDataHttpReceiver, and press Tab to view all queryable fields and cross-table queryable resource names.

API Response

Response Example

{
  "inventories": [
    {
      "uuid": "77fa620b8d36311ca413c1bfc661c207",
      "name": "CloudMonitor",
      "url": "http://127.0.0.1/xxx",
      "createDate": "Nov 14, 2017 2:20:57 PM",
      "lastOpDate": "Nov 14, 2017 2:20:57 PM",
      "state": "Enabled"
    }
  ]
}
NameTypeDescriptionStarting Version
successboolean 0.6
inventoriesListFor details, see inventories0.6
errorErrorCodeError code. If not null, the operation failed. This field is null when the operation succeeds. For details, see error0.6

inventories

NameTypeDescriptionStarting Version
uuidStringResource UUID. Uniquely identifies the resource0.6
nameStringResource name0.6
urlString 0.6
descriptionStringDetailed description of the resource0.6
createDateTimestampCreation time0.6
lastOpDateTimestampLast modification time0.6
stateReceiverStateFor details, see state0.6

state

NameTypeDescriptionStarting Version
EnabledReceiverState 0.6
DisabledReceiverState 0.6

error

NameTypeDescriptionStarting Version
codeStringError code. The globally unique error identifier, for example, SYS.1000, HOST.10010.6
descriptionStringBrief description of the error0.6
detailsStringDetailed error information0.6
elaborationStringReserved field. Default is null0.6
opaqueLinkedHashMapReserved field. Default is null0.6
causeErrorCodeRoot error. The source error that caused the current error. This field is null if no root error exists0.6

SDK Examples

Java SDK

QueryMetricDataHttpReceiverAction action = new QueryMetricDataHttpReceiverAction();
action.conditions = asList("name=CloudMonitor");
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
QueryMetricDataHttpReceiverAction.Result res = action.call();

Python SDK

QueryMetricDataHttpReceiverAction action = QueryMetricDataHttpReceiverAction()
action.conditions = ["name=CloudMonitor"]
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
QueryMetricDataHttpReceiverAction.Result res = action.call()