Metrics

Create a derived metric

Create a derived metric for the org. The metric name is supplied as the resource id, and the definition sets the formula and the queries the formula is computed from. Requires the Manage Tags for Metrics permission.

post/api/v2/metrics/derived-metrics

Request

Request body

Example request

{
  "data": {
    "attributes": {
      "definition": {
        "formula": "a",
        "queries": [
          {
            "data_source": "metrics",
            "name": "a",
            "query": "avg:system.cpu.user{*}"
          }
        ]
      }
    },
    "id": "my.derived.metric",
    "type": "derived_metrics"
  }
}

Response

Created

Example response

{
  "data": {
    "attributes": {
      "definition": {
        "formula": "a",
        "queries": [
          {
            "data_source": "metrics",
            "name": "a",
            "query": "avg:system.cpu.user{*}"
          }
        ]
      }
    },
    "id": "my.derived.metric",
    "type": "derived_metrics"
  }
}

Changes

Changes to this operation have not been checked yet.