Metrics

List and Create Metrics

Search metrics within tenant.

  • Examples:
    • https://{{server}}/api/v2/tenants/{{tenantId}}/metrics?queryString=scope:client
    • https://{{server}}/api/v2/tenants/{{tenantId}}/metrics?queryString=metricName:esx_problem_vmfs_heartbeat_timedout
    • https://{{server}}/api/v2/tenants/{{tenantId}}/metrics?queryString=groupName:vmware_vsan_host_net_rxPackets

Path Parameters

  • tenantIdstringrequired

    Describes clientId or mspId of the tenant

Query Parameters

  • queryStringstring

    The query string to prepare query

  • metricNamestring

    Filter on metric name

  • groupNamestring

    Filter on metric group name

  • displayNamestring

    Filter on metric display name

  • scopestring

    Filter metrics within scope. e.g. partner scope lists only partner scoped metrics.'global' scope lists metrics visible to all.

    Enum:
    clientpartnerglobalservice provider

Responses

  • resultsarray

  • totalResultsnumber

  • pageNonumber

  • pageSizenumber

  • totalPagesnumber

  • sortOrderstring

  • sortBystring

Loading Examples...

Create new custom metric.

Path Parameters

  • tenantIdstringrequired

    Describes clientId or mspId of the tenant

Request Body

application/json

  • metricNamestring

  • groupNamestring

  • typestring

  • resourceTypestring

  • displayNamestring

  • unitstring

  • displayUnitstring

  • factorinteger

  • unitLabelstring

  • descriptionstring

  • consolFuncstring

  • displayByComponentboolean

  • displayOrderinteger

  • topMetricboolean

  • adapterTypestring

Request Body Samples

{
  "metricName": "custom.metrics.Demo-foo-bar",
  "groupName": "custom.metrics.*",
  "displayName": "CUSTOMMETRICS",
  "unit": "%",
  "displayUnit": "Percentage (%)",
  "adapterType": "Gateway",
  "unitLabel": "Percentage (%)",
  "description": "Sample metric please ignore"
}

Responses

200Metric already exists

Response Samples

{
  "adapterType": "Gateway",
  "unitConversionFactor": 0,
  "alertState": "NONE",
  "alertBody": "${severity} - ${component.name}, Resource name: ${resource.name}, IP Address: ${resource.ip}, Metric Name: ${metric.name}, Component: ${component.name}, Severity: ${severity}, Value: ${metric.value}, Reason: ${metric.value} (${threshold})",
  "alertSub": "${severity} - Resource: ${resource.name} - ${component.name} - ${metric.value} (${threshold})",
  "criticalRepeatCount": 1,
  "warnRepeatCount": 1,
  "criticalThreshHold": null,
  "warningThreshHold": null,
  "criticalOperator": "GREATER_THAN_EQUAL",
  "warnOperator": "GREATER_THAN_EQUAL",
  "datapointExp": null,
  "enumMap": null,
  "expression": null,
  "script": null,
  "graphPoint": "NONE",
  "state": "Active",
  "recommended": 0,
  "format": "VALUE",
  "appType": "Gateway",
  "rangeExp": null,
  "category": "METRIC",
  "metricName": "custom.metrics.Demo-foo-bar",
  "displayName": "CUSTOMMETRICS",
  "description": "Sample custom metric Demo only",
  "unit": "%",
  "unitLabel": "Percentage (%)",
  "factor": 1,
  "groupName": "custom.metrics.*",
  "type": ""
}

Update a basic metric details by metric name

Path Parameters

  • tenantIdstringrequired

    Describes clientId or mspId of the tenant

Request Body

application/json

  • metricNamestring

  • metricSourcestring

  • displayNamestring

  • descriptionstring

  • unitstring

  • unitLabelstring

  • groupNamestring

  • factorinteger

  • consolFuncstring

  • displayByComponentboolean

  • displayOrderinteger

  • topMetricboolean

  • timeSeriesboolean

  • warnRepeatCountinteger

  • criticalRepeatCountinteger

  • recommendedinteger

  • useExpressionboolean

  • unitConversionFactorinteger

  • statusstring

    Enum:
    activedelete-pending
  • typestring

  • resourceTypestring

Loading Examples...

Responses

  • metricNamestring

  • metricSourcestring

  • displayNamestring

  • descriptionstring

  • unitstring

  • unitLabelstring

  • groupNamestring

  • factorinteger

  • consolFuncstring

  • displayByComponentboolean

  • displayOrderinteger

  • topMetricboolean

  • timeSeriesboolean

  • warnRepeatCountinteger

  • criticalRepeatCountinteger

  • recommendedinteger

  • useExpressionboolean

  • unitConversionFactorinteger

  • statusstring

    Enum:
    activedelete-pending
  • typestring

  • resourceTypestring

Loading Examples...