Your data. Anywhere you go.

New Relic for iOS or Android

Download on the App Store    Android App on Google play

New Relic Insights App for iOS

Download on the App Store

Learn more

Close icon

Relic Solution: Why is there a ^ in my metric?



It can be alarming to see odd characters in unexpected places, but never fear! The ^ is a wildcard character that protects metric paths by replacing some characters, rather than escaping them.

This can come into play when directly interacting with metrics. For example when using the metric Data Explorer to locate metrics that will be used for Custom Metric Alerts. This is discussed in the levelling up forum post: Relic Solution: Custom Metric Alerts on the Linux Server Monitor.

For example a disk may be mounted on a server at /dev/xvdb. For metrics to refer to this disk, they will refer to it by its mount point. However the / character is used to delineate segments in metrics. Hence each / in the mount path is replaced by ^. This results in metrics like the Disk I/O metric: System/Disk/^dev^xvdb/Utilization/percent. If each / in the disk mount path were not replaced with ^ then it would interfere with the depth of the metric at which the /Utilization segment exists.

The New Relic REST API (v2) also permits direct interaction with metrics. Just as with the metric Data Explorer discussed above, it is necessary to replace any / with a ^ in metric names. However the REST API cannot refer directly to the ^ character and instead must use it in its URL encoded format %5. This means that the disk that is mounted at /dev/xvdb is stored as ^dev^xvdb and is referred to in the REST API as %5dev%5xvdb. Fore more information, please see our doc: Obtaining disk I/O data (REST API v2).

It is also important to note that in the REST API the ^ cannot be used as a wildcard character in the way it can be used in the metric Data Explorer.