Skip to Content
KubeSense

Coming from Advanced

Every Advanced operator and function as a filter, what changes, and what cannot be written as a filter.

This page is for people who wrote SQL-like text in the Advanced tab. It shows each operator and function as a filter. Advanced text such as type = "ERROR" AND workload IN ("payment", "cart") becomes type:ERROR workload:(payment OR cart). KubeSense converts an Advanced filter when you open it in the Basic tab, and a notice names any change in meaning. See What changed when your filter was converted.

warning: Advanced is being retired. It becomes read-only first, then it is removed. Review your saved filters while Advanced is still next to the Basic tab, so you can compare the rows.

Operators

AdvancedExampleFilterWhat changes
=workload = "payment"workload:paymentNothing.
!=workload != "payment"-workload:paymentNothing.
INtype IN ("ERROR", "WARN")type:(ERROR OR WARN)Nothing.
NOT INtype NOT IN ("DEBUG", "TRACE")-type:(DEBUG OR TRACE)Nothing.
LIKEworkload LIKE "pay_ent%"workload:pay?ent*% becomes * and _ becomes ?. Letter case still matters.
NOT LIKEworkload NOT LIKE "pay"-workload:~*pay*Advanced wrapped a value with no % in % and ignored case. The filter writes both out.
ILIKEworkload ILIKE "%pay%"workload:~*pay*~ ignores letter case.
NOT ILIKEworkload NOT ILIKE "%pay%"-workload:~*pay*Nothing.
SUBSTR_ILIKEworkload SUBSTR_ILIKE "pay"workload:~*pay*Nothing. A substring that ignores case.
MATCHworkload MATCH "pay.*"workload:pay*Only when the pattern is a plain glob such as .*. See A regular expression, now a pattern.
MATCH, several patternsbody MATCH ("Trans.*", "Pay.*")body:(Trans* OR Pay*)Several patterns become one list. Any pattern that is not a plain glob stays as /regex/ and is reported.
AND, ORtype = "ERROR" AND (workload = "payment" OR workload = "cart")type:ERROR (workload:payment OR workload:cart)A space also means AND.
NOT (group)NOT (type = "DEBUG" OR type = "TRACE")NOT (type:DEBUG OR type:TRACE) or -(type:DEBUG OR type:TRACE)Nothing.

Filters quote only with double quotes, and only when the value needs them. See Quotes and escapes.

AdvancedExampleFilterWhat changes
>, >=, <, <= on a numberduration_ms > 100duration_ms>100The value is a plain number of milliseconds.
>= on an attribute@http.status_code >= 500@http.status_code>=500Nothing.
= on an attribute@http.route = "/checkout"@http.route:/checkoutNothing.
AdvancedExampleFilterWhat changes
exist(@key)exist(@user.id)@user.id:*Nothing on logs. On traces, Advanced gave an error. See An exist check that errored, now works.
not_exist(@key)not_exist(@user.id)-@user.id:*Nothing.
exist(column)exist(workload)workload:*Means a value that is not empty. See An exist check on a column.
= on a list element@tags[*] = prod@tags[*]:prodMatches when any element is prod. See Lists in a log.

Functions

hasAnyToken, hasAllToken and multiSearchAny keep their meaning on body. On any other field a filter has no word search, so hasAnyToken and HAS_TOKEN become an exact match, hasAllToken with one value does the same, and multiSearchAny becomes a substring test that ignores case.

On body:

AdvancedExampleFilterWhat changes
hasAnyTokenbody hasAnyToken ("timeout", "refused")body:(timeout OR refused)Nothing.
hasAllTokenbody hasAllToken ("connection", "reset")body:(connection AND reset)Nothing.
multiSearchAnybody multiSearchAny ("oom", "sigkill")body:(*oom* OR *sigkill*)Substring tests, as before.
=body = "timeout"body:timeoutThe word now matches anywhere in the body, in any case. See Body equality becomes a word search.
LIKE, ILIKEbody ILIKE "%timeout%"body:*timeout*body ignores letter case in both.
SUBSTR_ILIKEbody SUBSTR_ILIKE "timeout"body:*timeout*Nothing.

On every other field:

AdvancedExampleFilterWhat changes
hasAnyToken, HAS_TOKENworkload hasAnyToken ("payment", "checkout")workload:(payment OR checkout)An exact match, so the value must be payment or checkout, not repayments or payment-api. See Word search on a field becomes an exact match.
hasAllToken with one valueworkload hasAllToken ("payment")workload:paymentThe same change.
hasAllToken with several valuesworkload hasAllToken ("payment", "checkout")No filter formA value cannot equal all of them. The filter stays in Advanced.
ILIKE_LOGworkload ILIKE_LOG "payment"workload:~*payment*A substring test, so repayments also matches payment. See Case-insensitive log search on a field becomes a substring match.
multiSearchAnyworkload multiSearchAny ("Pay", "cart")workload:(~*pay* OR ~*cart*)Nothing. It was already a case-insensitive substring test.

Dashboard variables

A filter writes a variable that is part of a value as ${name}. See Variables on dashboards.

AdvancedExampleFilterWhat changes
SUBSTR_ILIKE with a variablenamespace SUBSTR_ILIKE "$env"namespace:~*${env}*A substring of any selected value, ignoring case. A _ or a backslash in a value matches as itself.
LIKE with a variableworkload LIKE "$svc%"workload:${svc}*With several values, the * applies to each one.
AdvancedExampleFilterWhat changes
A field reference$$svc AND type = ERROR$$svc type:ERRORNothing. $$svc is still the variable's field with its selected values.
A field reference under NOTNOT $$svc-$$svcNothing.

A term that names a variable the dashboard does not have is ignored in a filter. A filter that names only such variables now converts. The rows stay the same when the missing variable stood alone, and change when it was inside a condition.

AdvancedExampleFilterWhat changes
A missing field reference$$nope AND type = "ERROR"type:ERRORNothing.
A missing variable in a conditionworkload = "$nope" AND type = "ERROR"type:ERRORIt ran as a search for the text $nope and returned no rows. It now matches every ERROR row. See A variable the dashboard does not have, ignored.

Off a dashboard, a $name is ordinary text. See Variables on dashboards.

What cannot be written as a filter

A filter keeps one meaning per text on every screen, so a few Advanced behaviors have no filter form.

  • Case-sensitive search on body. body ignores letter case in every filter. A log pipeline rule that kept case converts to a regular expression, body:/Payment/. See Regular expressions.
  • Word search on other fields. Only body has word search. On another field hasAnyToken becomes an exact match, and hasAllToken with several values has no form. Write workload:~*word* to match text anywhere in a value.
  • Regular expressions outside pipelines. /regex/ works only in log pipeline conditions and log-to-metric filters. See A regular expression that a filter cannot take here.
  • SQL operators. A filter does not accept =, !=, IN or LIKE as text. When you type one, the filter bar shows the filter form. See Errors.

On this page