Skip to content

not

Input Stack:
query: Query
Output Stack:
(!query): Query

Invert a query condition, selecting time series that do NOT match the specified query. This is the logical NOT operation for queries, allowing you to exclude time series that match certain criteria.

Parameters

  • query: The query condition to invert (result will include time series that DON'T match this query)

Examples

Select time series that do NOT have a node identifier:

nf.node,:has,
:not

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 numRequests (which has no nf.node tag) is highlighted, while all the time series that have node identifiers are excluded.

  • :and - Logical AND operation (can be combined with NOT for complex conditions)
  • :or - Logical OR operation (can be combined with NOT for complex conditions)
  • :has - Check if a key exists (commonly used with NOT)
  • :eq - Basic equality comparison (can be inverted with NOT)