Splunk Practice Exercise 12: Configuring Extracted Fields
Introduction
This practice exercise focuses on configuring extracted fields in Splunk.
Step 1: Access Splunk Web
-
Open your web browser and navigate to Splunk Web:
http://<your server ip>:8000
-
Log in using your credentials.
Step 2: Navigate to Settings
- In the Splunk Web interface, go to the Settings menu.
Step 3: Configure Extracted Fields
-
Under Settings, select Fields.
-
Click on Field Extractions.
-
Click on New Field Extraction.
-
Fill in the required information:
-
Destination App: Select the appropriate app.
-
Name: Enter a unique name for the extraction, e.g.,
NewAcctID
. -
Apply to: Choose the appropriate scope
sourcetype
. -
Named: Choose the sourcetype
vendor_sales
. -
Type: Select
Inline
. -
Extraction/Transform: Provide the regular expression or transformation
AcctID=(?<NewAcctID>\d+)
-
Click Save to create the extracted field.
Step 4: Apply Extracted Field to Search
-
Go back to the Search & Reporting app.
-
Use the extracted field in your search queries. For example:
sourcetype=vendor_sales | head 5
-
This should have a newly extracted field named "NewAcctID" which came from the regex
AcctID=(?<NewAcctID>\d+)
fromsourcetype=vendor_sales
with which we did earlier. -
We did a fairly simple RegEx by extracting an existing field and you can use a custom RegEx for your own use case.
Conclusion
Congratulations! You have successfully completed the practice exercise, configuring an extracted field in Splunk. Extracted fields allow you to derive valuable information from your raw event data, making it easier to analyze and visualize. Continue to explore and experiment with different extraction methods and configurations to enhance your Splunk skills.