Skip to content

Latest commit

 

History

History
34 lines (23 loc) · 1.7 KB

expect.md

File metadata and controls

34 lines (23 loc) · 1.7 KB
description
Made for testing: make sure that your records contain the expected key and values

Expect

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.

The following page just describes the configuration properties available, for a detailed explanation of its usage and use cases, please refer the following page:

Configuration Parameters

The plugin supports the following configuration parameters:

Property Description
key_exists Check if a key with a given name exists in the record.
key_not_exists Check if a key does not exist in the record.
key_val_is_null check that the value of the key is NULL.
key_val_is_not_null check that the value of the key is NOT NULL.
key_val_eq check that the value of the key equals the given value in the configuration.
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.
result_key specify a key name of matching result. This key is to be used only when 'action' is 'result_key'.

Getting Started

As mentioned on top, refer to the following page for specific details of usage of this filter: