|
1 | 1 | ---
|
2 |
| -description: >- |
3 |
| - Made for testing: make sure that your records contain the expected key and |
4 |
| - values |
| 2 | +description: Testing records to ensure they contain an expected key and values |
5 | 3 | ---
|
6 | 4 |
|
7 | 5 | # Expect
|
8 | 6 |
|
9 |
| -The _expect_ filter plugin allows you to validate that records match certain criteria in their structure, like validating that a key exists or it has a specific value. |
| 7 | +The _expect_ filter plugin lets you validate that records match certain criteria in their structure, like validating that a key exists or it has a specific value. |
10 | 8 |
|
11 |
| -The following page just describes the configuration properties available, for a detailed explanation of its usage and use cases, please refer the following page: |
| 9 | +For a detailed explanation of its usage and use cases, see [Validating and your Data and Structure](../../local-testing/validating-your-data-and-structure.md). |
12 | 10 |
|
13 |
| -* [Validating and your Data and Structure](../../local-testing/validating-your-data-and-structure.md) |
14 |
| - |
15 |
| -## Configuration Parameters |
| 11 | +## Configuration parameters |
16 | 12 |
|
17 | 13 | The plugin supports the following configuration parameters:
|
18 | 14 |
|
19 | 15 | | Property | Description |
|
20 | 16 | | :--- | :--- |
|
21 |
| -| key\_exists | Check if a key with a given name exists in the record. | |
22 |
| -| key\_not\_exists | Check if a key does not exist in the record. | |
23 |
| -| key\_val\_is\_null | check that the value of the key is NULL. | |
24 |
| -| key\_val\_is\_not\_null | check that the value of the key is NOT NULL. | |
25 |
| -| key\_val\_eq | check that the value of the key equals the given value in the configuration. | |
26 |
| -| action | action to take when a rule does not match. The available options are `warn` , `exit` or "result_key". On `warn`, a warning message is sent to the logging layer when a mismatch of the rules above is found; using `exit` makes Fluent Bit abort with status code `255`; `result_key` is to add a matching result to each record. | |
27 |
| -| result\_key | specify a key name of matching result. This key is to be used only when 'action' is 'result_key'.| |
28 |
| - |
29 |
| -## Getting Started |
30 |
| - |
31 |
| -As mentioned on top, refer to the following page for specific details of usage of this filter: |
32 |
| - |
33 |
| -* [Validating and your Data and Structure](../../local-testing/validating-your-data-and-structure.md) |
34 |
| - |
| 17 | +| `key_exists` | Check if a key with a given name exists in the record. | |
| 18 | +| `key_not_exists` | Check if a key doesn't exist in the record. | |
| 19 | +| `key_val_is_null` | Check that the value of the key is `NULL`. | |
| 20 | +| `key_val_is_not_null` | Check that the value of the key is `NOT NULL`. | |
| 21 | +| `key_val_eq` | Check that the value of the key equals the given value in the configuration. | |
| 22 | +| `action` | Action to take when a rule doesn't match. Available options are `warn` , `exit` or `result_key`. On `warn`, a warning message is sent to the logging layer when a mismatch of the `key*` rules is found. Using `exit` makes Fluent Bit exit with status code `255`. `result_key` adds a matching result to each record. | |
| 23 | +| `result_key` | Specify a key name for the matching result added when `action` is set to `result_key`. | |
0 commit comments