Skip to content

Commit 0c1712e

Browse files
blank() filter (#226)
Added blank filter based on: https://github.com/syslog-ng/syslog-ng/pull/5425/files
2 parents b59a8a8 + 247f6a5 commit 0c1712e

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
title: blank()
3+
id: adm-log-filters-blank
4+
description: >-
5+
This section describes blank() filter function in {{ site.product.short_name }}.
6+
---
7+
8+
*Synopsis:* blank("MESSAGE")
9+
10+
11+
*Description:* The blank() filter selects messages where the specified key-value pair is considered blank. A value is considered blank if it meets any of the following conditions:
12+
13+
* It is not set
14+
* It is an empty string ("")
15+
* It contains only whitespace characters
16+
* It is an empty list
17+
* It is a boolean value explicitly set to false
18+
19+
## Example: Select log messages where the field MESSAGE is blank
20+
21+
```config
22+
blank("MESSAGE")
23+
```

doc/_admin-guide/080_Log/030_Filters/005_Filter_functions/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,5 @@ described in Filters.
2424
|rate-limit() |Limits messages rate based on arbitrary keys in each message. |
2525
|source()|Select messages of the specified {{ site.product.short_name }} source statement.|
2626
|tags()|Select messages having the specified tag.|
27+
|blank()|Filter messages where the specified value is blank (unset, empty, whitespace-only, empty list, or boolean false).|
28+

0 commit comments

Comments
 (0)