# Filter Severity

### Description

The Severity Filter processor can be used to filter out logs that do not meet a given severity threshold.

### Supported Types

| Metrics | Logs | Traces |
| ------- | ---- | ------ |
|         | ✓    |        |

### Configuration Table

<table><thead><tr><th width="100.56640625">Parameter</th><th width="100.71875">Type</th><th width="96.41796875">Default</th><th>Description</th></tr></thead><tbody><tr><td>severity</td><td><code>enum</code></td><td><code>TRACE</code></td><td>Minimum severity to match. Log entries with lower severities will be filtered.</td></tr><tr><td>condition</td><td><code>string</code></td><td><code>true</code></td><td>An <a href="https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/v0.109.0/pkg/ottl#readme">OTTL</a> expression used to match which log records to sample from. All paths in the <a href="https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/v0.109.0/pkg/ottl/contexts/ottllog/README.md">log context</a> are available to reference. All <a href="https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/v0.109.0/pkg/ottl/ottlfuncs/README.md#converters">converters</a> are available to use.</td></tr></tbody></table>

Valid severity levels:

* TRACE
* INFO
* WARN
* ERROR
* FATAL

### Example Configuration

Filter out INFO and TRACE logs where Attribute `ID` is less than 3.

**Web Interface**

<figure><img src="https://1405008107-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgmiOMzBfoNFwmKJFHMcJ%2Fuploads%2Fgit-blob-924296da2538677ce0e61f9b9c875e6a193efd39%2Fintegrations-processors-filter-severity-image-1.png?alt=media" alt="Bindplane docs - Filter Severity - image 1"><figcaption></figcaption></figure>

**Standalone Processor**

```yaml
apiVersion: bindplane.observiq.com/v1
kind: Processor
metadata:
  id: severity-filter
  name: severity-filter
spec:
  type: filter_severity
  parameters:
    - name: severity
      value: WARN
    - name: condition
      value:
        ottl: (attributes["ID"] < 3)
        ui:
          operator: ''
          statements:
            - key: ID
              match: attributes
              operator: <
              value: '3'
```

**Configuration with Embedded Processor**

```yaml
apiVersion: bindplane.observiq.com/v1
kind: Configuration
metadata:
  id: severity-filter
  name: severity-filter
  labels:
    platform: linux
spec:
  sources:
    - type: journald
      parameters:
        - name: units
          value: []
        - name: directory
          value: ''
        - name: priority
          value: info
        - name: start_at
          value: end
      processors:
        - type: filter_severity
          parameters:
            - name: severity
              value: WARN
            - name: condition
              value:
                ottl: (attributes["ID"] < 3)
                ui:
                  operator: ''
                  statements:
                    - key: ID
                      match: attributes
                      operator: <
                      value: '3'
  selector:
    matchLabels:
      configuration: severity-filter
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.bindplane.com/integrations/processors/filter-severity.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
