Skip to main content
POST
/
api
/
v1
/
config
/
rollup-rules
cURL
curl --request POST \
  --url https://tenant.name/api/v1/config/rollup-rules \
  --header 'API-Token: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "dry_run": true,
  "rollup_rule": {
    "bucket_slug": "<string>",
    "name": "<string>",
    "add_metric_type_label": true,
    "aggregation": "LAST",
    "drop_raw": true,
    "expansive_match": true,
    "filters": [
      {
        "name": "job",
        "value_glob": "myservice*"
      }
    ],
    "graphite_label_policy": {
      "replace": [
        {
          "name": "__g1__",
          "new_value": "ALL_HOSTS"
        }
      ]
    },
    "interval": "<string>",
    "label_policy": {
      "discard": [
        "<string>"
      ],
      "keep": [
        "<string>"
      ]
    },
    "label_replace": {},
    "metric_name": "<string>",
    "metric_type": "COUNTER",
    "mode": "ENABLED",
    "skip_on_conflict": true,
    "slug": "<string>",
    "storage_policy": {
      "resolution": "<string>",
      "retention": "<string>"
    }
  }
}
'
{
  "rollup_rule": {
    "bucket_slug": "<string>",
    "name": "<string>",
    "add_metric_type_label": true,
    "aggregation": "LAST",
    "created_at": "2023-11-07T05:31:56Z",
    "drop_raw": true,
    "expansive_match": true,
    "filters": [
      {
        "name": "job",
        "value_glob": "myservice*"
      }
    ],
    "graphite_label_policy": {
      "replace": [
        {
          "name": "__g1__",
          "new_value": "ALL_HOSTS"
        }
      ]
    },
    "interval": "<string>",
    "label_policy": {
      "discard": [
        "<string>"
      ],
      "keep": [
        "<string>"
      ]
    },
    "label_replace": {},
    "metric_name": "<string>",
    "metric_type": "COUNTER",
    "mode": "ENABLED",
    "skip_on_conflict": true,
    "slug": "<string>",
    "storage_policy": {
      "resolution": "<string>",
      "retention": "<string>"
    },
    "updated_at": "2023-11-07T05:31:56Z"
  }
}

Authorizations

API-Token
string
header
required

Chronosphere API token

Body

application/json
dry_run
boolean

If true, validates the specified configuration without creating the RollupRule. If the specified configuration is valid, the endpoint returns a partial response without the RollupRule. If the specified configuration is invalid, the endpoint returns an error.

rollup_rule
object

The RollupRule to create.

Response

A successful response containing the created RollupRule.

rollup_rule
object