Skip to main content

Processing rules

This page explains how to create a processing rule that drops unwanted events before they are stored, and how to attach it to a data source.

Role needed: a user with the Admin or Super Admin account type. A user with a custom role needs Settings access and, under Collection & Automation, Log Onboarding with Read to see rules, Set to create, change or apply a rule, and Delete to remove one.

What a rule does​

A processing rule is a named set of filters. When an event from a source that uses the rule matches a filter, the event is dropped and is not stored. Dropped events are counted on the Pipeline Stats page; see Check that a source is sending.

Processing rules apply to syslog sources identified by IP address.

The filters are:

SectionFieldEffect
Raw PersistRaw Exclude PatternsDrops an event whose original message matches any pattern.
Raw PersistRaw Include PatternsIf any are set, drops an event whose original message matches none of them.
For IndexingExclude LogsDrops an event whose original message contains any of the listed text values.
For IndexingInclude LogsIf any are set, drops an event whose original message contains none of them.
For IndexingExclude index by regexpDrops an event if any pattern matches anywhere in the stored event.
For IndexingInclude index by regexpIf any are set, drops an event that none of them match.
For IndexingExclude by Key-ValueDrops an event if a field=value entry equals the event's value for that field.
For IndexingInclude by Key-ValueIf any are set, drops an event that matches none of the entries.

The raw filters read the original message, so keep Store raw message on for a source that uses them. Patterns are regular expressions, one per line. A pattern that is not a valid regular expression is ignored. In a key-value entry, the field is a source, destination, host or observer field, for example source.ip=192.0.2.15.

Create a rule​

  1. Select Settings, then Processing Rules under Collection & Automation. The Processing rules page lists the rules with their Raw Exclude Patterns and Raw Include Patterns.

    Processing rules page listing the Default rule with a system badge, the Raw Exclude Patterns and Raw Include Patterns columns, edit and apply icons, and the Add rule button

    The Processing rules page on a new appliance, with only the built-in Default rule.

  2. Select Add rule. The Add processing rule panel opens.

  3. Enter a Rule name.

  4. Enter patterns or values in the fields you need, one per line.

  5. Select Save. The console shows Processing rule saved, and the rule appears in the list.

A rule marked system, such as Default, cannot be deleted, and its name cannot be changed. To change a rule, select the pencil icon (Edit rule) in its row.

Attach a rule to a source​

  • In Log Onboarding, choose the rule in the Processing rule column of the source, or under Processing rule in the source's form.
  • To stop applying a rule to a source, choose (none).

Apply a changed rule​

When you edit a rule, the sources that use it do not pick up the change until you apply it.

  1. Open Processing Rules.
  2. Select the play icon (Apply rule) on the rule.

The console shows Applied to N source(s).

Delete a rule​

Select the trash icon on the rule. Deleting a rule does not change the sources that use it, so set those sources to (none) first.

Next steps​