Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#### Filter query syntax

Each processor has a corresponding filter query in their fields. Processors only process logs that match their filter query. And for all processors except the filter processor, logs that do not match the query are sent to the next step of the pipeline. For the filter processor, logs that do not match the query are dropped.
Each processor has a corresponding filter query in their fields. Processors only process logs that match their filter query. And for all processors except the Filter processor, logs that do not match the query are sent to the next step of the pipeline. For the Filter processor, logs that do not match the query are dropped.

The following are filter query examples:
The following are logs filter query examples:

- `NOT (status:debug)`: This filters for logs that do not have the status `DEBUG`.
- `status:ok service:flask-web-app`: This filters for all logs with the status `OK` from your `flask-web-app` service.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#### Filter query syntax

Each processor has a corresponding filter query in their fields. Processors only process logs or metrics that match their filter query. And for all processors except the Filter processor, logs or metrics that do not match the query are sent to the next step of the pipeline. For the Filter processor, logs or metrics that do not match the query are dropped.

The following are logs filter query examples:

- `NOT (status:debug)`: This filters for logs that do not have the status `DEBUG`.
- `status:ok service:flask-web-app`: This filters for all logs with the status `OK` from your `flask-web-app` service.
- This query can also be written as: `status:ok AND service:flask-web-app`.
- `host:COMP-A9JNGYK OR host:COMP-J58KAS`: This filter query only matches logs from the labeled hosts.
- `user.status:inactive`: This filters for logs with the status `inactive` nested under the `user` attribute.
- `http.status:[200 TO 299]` or `http.status:{300 TO 399}`: These two filters represent the syntax to query a range for `http.status`. Ranges can be used across any attribute.

The following are metrics filter query examples:

- `NOT system.cpu.user`: This filters for metrics that do not have the field `name:system.cpu.user`.
- `system.cpu.user OR system.cpu.user.total`: This filter query only matches metrics that have either `name:system.cpu.user` or `name:system.cpu.user.total`.
- `tags:(env\:prod OR env\:test)`: This filters for metrics with `env:prod` or `env:test` in `tags`.

Learn more about writing filter queries in [Observability Pipelines Search Syntax][4001].

[4001]: /observability_pipelines/search_syntax/
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#### Filter query syntax

Each processor has a corresponding filter query in their fields. Processors only process metrics that match their filter query. And for all processors except the Filter processor, metrics that do not match the query are sent to the next step of the pipeline. For the Filter processor, metrics that do not match the query are dropped.

The following are metrics filter query examples:

- `NOT system.cpu.user`: This filters for metrics that do not have the field `name:system.cpu.user`.
- `system.cpu.user OR system.cpu.user.total`: This filter query only matches metrics that have either `name:system.cpu.user` or `name:system.cpu.user.total`.
- `tags:(env\:prod OR env\:test)`: This filters for metrics with `env:prod` or `env:test` in `tags`.

Learn more about writing metrics filter queries in [Observability Pipelines Metrics Search Syntax][4002].

[4002]: /observability_pipelines/search_syntax/metrics/
Loading