Reference to the contains() string manipulation functions

Summary

contains(metric|source|<pointTagKey>, "<subString>", <tsExpression>)

Returns true if the specified metadata string contains the substring, and returns false otherwise.

Parameters

ParameterDescription
metric|source|<pointTagKey> The metadata string (metric name, source name, or value of a point tag key) to be tested.
subString String to test for containment in the metadata string.
tsExpression The expression that describes the time series with the metadata string to be tested.

Example

In the following example, we check whether the value of the service point tag, which is dataingester contains a specified string. In the first case, the result is true for the string data. In the second case, the result is false for the string metrics.

ts contains