Create a Processing Rule
This document describes how to create a processing rule.
You can add a processing rule to an existing Source or create one when you configure a new Source.
- Classic UI. In the main Sumo Logic menu, select Manage Data > Collection > Collection.
New UI. In the Sumo Logic top menu select Configuration, and then under Data Collection select Collection. You can also click the Go To... menu at the top of the screen and select Collection. - Click Edit next to a Source. When configuring your new or existing Source, click the + Add Filter or + Add Action text in the Processing Rules section.
- A filter is either an allowlist or denylist rule.
- An action is either a hash or mask rule.
- Once clicked, the configuration options are displayed.
- Give a meaningful Name to your rule. Names can be up to 32 characters long.
- Choose the Type of processing rule you'd like to create:
- Filters have the option to:
- Exclude messages that match. Remove messages that you do not want to send to Sumo Logic at all, think of it as a "denylist" filter. These messages are skipped after reaching the Source and are not uploaded to Sumo Logic.
- Include messages that match. Send only the data you'd like in your Sumo Logic account, think of it as an "allowlist" filter). This type of filter can be very useful when the list of log data you want to send to Sumo Logic is easier to filter than setting up exclude filters for all of the types of messages you'd like to exclude, for example, if you only want to include only messages coming from a firewall.
- Actions have the option to:
- Hash messages that match. Replace a message with a unique, randomly-generated code to protect sensitive or proprietary information. You may want to hash unique identifiers, such as credit card numbers or user names. By hashing this type of data, you can still track it, even though it is fully hidden.
- Mask messages that match. Replace an expression with a mask string that you can customize—another option to protect data, such as passwords, that you'dn't normally track.
- Filters have the option to:
- For Filter, type a regular expression that defines the messages you want to filter. The rule must match the whole message.
For multi-line log messages, to get the lines before and after the line containing your text, wrap the segment with (?s).* such as: (?s).*matching text(?s).*
note
Your regex must be RE2 compliant.
- To remove a filter or action, click the trash can icon.
- When you are finished adding all the rules you need, click Submit.