Splunk introduction - notes!
Splunk is considered Google like search engine for the logs. Correlation of data is one of the key features considered to use Splunk.
Flexible data pipeline - any type of data can be roped into the platform, extract, and format it and make it searchable
Quick search, time normalization and powerful query language makes it stand top across competitors
ADHOC Search- considered in general inefficient on comparison with other types of searches.
As u are trying to find the problem- may-may not find it after the search - if many people do at the same time, efficiency may be impacted. It is done to make a feel for the data, to pin down the issue we are looking for! the discovery of issues which are already known and few which the user sees for the first time as well.
Scheduled Search-you know the problem- search in time intervals and make it efficient. During this time, we must make sure- the impact on the system is high| real time Search- real time search as it happens - heavy impact on environment- do not perform any real time without approval.
Licensing model - earlier- charge on amount of data bringing in- usually- filter the data - so correlating gets impacted-
Workload pricing model- computation charges- based on the compute on platform the charge is made and not for the data loaded-in. more computation, the licensing will be decided.
- Major features of Splunk enterprise.
- index - bucket of data -> as data enters its inspected and match to a source type and make it as a single event - timestamped and stored in the Splunk indexes so it can be searched. a particular level of access ex: network logs to a index, application logs to another index etc.
- index can be considered for the data retention ex: 30 days, 60 days
- by searching in the Splunk- diff source type can be searched
- Search - monitor- alert
- one can create alerts and monitor specific conditions
- allows you to collect reports in visualization and dashboard
Web Interface
- Apps - sit on top of Splunk instance, can also be called as workspace
- Roles- decide what the user can see, do or interact with
- Administrator: role is the powerful role in the list of roles; - install app- ingest data- create knowledge objects for all users
- Power User: create and share knowledge objects for users of an app and do real time searches. - this is in general people get to create alert and dashboards.
- User role - can see only their own knowledge objects and those shared with them.
Once logging in Splunk enterprise, it has 2 apps by default- and there are so many apps which can be picked from the Splunk base!
- Home app - manage other apps- gives quick space to - create custom dashboard as a default
Admin can also add apps from home app - Search & Reporting app: provides a default interphase for searching and analyzing the data and has 8 components
- Splunk bar-> edit->view messages->monitor the progress of search jobs
- App bar
- Search bar- used to run searches
- time range picker - events for specific time ex: 60 min, 1 day, 4 day - - do not perform long time search
- histogram - the events occurring in the specific period is not here.
- how to search panel
- Data Summary button
- host (IP address, domain name)
- source(path/filename)
- source type (classification of data)
- Table view-
- Search history- old search history can be searched with the filter option, can be re-run again across specific timeline on how many runs have been made.
- rolling over events- makes it highlighted- can add that to search
- failed password to the search - can remove the data from search by clicking on the highlight
- drop down for event actions.
- The vents can be extracted by clicking on the arrow in the recent. The data is in the key value pair, one point t
- The admin team will have to do the field extractions, only the key value pairs are extracted and made int he proper format. Field extractions to be done, manual extractions base done expressions limit the filtering on the later part of the search- so as a best practice do as must as search and filter in the base search as possible
- Key word search example "error" keyword is given to Splunk- it searches across all events for the keyword
- text from the pdf when updated may not format as expected. for format- properly - control | is used to format the results.
- Table commands- the field mentioned will allow you to see the results in the format of a table
- fields command- to remove fileds or order fields in a particular way
- top- finds the most common values of the given field and % distribution and count
- top is easy to make the visualization- in the results just cluck o visualization from the data searched.
- rare - opposite to top
- Stats - enables users to calculate the statistics
- Sum -
- As -
- Group by - count by
- eval - used to create an extra column with a default value or a formula evaluation of the values. ex: eval abdc=if(x<'5000, 8000, abdc)
- Time chart- takes results and formulate in the time selected in the time picker.
- span - can be used in time chart command to chunk the time intervals- for trends etc.
- Stats -
- Base search - the search before the pipe, mostly index, source, source type, host.
- transforming search - everything after the pipe | symbol written after the base search
Search Processing language
- wild card- * ex: fail* leads to search of failed or failure or fails - used after the string is more efficient than at front.
- AND NOT OR -
- ex: failed password is like failed AND password
- ex: failed OR password displays all combinations
- Order is NOT OR AND
- parenthesis is used to control the order of evaluation
- "Failed password " in general used with quotes to search
Features and terms used on Splunk on day 2-day use!
- Shared Search jobs
- Export Results- raw- csv, xml, Json
- Search mode- fast (no field discovery)
- verbose- discovering all data as can
- default mode- -
- Timeline- visual rep of segments on the time- on clicking the timeline- we ca see the event generates on that time.
What is an event? - time index- based on time zone in user account bottom row has the selected fields, rolling
Other factors used can be noted below:
Add to Search
icon- to open in new browse window
Clicking on highlighted text can add or remove to search
event actions
field actions
Search Processing language
Wild cards - *
search terms are not case sensitive
AND OR NOT can be used for multiple familiar words like US or CA
Order Role evaluation
not or and (Preference)
"
\"
What are commands, functions, clauses, arguments in search terms?
how we want to search- a site's foundation of search queries.
Commands -what we need to do with the searches results- create charts, computing statistics and formatting
Functions - explains how we want to compute and evaluate the result
Arguments - variables we need to apply for the functions
Clauses - how we want results (group or defined)
Below terms can be used in the search
Index
host
Source type
Stats
Count
visits
search Visits >1
There are certain admin consoles not all the users may have access to.