Splunk 101
Splunk 101
Beginner Friendly
By Yuki Ang
18/8/2023
Agenda
• Introducing Splunk
• Splunk Apps & Add Ons • Becoming a Splunker #3: Basic Searches
• Splunk Licenses
Introducing
Splunk
The Notorious B.I.G. D.A.T.A.
IT
Operations
Security,
Compliance
The & Fraud
Data-to-Everything
Platform Payment &
Core
Banking
Application
Performance
Computers Internet
ACT
Network Devices
Databases Devices
Virtual
Middleware Machines
Clouds
Any Structure XML
Any Source
Logs JSON CSV
ANALYZE INVESTIGATE
REST APIs
Any Time Scale
Metrics Directory
Any Volume HTTP
Files
Events Alerts
Other APM
Scripts
MONITOR Platforms
POV: Splunk as Make Up for Data
Apply Magic to Data in the way you want
2. Splunk Cloud
• Cloud-based Splunk Enterprise as a service where infrastructure is hosted
and administered by Splunk Support
Splunk Components Overview
Search Tier & User Access Indexing & Data Storage Data Collection Tier Management Tier
Monitoring Console
Cluster Manager
Deployer
As compared to Dynatrace Managed
User Access and Data Storage Data Collection Tier Management Tier
ActiveGate CMC
DT Cluster
OneAgent DMC
Splunk Components
Splunk Core
License Deployment
Search Head Indexer Manager Server
Note
• Configuration is required to define what data to be
sent (inputs) and where to send the data (indexer)
• TCP9997 is required for Splunk data forwarding
Splunk Components
Deployer, Cluster Manager, Monitoring Console
Deployer Cluster Manager Monitoring Console
o Distribute apps and o Distribute apps and o Splunk Enterprise
configuration updates configuration updates monitoring tool to provide
(configuration bundle) to (configuration bundle) to health insights for the
search head cluster indexer cluster. deployed Splunk instances
members.
Note
• Deployer and Cluster Manager are only applicable for
cluster deployment
Splunk Enterprise Architecture #1
Single Instance (Standalone)
License
Search Manager +
Indexer Forwarders
Head Deployment
Server
+ Monitoring console
All Splunk core components in one single Splunk Instance to serve all roles
Splunk Enterprise Architecture #2
Distributed with Single Indexer
License
Search Manager +
Head Deployment
Server
+ Monitoring console
Indexer Forwarders
Splunk core components’ roles are distributed across different Splunk instances
Splunk Enterprise Architecture #3
Distributed with Indexer Cluster
License
Search Manager +
Head Deployment
Server
+ Monitoring console
Cluster
Indexer Indexer Indexer Forwarders
Manager
With Load Balancing
Splunk core components’ roles are distributed across different Splunk instances. Indexer are clustered (minimum of 3,
due to replication factor) and managed by Cluster Manager.
Splunk Enterprise Architecture #4
Clusters DNS-Based Load Balancing
Search Head Cluster: Search Captain + Search Peers
License
With Load Balancing Search Search Search Manager +
Head Head Head Deployment
Server
+ Monitoring console
Forwarders
Indexer Cluster: Master Node + Peer Nodes
Cluster
Indexer Indexer Indexer Manager +
Deployer
Splunk core clusters for bigger enterprise to build a high availability, high scalability and disaster recovery solution.
Key Factors in deciding Architecture Type
Apps Add-ons
*with User Interface *not require User Interface
Extending Splunk Capabilities by Collection of configuration files to aid
providing: in:
• More use cases • Data ingestion
• Tailor-made Splunk Dashboards to • Data normalization
use case • Filtering and Parsing of Data
• Pre-configured saved searches, • Data Enrichment
reports and lookups
• Additional Visualizations
• Included relevant Add-on for data
source
1000+ apps available on Splunkbase or you can build your own: Read up Develop Splunk apps
Common Splunk Apps & Add-ons
Available at Splunkbase
Security Observability
To detect and report One glance Reporting database One glance view on
on missing transaction application health utilization and provide all network devices
during transaction dashboard, forecast utilization alerts
pipeline processing consolidated data
sources from various
monitoring tools
Enterprise
Use Cases
Production Dashboard Screenshots
Transaction Monitoring
Foodpanda: TV Dashboard and Drilldown
Banking App: Platform Monitoring
CIMB Clicks: Performance data from Nagios, Entuity, Dynatrace and eG
Database Capacity Reporting with Forecasting
Selected Critical Application: RTB
Database Capacity Reporting with Forecasting (cont’)
Selected Critical Application: RTB
Network Alert Monitoring
Putting Alerts from BMC Entuity together
Becoming a
Splunker #1
Setting up Splunk
Plan and Install Splunk Enterprise
Prerequisites
1. Determine the deployment requirement
2. Provisioning of Splunk instances
3. Network and firewall requirement
4. Download or transfer relevant Splunk Enterprise installer packages (take note on version compatibility)
Implementation
1. Installation:
• *NIX–uncompress .tar.gz installer in the Splunk path (installation usually at /opt/splunk)
• Windows – run the .msi installer (installation usually at C:\Program Files\Splunk)
2. After installation:
• *NIX – start Splunk service manually (note: enable boot-start)
• Windows – Splunk service starts automatically Tips: Start,Stop or Restart Splunk services:
3. Indexing
Aggregate the data through pipelines and finally writes the
data to the indexer disk
Data Input 1) Monitoring Files and Directories
3) Scripts
3. Input Setting
• Choose the app to save your input configuration (save in Search &
Reporting app if nothing specific)
• (Optional) Enter hostname for metadata tagging
• Select index to store the data (create new index first beforehand)
Metadata &
Selected field
Metadata
Extracted
Fields
Becoming a
Splunker #3
Basic Searches
with Splunk Search & Reporting app
• Default App that is shipped together with Splunk
Search App Enterprise
matching result
Index Index is a repository for Splunk data.
• _internal: contains your Splunk instance logs,
useful for troubleshooting
• custom index: create and name index with
meaningful names to distinguish data
index =
“index name”
Other Fields Fields are searchable key/value pair in event data.
<Field name>
= “value” Events with
matched field value
1) AND
Using
Operator Example: status=404 AND status=500
Return no event as searching same field but different values
because logically one result could not have two status code
2) OR
AND vs OR
Example: status=404 OR status=500
Return events that has status is 404 or status is 500
2) NOT
Commands
What to do with the results? – create table, charts, evaluate or format
Functions
How do you want to compute the result? – in statistics, sum, average, max
Arguments
What are the variables to apply the function? – field name for the average, do round up
Clauses
How do you want to display the result? – Rename fields, group fields
Splunk
Knowledge
Objects
• Dashboards are views that are made up of
Dashboards dashboard panels
• Types:
‒ Classic: xml format
‒ Dashboard studio: json format
• Predefined roles:
‒ admin
‒ power
‒ can_delete
‒ user
Pros Cons
Monitor of Monitors Time consuming in Implementation
Able to ingest enormous amount of data Difficult administration and maintenance: most
Wide range of use cases are configuration files based
Efficient data enrichment Not 100% automatic discovery: No plug and play
Powerful Search Engine and Language feature
Noise reduction Steep learning curve: not intuitive to first-timer
Many supported Splunk Apps Expensive Certifications
Freedom in customization
Scalability
Splunk Resources
1. Splunk Official
2. Splunk Documentation