Create rules and exemptions
Create rules and exemptions
When automated suggestions aren’t a perfect fit or you want to be more proactive, you can move from accepting recommendations using Auto-apply, to defining your own logic.
- Navigate to Adaptive Metrics > Metrics.
On the Metrics tab, select a segment from the dropdown menu that does not have Auto-apply enabled.
Click Add new rule to create a custom aggregation or drop rule.
Choose the rule type:
- Aggregation — to combine similar series and reduce cardinality.
- Drop — to stop collecting redundant metrics.
Define what the rule targets: enter the metric name or pattern, and select which labels to keep when aggregating (for example, job, instance).
Configure your rule settings in the dialog, then click Save to save your rule.
Create exemptions
Create exemptions to prevent certain metrics or labels from being included in recommendations.
- Navigate to Adaptive Metrics > Configuration.
Click Add new exemption.
From the Metric dropdown, select a metric from the list or toggle the All switch to apply this exemption to all metrics.
Choose how the metric name should be matched: Exact for a single metric name, Prefix to match every metric whose name starts with the value you entered, or Suffix to match every metric whose name ends with it.
From the Keep labels dropdown, select one or more labels you do not want to be aggregated, or toggle All to keep all labels.
(Optional) Select Disable recommendations to stop Adaptive Metrics from generating new recommendations for the matched metrics. Use this when you want exempted metrics to be left untouched entirely.
Click Save to create the exemption.