Skip to main content

Unlocking Dynamic Dashboards: A Guide to Advanced Token Filtering in Google SecOps 🚀

  • May 21, 2026
  • 7 replies
  • 576 views

bharathmurali
Staff
Forum|alt.badge.img+2

Hey everyone,

Google SecOps is introducing Advanced Filtering to its native dashboard platform. Note that this feature is currently in Private Preview. Since it fundamentally changes how we can build and interact with dashboards, I wanted to share a quick breakdown of how it works, how to set it up, and a few "gotchas" to watch out for.

What is it?

Unlike basic filters that are strictly tied to specific fields, advanced filters operate as query variables, or tokens. This allows us to inject dynamic values, complex regular expressions, or boolean logic directly into our YARA-L queries at runtime.

Here is what makes it stand out:

  • Dynamic Dropdowns: You can populate your filter choices dynamically using the results of a separate YARA-L query, ensuring users always select from up-to-date data.

  • Flexible Formatting: You can define custom Prefixes, Suffixes, and Delimiters (like / for regex or , for IN clauses) to format values before they hit the query.

  • Multi-Select: It allows users to select multiple values for a single token, which are then joined by your defined separator.

How to Configure Advanced Filters

Setting these up involves defining the filter in the dashboard and then dropping the token into your chart queries.

Step 1: Create the Filter

  1. Open the Manage Filters dialog in your dashboard.

  2. Select Advanced Filter as the Filter Type.

  3. Identity: Enter a Filter Name (this is the label users will see) and a Token Variable (e.g., token).

  4. Value Source: Choose between Manual Entry (a static list) or Generate from Query (using dynamic YARA-L results).

  5. Formatting: Set an optional Prefix and Suffix (e.g., ^ and $) if you need to wrap values for specific logic like regex.

  6. Interactions: Toggle "Allow Selection of Multiple Options" and define your Delimiter (e.g., | for regex OR logic).

Step 2: Insert the Token in Your Queries As a dashboard creator, you must manually insert the token into your chart's YARA-L query.

  • Wrap the token variable in $ symbols.

  • Example: principal.hostname = $hostname$ or re.regex(target.ip, $ip_regex$).

  •  

    Note: The UI will give you a yellow warning banner if a query uses an undefined token, treating it as a literal string.

Security & Access

You don't need to configure new permissions for this; it leverages existing RBAC. The queries that populate the dynamic dropdowns enforce Data RBAC, ensuring users only see values (like specific IPs) that they are authorized to access.

 

⚠️ The Golden Rule: Default Values are Critical

Advanced Filters operate exclusively via string substitution. The system does not interpret the logic for you; it simply performs a "find and replace" of your $token$ with the user's selected value before compiling the query.

Because the system won't automatically ignore a token if a user leaves the filter blank, you must define Default Values to maintain a valid query structure for initial loads and Scheduled Reports. The responsibility for ensuring the final substituted query is syntactically correct lies entirely with the user.

Here are a few handy default configurations to prevent your dashboards from breaking on load:

  • The Regex Catch-All: If your query uses principal.hostname = $host$, setting your default value to .*/ turns it into a catch-all regex that successfully returns all results.

Remember: The system does not perform automatic escaping for special characters. Always double-check that your Prefix, Suffix, and Separators align perfectly with YARA-L syntax.

7 replies

jacvb
Forum|alt.badge.img
  • New Member
  • August 7, 2026

Hello,

I am trying to test this out as I would like to be able to put a hostname into the dashboard filtering and get all results for the hostname (upper or lower case).

Something simple as below does not work because the query needs a match to generate a column:

detection.collection_elements.references.event.principal.hostname = $host$

But when I proceed with something such as 

$Host = detection.collection_elements.references.event.principal.hostname
detection.collection_elements.references.event.principal.hostname = $host$

match:
$Host

The match function does not work due to the following:

compilation error parsing query: parser error: no viable alternative at input '$match'
line: 4
column: 1-2 : invalid argument

It would be great if you could reply with a working example that I could try.


cmorris
Staff
Forum|alt.badge.img+16
  • Staff
  • August 10, 2026

Hello,

I am trying to test this out as I would like to be able to put a hostname into the dashboard filtering and get all results for the hostname (upper or lower case).

Something simple as below does not work because the query needs a match to generate a column:

detection.collection_elements.references.event.principal.hostname = $host$

But when I proceed with something such as 

$Host = detection.collection_elements.references.event.principal.hostname
detection.collection_elements.references.event.principal.hostname = $host$

match:
$Host

The match function does not work due to the following:

compilation error parsing query: parser error: no viable alternative at input '$match'
line: 4
column: 1-2 : invalid argument

It would be great if you could reply with a working example that I could try.

Your query works for me, but you will need to create the filter prior to it working. This is the filter I used with your query:

 


jacvb
Forum|alt.badge.img
  • New Member
  • August 11, 2026

Hello,

I am trying to test this out as I would like to be able to put a hostname into the dashboard filtering and get all results for the hostname (upper or lower case).

Something simple as below does not work because the query needs a match to generate a column:

detection.collection_elements.references.event.principal.hostname = $host$

But when I proceed with something such as 

$Host = detection.collection_elements.references.event.principal.hostname
detection.collection_elements.references.event.principal.hostname = $host$

match:
$Host

The match function does not work due to the following:

compilation error parsing query: parser error: no viable alternative at input '$match'
line: 4
column: 1-2 : invalid argument

It would be great if you could reply with a working example that I could try.

Your query works for me, but you will need to create the filter prior to it working. This is the filter I used with your query:

 

Thank you for that information. I think I am following along, now. I opted for the “Generate from query” option so that I can generate a list of hostnames rather than entering a select few in the manual entry. 

I mostly seem to have the filter working but my ultimate goal is to be able to put in a hostname to the dashboard filter. upper or lowercase, and still get the results I expect. Do you know if there is a way to utilize “nocase” or similar?


cmorris
Staff
Forum|alt.badge.img+16
  • Staff
  • August 11, 2026

Can you try entering ‘nocase’ at the end of line #2 (after the token variable) of your query?


jacvb
Forum|alt.badge.img
  • New Member
  • August 11, 2026

Can you try entering ‘nocase’ at the end of line #2 (after the token variable) of your query?

This was a great suggestion, but does not seem to be valid (nocase is not supported for constant)


cmorris
Staff
Forum|alt.badge.img+16
  • Staff
  • August 11, 2026

Is that the filtering query?

Can you try adding in the main dash query, syntax seems to be valid in my testing. See end of line 2:

$Host = detection.collection_elements.references.event.principal.hostname
detection.collection_elements.references.event.principal.hostname = $host$ nocase

match:
$Host

 


jacvb
Forum|alt.badge.img
  • New Member
  • August 11, 2026

FYI - I got things fully sorted out on my end. I found it best to utilize a list of hosts in my Filter Dropdown (generated from my Filter query which runs back 90 days) which allowed for me to avoid having to specify case sensitivity as I could just select the captured hostname present in the event. And as suggested above, I am using the .* default value to search all hostnames when I do not have one specified. 

Thank you for your help here