Metrics

Update a derived metric

Update the definition of an existing derived metric. The id in the request body must match the metric_name path parameter. Requires the Manage Tags for Metrics permission.

put/api/v2/metrics/derived-metrics/{metric_name}

Request

Path parameters

metric_namestring required

The name of the metric.

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

OK

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.