CEF
Synopsis
Parses Common Event Format (CEF) messages from a field into structured objects.
See Appendix
Schema
cef:
- field: <ident>
- target_field: <ident>
- description: <text>
- if: <script>
- ignore_failure: <boolean>
- ignore_missing: <boolean>
- on_failure: <processor[]>
- on_success: <processor[]>
- tag: <string>
Configuration
| Field | Required | Default | Description |
|---|---|---|---|
field | Y | - | Field containing the CEF message to parse |
target_field | N | cef | Field to store the parsed CEF object |
description | N | - | Explanatory note |
if | N | - | Condition to run |
ignore_failure | N | false | Continue processing if parsing fails |
ignore_missing | N | false | Skip processing if source field doesn't exist |
on_failure | N | - | See Handling Failures |
on_success | N | - | See Handling Success |
tag | N | - | Identifier |
Details
CEF is a standardized logging format commonly used by security devices and applications to communicate events.
The processor extracts both CEF header fields and extension fields. The header contains standardized fields like vendor, product, version, etc., while extensions contain key-value pairs with additional event details.
Type conversion is handled automatically for numeric values in extension fields, e.g. port numbers, counts, etc.
CEF header fields that the processor extracts:
cefVersion | CEF version, e.g. 0 |
deviceVendor | Event creator, e.g. Cisco |
deviceProduct | Event generator, e.g. ASA |
deviceVersion | Product version, e.g. 9.1 |
deviceEventClassId | Event type identifier, e.g. 106100 |
name | Human-readable identifier, e.g. access-list |
severity | Integer indicating severity, e.g. 5 |
The message must begin with "CEF:" and contain all seven header fields separated by pipe (|) characters. Messages not following this format will cause parsing to fail.
Examples
Basic Parsing
Parsing a basic CEF message... | |
extracts the header and the extension fields: | |
Security Devices
Parsing a Cisco ASA firewall log... | |
structures the firewall event data: | |
Error Handling
Handling invalid CEF messages... | |
adds an error tag when the parsing fails: | |