Skip to content

Latest commit

 

History

History
141 lines (83 loc) · 3.14 KB

README.md

File metadata and controls

141 lines (83 loc) · 3.14 KB

Keep fields plugin

Mask plugin matches event with regular expression and substitutions successfully matched symbols via asterix symbol. You could set regular expressions and submatch groups.

Example:

pipelines:
  example_pipeline:
    ...
    actions:
    - type: mask
      metric_subsystem_name: "some_name"
      ignore_fields:
      - trace_id
      masks:
      - re: "\b(\d{1,4})\D?(\d{1,4})\D?(\d{1,4})\D?(\d{1,4})\b"
        groups: [1,2,3]
    ...

Config params

masks []Mask

List of masks.


skip_mismatched bool default=false

Experimental feature for best performance. Skips events with mismatched masks.


mask_applied_field string

If any mask has been applied then mask_applied_field will be set to mask_applied_value in the event.


mask_applied_value string


ignore_fields []cfg.FieldSelector

List of the ignored event fields. If name of some field contained in this list then all nested fields will be ignored (even if they are not listed).


process_fields []cfg.FieldSelector

List of the processed event fields. If name of some field contained in this list then all nested fields will be processed (even if they are not listed). If ignored fields list is empty and processed fields list is empty we consider this as empty ignored fields list (all fields will be processed). It is wrong to set non-empty ignored fields list and non-empty processed fields list at the same time.


applied_metric_name string default=mask_applied_total

The metric name of the regular expressions applied.


applied_metric_labels []string

Lists the event fields to add to the metric. Blank list means no labels. Important note: labels metrics are not currently being cleared.


match_rules matchrule.RuleSets

List of matching rules to filter out events before checking regular expression for masking.


re string

Regular expression for masking.


groups []int

Groups are numbers of masking groups in expression, zero for mask all expression.


max_count int

MaxCount limits the number of masked symbols in the masked output, if zero, no limit is set.


replace_word string

ReplaceWord, if set, is used instead of asterisks for masking patterns that are of the same length or longer.


cut_values bool

CutValues, if set, masking parts will be cut instead of being replaced with ReplaceWord or asterisks.


applied_field string

If the mask has been applied then applied_field will be set to applied_value in the event.


applied_value string

Value to be set in applied_field.


metric_name string

The metric name of the regular expressions applied. The metric name for a mask cannot be the same as metric name for plugin.


metric_labels []string

Lists the event fields to add to the metric. Blank list means no labels. Important note: labels metrics are not currently being cleared.



Generated using insane-doc