Hanzo
OpenapiO11y

Estimates the series reduction and the dashboards and alerts a candidate…

Estimates the series reduction and the dashboards and alerts a candidate volume-control rule would touch, without persisting it.

POST /v1/o11y/metric_reduction_rules/preview

Addresshttps://api.hanzo.ai/v1/o11y/metric_reduction_rules/preview
MethodPOST
OperationPreviewMetricReductionRule
AuthAuthorization: Bearer $HANZO_API_KEY

Estimates the series reduction and the dashboards and alerts a candidate volume-control rule would touch, without persisting it.

Request

4 fields, body application/json (required).

FieldInTypeRequiredDescription
labelsbodystring[]yesLabels are the label names the rule would match.
lookbackMsbodyintegerLookbackMs is how far back to sample when estimating.
matchTypebodystringyesMatchType is drop or keep.
metricNamebodystringyesMetricName is the metric the rule would govern.

Response

StatusBodyMeaning
200o11y.O11yReductionRulePreviewOutok

200 body — 16 fields.

FieldInTypeAlwaysDescription
databodyo11y.O11yReductionRulePreview
data.affectedAssetsbodyo11y.O11yAffectedAsset[]AffectedAssets are the dashboards and alerts the rule would touch.
data.affectedAssets[].idbodystringID is the asset's id.
data.affectedAssets[].impactedLabelsbodystring[]ImpactedLabels are the rule labels the asset uses.
data.affectedAssets[].namebodystringName is the asset's name.
data.affectedAssets[].typebodystringType is dashboard or alert_rule.
data.affectedAssets[].widgetbodyo11y.O11yAffectedWidget
data.affectedAssets[].widget.idbodystringID is the panel's id.
data.affectedAssets[].widget.namebodystringName is the panel's name.
data.currentRetainedSeriesbodyintegerCurrentRetainedSeries is how many survive the rules in force today.
data.droppedLabelsbodystring[]DroppedLabels are the labels the rule would drop.
data.effectiveFrombodystring (date-time)EffectiveFrom is when the rule would take effect.
data.ingestedSeriesbodyintegerIngestedSeries is how many series the metric ingests today.
data.reductionPercentbodynumberReductionPercent is the estimated reduction, in percent.
data.retainedSeriesbodyintegerRetainedSeries is how many would survive with the candidate rule.
statusbodystringStatus is "success".

Failure carries the platform error shape — see Errors.

Examples

hanzo o11y metric_reduction_rules preview \
  --labels '["<labels>"]' \
  --match-type <matchType> \
  --metric-name <metricName>

O11y API · All Hanzo APIs · Interactive reference

How is this guide?

On this page