There may be cases where an application sends many individual metrics that could be better managed in groups. Most of these occur with web transactions metrics named from URLs. For more information on this issue, see Metric grouping issues (MGIs).
To reduce high cardinality and prevent metric grouping issues, New Relic supports rules for grouping or filtering out metrics (normalization). In some cases, when MGIs with a significant high number of metrics are detected, a rule is created automatically to protect the platform from performance degradation.
You can create and manage new rules that deal with the noise produced from high cardinality metrics by using the metric normalization tool, which is accessible from each service dashboard in the New Relic Explorer. Once there, select Metric Normalization in the left sidebar.
There you can see the existing rules or create new ones. Click a rule to modify it, or click Create a new rule to create a new one. A new pane to configure the rule will be displayed.
Match expression: enter the regular expression to group all the metrics you want to include in the rule.
Matches: here you will see a preview of the metrics matched by the regular expression above.
Action: the action you want to perform on the metrics.
- Replace: replace the matched metrics by the regular expression with the value described in the Replacement field.
- Ignore: ignore any metric that matches the regular expression.
- Deny new metrics: only write metrics that have already been reported, and ignore those that match the regular expression.
Replacement: only active when Replace is enabled. Matched metrics are replaced with the field's value. If the regular expression is capturing groups, you can use placeholders for them with
\2for the groups
Active: rules can’t be deleted, but can be deactivated. Click the toggle to enable or disable the rule. If you want the rule to be removed, reach out to New Relic's support.
Notes: internal notes on the rule. Has no effect on the rule.
Once you have set up the fields, click Create (or Edit in case you are editing an existing rule), and the rule will be applied immediately as long as it's Active.