Skip to content

has

Input Stack:
key: String
Output Stack:
Query

Select time series that have a specified tag key, regardless of the key's value. This is useful for filtering based on the presence of optional tags or finding time series that have been tagged with specific dimensions.

Parameters

  • key: The tag key name to check for existence (e.g., nf.node, status, env)

Examples

Select all time series that have a node identifier:

nf.node,:has

When matching against the sample data in the table below, the highlighted time series would be included in the result set:

Namenf.appnf.node
ssCpuUser alerttest i-0123
ssCpuSystem alerttest i-0123
ssCpuUser nccp i-0abc
ssCpuSystem nccp i-0abc
numRequests nccp  
ssCpuUser api i-0456

Notice that only time series with a value in the nf.node column are highlighted, while numRequests which has no nf.node tag is not selected.

  • :eq - Check if a key has a specific value
  • :re - Check if a key matches a regular expression pattern
  • :in - Check if a key's value is in a list of options
  • :not - Invert the query condition (e.g., select series that DON'T have a key)