You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/cse/troubleshoot/troubleshoot-parsers.md
+33-25Lines changed: 33 additions & 25 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
---
2
-
id: cloud-siem-parsers
2
+
id: troubleshoot-parsers
3
3
title: Troubleshoot Parsers
4
4
sidebar_label: Parsers
5
5
description: Learn how to troubleshoot problems with log parsers.
@@ -22,12 +22,11 @@ Parsing issues can manifest in several ways:
22
22
* Parsing failures. All or part of a parser is not handling logs as intended.
23
23
* Incorrect parsing. Specific fields or metadata being parsed incorrectly (wrong key value pairs or event_id metadata)
24
24
25
+
## Forwarding Logs to Cloud SIEM with Parsers
25
26
27
+
### Forwarding Methods
26
28
27
-
Forwarding Logs to Cloud SIEM with Parsers
28
-
29
-
Forwarding Methods
30
-
SIEM Forward + Parser (recommended)
29
+
#### SIEM Forward + Parser (recommended)
31
30
32
31
The recommended method is to set _siemForward = true and _parser = path/to/parser. This can be set several ways:
33
32
At the source
@@ -40,7 +39,7 @@ Sending subsets of logs to Cloud SIEM is useful as not all log data is useful fr
40
39
41
40
Many Cloud-To-Cloud (C2C) sources set the _parser and _siemForward metadata within the parser bypassing the need to manually specify for these sources.
42
41
43
-
Other Methods
42
+
#### Other Methods
44
43
45
44
Other methods depend upon legacy methods which bypass parsers and are generally not recommended. These include:
46
45
@@ -49,7 +48,7 @@ For structured logs, this will use a Sumo Logic Ingest Mapping and has limited o
49
48
For unstructured logs, this will utilize legacy “Grok” parsers which are approaching EOL and are not maintained outside of critical bug fixes.
50
49
Older C2C sources set _siemForward and mapper metadata fields within the C2C.
51
50
52
-
Best Practices
51
+
### Best Practices
53
52
54
53
Always use a parser when possible
55
54
Provides consistent field extraction
@@ -62,28 +61,29 @@ Ensure parser matches the data format
62
61
Use system parsers when available
63
62
Create custom parsers only when necessary
64
63
Following these fundamentals will help prevent common parsing issues and simplify troubleshooting when problems occur.
65
-
Identifying Parser Issues
66
64
67
-
Using the Failed Records Dashboard
65
+
## Identifying Parser Issues
66
+
67
+
### Using the Failed Records Dashboard
68
68
69
69
The Cloud SIEM Enterprise Audit App provides dashboards and queries for greater visibility into Cloud SIEM activity. Troubleshooting parser failures is aided by the Failed Record Analysis dashboard and query found within Enterprise Audit - Cloud SIEM>Record Analysis>Failed Record Analysis (Enterprise Audit - Cloud SIEM app must be installed).
70
70
71
-
Common Failure Types
71
+
#### Common Failure Types
72
72
73
73
Parser Failures: Include parser path and specific parsing error
74
74
Mapper Failures: Usually mention mapper or mapping issues
75
75
Mixed Failures: May indicate parser output doesn't match mapper expectations
76
76
77
77
78
-
Investigating Failed Records
78
+
#### Investigating Failed Records
79
79
80
-
Identify the Pattern
80
+
##### Identify the Pattern
81
81
82
82
Look for commonalities in failed records
83
83
Note specific error messages
84
84
Check if failures are limited to certain sources
85
85
86
-
Analyze Error Messages
86
+
##### Analyze Error Messages
87
87
88
88
Common Errors
89
89
Fatal: /Parsers/System/Vendor/Product Name did not produce an event.
@@ -99,13 +99,13 @@ Indicates an required key value pair is missing from the parsed log and the log
99
99
Fatal:/Parsers/System/Vendor/Product Name- wrapper did not return the wrapped log entry
100
100
A parser utilizing a wrapper transform did not find the log that is supposed to be present causing the parser failure
101
101
102
-
Check for Recent Changes
102
+
##### Check for Recent Changes
103
103
For log sources which were previously parsed successfully:
104
104
Vendors will occasionally make modifications to the log format or field names within the logs which cannot be handled by existing parsers
105
105
Source configuration changes to logging on the appliance, service, or application sending logs may result in parsing issues or failures
106
106
Sumo Logic is continuously making updates to our parser catalog. While these changes undergo regression testing, there can be unforeseen cases not caught in regression testing. Cloud SIEM Content Release Notes will note any modifications to out-of-the-box parsers by date with a brief summary of the changes.
107
107
108
-
Other Considerations
108
+
##### Other Considerations
109
109
Parsing failures can occur when there is no issue with the parser for a variety of reasons:
110
110
The parser was designed for a different version or log format than the ingested logs
111
111
A new parser may be needed to accommodate these logs
@@ -120,15 +120,15 @@ There are niche use cases which can be accounted for by customizing a parser tha
120
120
Verbose and Debug level logging frequently fall into this category
121
121
122
122
123
-
Pivot to Raw Logs and Troubleshoot with the Parser
123
+
##### Pivot to Raw Logs and Troubleshoot with the Parser
124
124
With the error(s) identified, pivot to the raw message(s) for further troubleshooting. Note the specific parser(s) which are failing.
125
125
126
126
Extract metadata_sourcemessageId from the failed record
127
127
Use _messageId (same as metadata_sourcemessageId) in a search to locate the original raw log.
128
128
Copy the raw message(s) and paste into the parser UI
129
129
Use the parser UI to search for _messageID(s) with the appropriate timeframe to bring the logs into the UI to test
130
130
131
-
Troubleshooting Existing Parsers
131
+
### Troubleshooting Existing Parsers
132
132
If you have identified a log message that should be parsed by an existing parser (the format is right, there is a clear security use case etc.) then it helps to understand the structure of the parser first to begin troubleshooting.
133
133
134
134
Some parsers are very simple (most often structured log formats)
@@ -151,8 +151,10 @@ Some logs may be missing a timestamp and _messagetime from the Sumo collector or
151
151
Unstructured logs with many different event types or variations between events
152
152
Each event type must be handled by its own transform and often requires a regular expression to parse.
153
153
These will often use variable transforms and/or transform cascades.
154
-
Example Scenario
155
-
Linux Syslog Parsing Failure
154
+
155
+
#### Example Scenario
156
+
157
+
##### Linux Syslog Parsing Failure
156
158
This is a particularly illustrative example of how a more complex parser processes a log.
157
159
158
160
Example:
@@ -167,21 +169,23 @@ In this parser, the log is first processed for its header to determine how it sh
167
169
168
170
Here we can see the header and process are parsed successfully. Examining the parser we find that there is a VARIABLE TRANSFORM which uses the syslog process to route the logs to another transform.
In this case there is a transform called for `systemd` processes called `parse_systemd` which takes the contents of syslog_message and passes it along to the named transform. Looking further down the parser we can find that specific transform.
This particular transform passes along the contents of what it received from the variable transform and instructs it to pass along the field value stored in _$log_entry (syslog_message) to two additional parse transforms which it then attempts to use in the order shown in the transform cascade until a match is found.
182
186
183
187
184
-
[transform:parse_systemd_format_1]
188
+
transform:parse_systemd_format_1
185
189
```
186
190
#<86>Jan 01 00:00:00 hostname systemd[20460]: pam_unix(systemd-user:session): session opened for user root by (uid=0)
@@ -200,12 +204,14 @@ In these transforms we helpfully have an example log for which the transform is
200
204
Were this a useful log from a security context (it’s not) the failure could be addressed in a few ways, either by modifying one of the existing transform regular expressions (whichever is closer in format) or by creating a new transform as part of the transform cascade being called for the systemd process log. Since the particular log example is a significant departure from the intent of either existing transforms, a new one would be most appropriate. It would only require a modification to the parse_systemd transform cascade and the addition of a third transform with a regular expression to handle the particular log and then set the appropriate event_id.
201
205
202
206
203
-
Escalating Parsing Issues
207
+
### Escalating Parsing Issues
208
+
204
209
Sumo Logic Threat Labs Detection Engineering maintains all Out-Of-The-Box (OoTB) Cloud SIEM Content. Content includes Parsers, Mappers, Rules, and Normalization Schema.
205
210
206
211
Upon identifying an issue with a Cloud SIEM OoTB parser using this guide, it may be necessary to escalate the issue to Threat Labs.
207
212
208
-
Escalation requirements
213
+
#### Escalation requirements
214
+
209
215
A concise description of the problem
210
216
Screenshots are helpful for understanding current and potentially previous behavior if there was a change
211
217
A representative raw log sample
@@ -220,10 +226,12 @@ Configuration Information
220
226
Many data sources will have options for configuring logging.
221
227
It is important to understand what those settings are to develop new global support for a data source or offer advice for a custom solution if a global one is not appropriate.
222
228
223
-
Gathering Raw Samples
229
+
#### Gathering Raw Samples
230
+
224
231
Prior to opening a support request, it is helpful to gather sample raw logs (without Field Extraction Rules overwriting _raw) which represent the identified issue.
225
232
226
-
Ways to gather samples
233
+
##### Ways to gather samples
234
+
227
235
Find Samples
228
236
Search using the identified _messageId(s) of the failing to parse logs
0 commit comments