To most effectively search in the contents of the audit trails, make sure that the following prerequisites are met:
-
Indexing was enabled in the connection policy related to the audit trail during the session, and
-
the audit trail has already been indexed.
You can use the following in content search:
-
wildcards
-
boolean expressions
-
search in the commands of terminal connections (for example, command:"sudo su")
-
search in the window titles of graphical connections (for example, title:settings)
The following sections provide examples for different search queries.
-
For examples of exact matches, see Searching for exact matches.
-
For examples of using boolean operators to combine search keywords, see Combining search keywords.
-
For examples of wildcard searches, see Using wildcard searches.
-
For examples of searching with special characters, see Searching for special characters.
-
For examples of fuzzy search that finds words with similar spelling, see Searching for fuzzy matches.
-
For examples of proximity search to find words that appear within a special distance, see Proximity search.
-
For examples of adjusting the relevance of a search term, see Adjusting the relevance of search terms.
For details on how to use more complex keyphrases that are not covered in this guide, see the Apache Lucene documentation.
Searching for exact matches
By default, One Identity Safeguard for Privileged Sessions (SPS) searches for keywords as whole words and returns only exact matches. Note that if your search keywords include special characters, you must escape them with a backslash (\) character. For details on special characters, see Searching for special characters. The following characters are special characters: + - & | ! ( ) { } [ ] ^ " ~ * ? : \ /
Example: Searching for exact matches
Search expression | example |
Matches | example |
Does not match |
examples example.com query-by-example exam |
To search for an exact phrase, enclose the search keywords in double quotes.
Search expression | "example command" |
Matches | example command |
Does not match |
example command example: command |
To search for a string that includes a backslash characters, for example, a Windows path, use two backslashes (\\).
Search expression | C\:\\Windows |
Matches |
C:\Windows |
Combining search keywords
You can use boolean operators – AND, OR, NOT, and + (required), – to combine search keywords. More complex search expressions can also be constructed with parentheses. If you enter multiple keywords,
Example: Combining keywords in search
Search expression | keyword1 AND keyword2 |
Matches | (returns hits that contain both keywords) |
Search expression | keyword1 OR keyword2 |
Matches | (returns hits that contain at least one of the keywords) |
Search expression | "keyword1 keyword2" NOT "keyword2 keyword3" |
Matches | (returns hits that contain the first phrase, but not the second) |
Search expression | +keyword1 keyword2 |
Matches | (returns hits that contain keyword1, and may contain keyword2) |
To search for expressions that can be interpreted as boolean operators (for example: AND), use the following format: "AND".
Example: Using parentheses in search
Use parentheses to create more complex search expressions:
Search expression | (keyword1 OR keyword2) AND keyword3 |
Matches | (returns hits that contain either keyword1 and keyword3, or keyword2 and keyword3) |
Using wildcard searches
You can use the ? and * wildcards in your search expressions.
Example: Using wildcard ? in search
The ? (question mark) wildcard means exactly one arbitrary character. Note that it does not work for finding non-UTF-8 or multibyte characters. If you want to search for these characters, the expression ?? might work, or you can use the * wildcard instead.
You cannot use a * or ? symbol as the first character of a search.
Search expression | example? |
Matches |
example1 examples example? |
Does not match |
example.com example12 query-by-example |
Search expression | example?? |
Matches |
example12 |
Does not match |
example.com example1 query-by-example |
Example: Using wildcard * in search
The * wildcard means 0 or more arbitrary characters. It finds non-UTF-8 and multibyte characters as well.
Search expression | example* |
Matches |
example examples example.com |
Does not match |
query-by-example example* |
Example: Using combined wildcards in search
Wildcard characters can be combined.
Search expression | ex?mple* |
Matches |
example1 examples example.com exemple.com example12 |
Does not match |
exmples query-by-example |
Searching for special characters
To search for the special characters, for example, question mark (?), asterisk (*), backslash (\) or whitespace ( ) characters, you must prefix these characters with a backslash (\). Any character after a backslash is handled as character to be searched for. The following characters are special characters: + - & | ! ( ) { } [ ] ^ " ~ * ? : \ /
Example: Searching for special characters
To search for a special character, use a backslash (\).
Search expression | example\? |
Matches |
example? |
Does not match |
examples example1 |
To search for a string that includes a backslash characters, for example, a Windows path, use two backslashes (\\).
Search expression | C\:\\Windows |
Matches |
C:\Windows |
To search for a string that includes a slash character, for example, a UNIX path, you must escape the every slash with a backslash (\/).
Search expression | \/var\/log\/messages |
Matches |
/var/log/messages |
Search expression | \(1\+1\)\:2 |
Matches |
(1+1):2 |
Searching in commands and window titles
For terminal connections, use the command: prefix to search only in the commands (excluding screen content). For graphical connections, use the title: prefix to search only in the window titles (excluding screen content). To exclude search results that are commands or window titles, use the following format: keyword AND NOT title:[* TO *].
You can also combine these search filters with other expressions and wildcards, for example, title:properties AND gateway.
Example: Searching in commands and window titles
Search expression | command:"sudo su" |
Matches |
sudo su as a terminal command |
Does not match | sudo su in general screen content |
Search expression | title:settings |
Matches |
settings appearing in the title of an active window |
Does not match | settings in general screen content |
To find an expression in the screen content and exclude search results from the commands or window titles, see the following example.
Search expression | properties AND NOT title:[* TO *] |
Matches |
properties appearing in the screen content, but not as a window title. |
Does not match | properties in window titles. |
You can also combine these search filters with other expressions and wildcards.
Search expression | title:properties AND gateway |
Matches |
A screen where properties appears in the window title, and gateway in the screen content (or as part of the window title). |
Does not match |
Screens where both properties and gateway appear, but properties is not in the window title. |
Searching for fuzzy matches
Fuzzy search uses the tilde ~ symbol at the end of a single keyword to find hits that contain words with similar spelling to the keyword.
Example: Searching for fuzzy matches
Search expression | roam~ |
Matches |
roams foam |
Proximity search
Proximity search uses the tilde ~ symbol at the end of a phrase to find keywords from the phrase that are within the specified distance from each other.
Example: Proximity search
Search expression | "keyword1 keyword2"~10 |
Matches | (returns hits that contain keyword1 and keyword2 within 10 words from each other) |
Adjusting the relevance of search terms
By default, every keyword or phrase of a search expression is treated as equal. Use the caret ^ symbol to make a keyword or expression more important than the others.
Example: Adjusting the relevance of search terms
Search expression | keyword1^4 keyword2 |
Matches | (returns hits that contain keyword1 and keyword2, but keyword1 is 4-times more relevant) |
Search expression | "keyword1 keyword2"^5 "keyword3 keyword4" |
Matches | (returns hits that contain keyword1 keyword2 and keyword3 keyword4, but keyword1 keyword2 is 5-times more relevant) |