Appearance
The explorer and the filter language Since v0.2
The Traffic and Events pages, the Analytics page, dashboards and the CLI (-q) all use one filter language. The explorer is the set of controls that build a filter: a field panel, a filter builder, a query bar, hover actions, a column picker and saved filters.
Before you begin
- Role: every role reads. A
viewercannot use some fields and operators (see Settings, limits and scope). - Traffic filters read this node's traffic log. For details, see Traffic log.
Build a filter
text
1. Open Monitor > Traffic log (or Events).
2. Open Add filter, choose a field, an operator and a value. Choose Match all or Match any.
3. Apply. The rows are written into the query bar as text; active terms show as chips you can remove.
4. Or type the filter directly in the query bar.sh
waap traffic list -q 'status >= 500 and tls.ja4 exists' -since 1h
waap events list -q 'attack.score >= 50 and client.country = RU' -since 24h
waap analytics validate -q 'path ^= "/api/" and status >= 500'text
GET /v1/traffic?q=...
GET /v1/events?q=...
POST /v1/analytics/validateThe explorer pages, Analytics and dashboards use the full width of the window. The field panel runs down the left and stays in view while the table scrolls. The older form filters (application, client, path, outcome and the rest) are folded under Form filters and open by themselves when one is set.
- Field panel (collapsible, state kept per browser). Search for a field or open a group: Request, Client and network, TLS and fingerprints, Response, Server pool, Security decisions, Attack scores, Automation, API, Other. Selecting a field shows its ten most common values for the current filter and range.
- Add filter builds a filter from rows. A text query with one level of and/or opens again as rows; a deeper one says "This filter is edited as text".
- Query bar. A mistake is shown with its position and, for a misspelled field, a suggestion. The help icon opens the grammar.
- Hover actions on a value: Filter adds
field = value, Exclude addsfield != value, Copy copies the raw value. - Column picker (the fields button in the table header): tick columns, search, reorder, Reset to default. The column set is kept per page per browser and is saved with a saved filter.
- Share a link. The query, range and application are in the page address (
q,sinceorfromandto,app). Copy the address or use Copy link in the overflow menu. The reader needs access to the same applications and sees values as their own role allows. - Create rule from filter turns the filter into a draft custom rule. The draft condition is shown to copy into the custom rule form. Nothing is applied. For details, see Attack and automation scores.
- Export keeps working with the filter. Exports are audited.
Save a filter
Saved filters keep a query, range and columns under a name.
text
1. On the Traffic log or Events page, open the saved filters menu.
2. Save the current query with a name, description and visibility.
3. Apply, edit, duplicate or delete it later. They are also listed on the Saved filters tab of
the Dashboards page.sh
waap filters create -name "5xx with JA4" -q 'status >= 500 and tls.ja4 exists' -visibility private
waap filters listtext
GET /v1/filters
POST /v1/filtersA saved filter is private (its owner only) or shared (everyone who can sign in). For the sharing rules, see Dashboards.
The filter language
expr = or ; or = and { ("or" | "||") and } ; and = unary { ["and" | "&&"] unary }
unary = ("not" | "!") unary | "(" expr ")" | test
test = field op value | field ["not"] "in" "(" value {"," value} ")" | field "exists" | field "missing"
op = "=" "!=" ">" ">=" "<" "<=" "~" "!~" "^=" "$="
value = number | word | "quoted string" (only \" and \\ are escapes)Two tests next to each other mean and. Keywords are case-insensitive. Field names are lower case with dots (client.country, attack.score). waap analytics fields lists the catalogue.
| Operator | Meaning |
|---|---|
=, != | Equal, not equal. For an IP field, a value with / is a network (client.ip = 10.0.0.0/8). |
> >= < <= | Number compare: counts, scores, durations, sizes, times. |
~, !~ | Contains, does not contain. Case-insensitive text; no wildcards, no regular expressions. |
^=, $= | Starts with, ends with. |
in, not in | Any of up to 50 values. |
exists, missing | The field has, or has not, a value. |
Examples:
status >= 500 and server.status = 0
client.country in (RU, CN) and attack.score >= 50
path ^= "/api/" and method != GET and not client.asn = 15169
tls.ja4 exists and automation.class in (automated, likely_automated)
user_agent ~ curl or user_agent ~ pythonTime fields take an RFC 3339 time or a relative value such as -15m. The values of outcome are blocked, challenged, upstream and failed. The values of attack.class are attack, likely_attack, unlikely_attack, clean and none. The values of automation.class are automated, likely_automated, likely_human, verified and none. A value outside the list is refused with the list.
The language has no regular expressions on purpose: a filter is hostile input that runs against the database.
Limits
Each limit is refused with a message that names it.
| Limit | Value |
|---|---|
| Expression | 2,048 bytes |
| Tokens | 256 |
| Comparisons | 32 |
| Nesting depth | 8 |
Values per in | 50 |
| Value | 512 bytes |
| Values in all | 200 |
Troubleshooting
The query bar shows an error with a position
- Cause: the filter does not follow the grammar, or a field name is misspelled.
- Fix: read the suggestion. Run
waap analytics validate -q '...'to check a filter without reading data; it exits 1 when the filter is invalid.
"field not available to your role"
- Cause: a viewer used a field that holds names or free text.
- Fix: sign in as an operator, or use another field.