Examples of log search expressions
These examples illustrate how you can modify your search expression syntax to refine your search:
|
Search expression |
Anticipated search result |
Match |
Description |
|---|---|---|---|
|
|
Authorization failed with error code: 400 |
Yes |
There is an exact match for the search string in the log line. |
|
|
Aborted operation returned error code: 4009217 |
Yes |
Although extra characters follow the search term, there is an exact substring match. |
|
|
HTTP request failure error code: 400 |
No |
The character following the colon is a tab character ( |
|
|
HTTP request failure error code: 400 |
No |
There are two spaces, instead of a single space, following the colon in the raw log line, so there is not an exact match to the search expression. |
|
|
Device code error: 400 |
No |
All words are present in the log line, but the order of the words do not match the search expression. |
|
|
ERROR:: failed login for user: jsmith |
Yes |
The search expression matches logs that contain |
|
|
ERROR:: failed login for user: jsmith |
Yes |
The first search term and only one of the OR terms appear in the search results.
Note:
The word |
|
|
Permission denied to jsmith attempting deletion of object 0x943150897 |
Yes |
The first search term and one of the OR terms appear in the search results. |
|
|
Login denied: user 'ajsmith' failed verification question |
Yes |
All the search terms appear in the log line. |
|
|
HTTP (404) POST /widgets/missing |
No |
The syntax is invalid because the parentheses function as operators in this search expression. This syntax returns an error similar to
Tip:
Add backslash characters to render the parentheses in this search expression as normal characters in the search string. |
|
|
HTTP (404) POST /widgets/missing |
Yes |
The search string appears in the log line. |
|
|
ERROR:: "failed login" |
Yes |
The search expression only matches logs that contain the exact terms, including whitespace and quotes. |