An equivalent that also removes duplicates is the following:
Every event in Splunk has a timestamp. Using the time range picker or the earliest and latest commands, you can limit searches to specific time periods. Example:
The transaction command is used in Splunk to group events that share common characteristics into transactions, often used to track sessions or user activities that span across multiple events. Example:
A subsearch in Splunk is a search that is nested inside another search. It's used to compute a set of results that are then used in the outer search. Example:
This query can help to highlight unusual or rare processes, which may be worth investigating for potential malicious activity.
How To Identify The Available Data
We classify these data sources into source types that dictate how Splunk formats the incoming data. To identify the available source types, we can run the following SPL command.
This query uses eventcount to count events in all indexes, then summarize=false is used to display counts for each index separately, and finally, the table command is used to present the data in tabular form.
To list all sourcetypes in our Splunk environment, along with additional metadata such as the first time a source type was seen (firstTime), the last time it was seen (lastTime), and the number of hosts (totalCount).
For a simpler view, we can use the following search:
This command returns a list of all data sources in the Splunk environment:
Let's say we are interested in a sourcetype named WinEventLog:Security, we can use the table command to present the raw data as follows.