Splunk Notes
SPL - Search Processing Language
What I explored:
- splunk web
- Configure the Search Assistant
Structure of SPL Query
. Key Value Pairs
. Literal Strings
. Commands
. Functions
. Logical Operators
. Comparison Operators
. Clauses
. Pipe
index=main #key value pair
sourcetype=access_combined_wcookie #key value pair
status!=200 #comparison operators
timechart span=6h count by categoryId #command #funtion #clause #field
| stats count by sourcetype # to know the different sourcetype
in the practice data of splunk:
access_combined_wcookie
csv
**vendor_sales/vendor_sales
www1/secure
Creating statististics
-
Stats command
-
Eval command
-
Timechart command
-
Transforming commands: The family of commands that convert search results into data tables
-
Stats, chart, timechart, top, rare
Stats command
- Create statistics
- Has mathematical functions
!firefox_JT536O4XMy.png
stats command with eval
| stats count(eval(status = 500)) as "Server Errors"
fieldsummary
eventstat
Fields and Field instruction
- Field instruction
- Field Extraction Wizard
- Using rex command
Fields
- Searchable Key-value pairs
- Essential for tailoring searches
- Can be created during search time or index time
- Splunk automatically index fields
!firefox_MCpOhJmiSG.png