Query Metric Data Template

GET/zstack/v1/zwatch/metrics/httpreceivers/templates
GET/zstack/v1/zwatch/metrics/httpreceivers/templates/{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/templates?q=receiverUuid=13213154f64e33bb8ad461956981a6e2
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X GET http://localhost:8080/zstack/v1/zwatch/metrics/httpreceivers/templates/98a42f1af96e3c89b59e87bb20cc6421

Queryable Fields

Run the CLI command-line tool, enter QueryMetricTemplate, and press the Tab key 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
inventoriesListSee inventories for details.0.6
errorErrorCodeThe error code. If not null, the operation failed. This field is null when the operation succeeds. See error for details.0.6

inventories

NameTypeDescriptionStarting Version
uuidStringThe UUID of the resource. Uniquely identifies the resource.0.6
nameStringThe resource name.0.6
urlString 0.6
descriptionStringThe detailed description of the resource.0.6
createDateTimestampThe creation time.0.6
lastOpDateTimestampThe last modification time.0.6
stateReceiverStateSee state for details.0.6

state

NameTypeDescriptionStarting Version
EnabledReceiverState 0.6
DisabledReceiverState 0.6

error

NameTypeDescriptionStarting Version
codeStringThe error code number. A globally unique identifier for the error, e.g., SYS.1000, HOST.1001.0.6
descriptionStringA brief description of the error.0.6
detailsStringThe detailed error information.0.6
elaborationStringA reserved field. Default is null.0.6
opaqueLinkedHashMapA reserved field. Default is null.0.6
causeErrorCodeThe root error. The source error that caused the current error. This field is null if there is no root cause.0.6

SDK Examples

Java SDK

QueryMetricTemplateAction action = new QueryMetricTemplateAction();
action.conditions = asList("receiverUuid=21eee98608ce3cc580d7572e6ee47fea");
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
QueryMetricTemplateAction.Result res = action.call();

Python SDK

QueryMetricTemplateAction action = QueryMetricTemplateAction()
action.conditions = ["receiverUuid=aca6437c53a4348eb6d8c20fe0cf054e"]
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
QueryMetricTemplateAction.Result res = action.call()