Splunk Q&A

[vc_row][vc_column css_animation=”fadeInLeft”][vc_column_text css=”.vc_custom_1562227495590{background-color: #1e73be !important;}”]

Splunk Interview Questions & Answers

[/vc_column_text][/vc_column][/vc_row][vc_row][vc_column css_animation=”fadeInLeft” width=”1/2″][vc_tta_accordion color=”peacoc” active_section=”1″][vc_tta_section title=”Compare Splunk & Spark?” tab_id=”1562227542050-ed4bf5fb-f0ae”][vc_column_text]

Criteria Splunk Spark
Deployment area Collecting large amounts of machine generated data Iterative applications & in-memory processing
Nature of tool Proprietary Open Source
Working mode Streaming mode  Both streaming and batch mode

[/vc_column_text][/vc_tta_section][vc_tta_section title=”What is Splunk?” tab_id=”1562227542062-ae162d92-e31d”][vc_column_text]Splunk is Google for your machine data.It’s a software/Engine which can be used for searching,visualizing,Monitoring,reporting etc of your enterprise data. Splunk takes valuable machine data and turns it into powerful operational intelligence by providing real? time insight to your data through charts,alerts,reports etc[/vc_column_text][/vc_tta_section][vc_tta_section title=”What are common port numbers used by Splunk?” tab_id=”1562227550928-6ad298f7-f031″][vc_column_text]Below are common port numbers used by splunk,however you can change them if required

Service Port number Used
Splunk Web Port:  8000
 Splunk Management Port:  8089
 Splunk Indexing Port:  9997
 Splunk Index Replication Port   8080
 Splunk network port 514 (Used to get data in from netwok port i.e. UDP data)
KV store 8191

[/vc_column_text][/vc_tta_section][vc_tta_section title=”What are components of splunk/splunk architecture?” tab_id=”1562227551528-aa6ec2e6-7f3f”][vc_column_text]Below are components of splunk:

1)  Search head  – provides GUI for searching

2) Indexer – indexes machine data

3) Forwarder -Forwards logs to Indexer

4) Deployment server -Manges splunk components in distributed environment[/vc_column_text][/vc_tta_section][vc_tta_section title=”Which is latest splunk version in use?” tab_id=”1562227552119-0a0f6f74-43d8″][vc_column_text]

Splunk 6.3

[/vc_column_text][/vc_tta_section][vc_tta_section title=”What is splunk indexer? what are stages of splunk indexing?” tab_id=”1562227552756-1dc44951-8b39″][vc_column_text]The indexer is the Splunk Enterprise component that creates and manages indexes. The primary functions of an  indexer are:

  • Indexing incoming data.
  • Searching the indexed data.
  • Picture

[/vc_column_text][/vc_tta_section][vc_tta_section title=”What is a splunk forwarder and What are types of splunk forwarder?” tab_id=”1562227554072-ebc337b1-65fb”][vc_column_text]There are two types of splunk forwarder as below

a) universal forwarder(UF) -Splunk agent installed on non-Splunk system to gather data locally, can’t parse or index data

b) Heavy weight forwarder(HWF) – full instance of splunk with advance functionality.

– Generally works as a remote collector, intermediate forwarder, and possible data filter because they parse data, they are not recommended for production systems[/vc_column_text][/vc_tta_section][vc_tta_section title=”what are most important configuration files of splunk OR can you tell name of few important configuration files in splunk?” tab_id=”1562227554608-1c25b08c-904b”][vc_column_text]props.conf




server.conf[/vc_column_text][/vc_tta_section][vc_tta_section title=” What are types of splunk licenses?” tab_id=”1562227555196-79d4fe3f-d6e3″][vc_column_text]Enterprise license

Free license

Forwarder license

Beta license

Licenses for search heads (for distributed search)

Licenses for cluster members (for index replication)[/vc_column_text][/vc_tta_section][vc_tta_section title=”What is splunk app?” tab_id=”1562227555736-888b0468-9d4f”][vc_column_text]

splunk app is  container/directory of configurations,searches,dashboards etc. in splunk

[/vc_column_text][/vc_tta_section][vc_tta_section title=”Where does splunk default configuration is stored?” tab_id=”1562227556375-9382b678-6bdf”][vc_column_text]


[/vc_column_text][/vc_tta_section][vc_tta_section title=”What features are not available in splunkfree ?” tab_id=”1562227557533-c367f19e-1bbd”][vc_column_text]splunk free lacks these features:

  • authentication and scheduled searches/alerting
  • distributed search
  • forwarding in TCP/HTTP (to non-splunk)
  • deployment management

[/vc_column_text][/vc_tta_section][vc_tta_section title=”what happens if the license master is unreachable?” tab_id=”1562227558072-58e81557-6830″][vc_column_text]license slave will start a 24-hour timer, after which search will be blocked on the license slave (though indexing continues). users Will not be able to search data in that slave until it can reach license master again[/vc_column_text][/vc_tta_section][vc_tta_section title=”what is summary index insplunk?” tab_id=”1562227558573-4e0c4c98-1627″][vc_column_text]The Summary index is the default summary index (the index thatSplunk Enterprise uses if you do not indicate another one).

If you plan to run a variety of summary index reports you may need to create additional summary indexes.[/vc_column_text][/vc_tta_section][vc_tta_section title=”What is splunk DB connect?” tab_id=”1562227559209-0e3935f0-9c4e”][vc_column_text]Splunk DB Connect is a generic SQL database plugin for Splunk that allows you to easily integrate database information with Splunk queries and reports.[/vc_column_text][/vc_tta_section][vc_tta_section title=”Can you write down a general regular expression for extracting ip address from logs?” tab_id=”1562227559901-d9f72e63-407e”][vc_column_text]There are multiple ways we can extract ip address from logs.Below are few examples.

Regular Expression for extracting ip address:

rex field=_raw  "(?<ip_address>\d+\.\d+\.\d+\.\d+)"


rex field=_raw  "(?<ip_address>([0-9]{1,3}[\.]){3}[0-9]{1,3})"

[/vc_column_text][/vc_tta_section][vc_tta_section title=”What is difference between stats vs transaction command?” tab_id=”1562227561136-8029daea-d1da”][vc_column_text]The transaction command is most useful in two specific cases :

  • Unique id (from one or more fields) alone is not sufficient to discriminate between two transactions. This is the case
  • when the identifier is reused, for example web sessions identified by cookie/client IP. In this case, time span or pauses are also used to segment the data into transactions.
  • In other cases when an identifier is reused, say in DHCP logs, a particular message may identify the beginning or end of a transaction.
  • When it is desirable to see the raw text of the events combined rather than analysis on the constituent fields of the events.
  • In other cases, it’s usually better to use stats as the performance is higher, especially in a distributed search environment.
  • Often there is a unique id and stats can be used.

[/vc_column_text][/vc_tta_section][vc_tta_section title=”How to troubleshoot splunk performance issues?” tab_id=”1562227561800-99eb9734-b8ab”][vc_column_text]Answer to this question would be very wide but basically interviewer would be looking for following keywords in interview :

  • Check  splunkd.log for any errors
  • Check server performance issues i.e. cpu/memory usage,disk i/o etc
  • Install SOS (Splunk on splunk) app and check for warning and errors in dashboard
  • check number of saved searches currently running and their system resources consumption
  • install Firebug, which is a firefox extension. After it’s installed and enabled, log into splunk (using firefox), open firebug’s panels,

switch to the ‘Net’ panel (you will have to enable it).The Net panel will show you the HTTP requests and responses along with the time spent in each. This will give you a lot of information quickly over which requests are hanging splunk for a few seconds, and which are blameless. etc..[/vc_column_text][/vc_tta_section][vc_tta_section title=” What are buckets? explain splunk bucket lifecycle?” tab_id=”1562227562411-d0153f98-514c”][vc_column_text]Splunk places  indexed data in directories, called as “buckets”. It is physically a directory containing events of a certain period.

A bucket moves through several stages as it ages :

  • Hot – Contains newly indexed data. Open for writing. One or more hot buckets for each index.
  • Warm – Data rolled from hot. There are many warm buckets.
  • Cold – Data rolled from warm. There are many cold buckets.
  • Frozen – Data rolled from cold. The indexer deletes frozen data by default, but you can also archive it. Archived data can later be thawed (Data in  frozenbuckets is not searchable)

By default, your buckets are located in $SPLUNK_HOME/var/lib/splunk/defaultdb/db. You should see the hot-db there, and any warm buckets you have.By default, Splunk sets the bucket size to 10GB for 64bit systems and 750MB on 32bit systems.

Interested in learning Splunk? Click here to learn more in this Splunk Training![/vc_column_text][/vc_tta_section][vc_tta_section title=”What is the different between stats and eventstats commands?” tab_id=”1562227562992-942a1565-f088″][vc_column_text]Stats command generate summary statistics of all existing fields in your search results and save them as values in new fields.

Eventstats is similar to the stats command, except that aggregation results are added inline to each event and only if the

aggregation is pertinent to that event.

eventstats computes the requested statistics like stats, but aggregates them to the original raw data.[/vc_column_text][/vc_tta_section][vc_tta_section title=”Who are the biggest direct competitors to Splunk?” tab_id=”1562227563533-b084a8c1-8e0a”][vc_column_text]

logstash, Loggly, Loglogic,sumo logic etc..

[/vc_column_text][/vc_tta_section][vc_tta_section title=”splunk licenses specify what?” tab_id=”1562227564161-4df7e5a9-3ac7″][vc_column_text]

how much data you can index per calendar day

[/vc_column_text][/vc_tta_section][vc_tta_section title=” how does splunk determine 1 day, from a licensing perspective?” tab_id=”1562227564801-b72f2ba3-5d13″][vc_column_text]

midnight to midnight on the clock of the license master

[/vc_column_text][/vc_tta_section][vc_tta_section title=”how are forwarder licenses purchased ?” tab_id=”1562227565385-d79b742e-14d6″][vc_column_text]

They are included with splunk, no need to purchase separately

[/vc_column_text][/vc_tta_section][/vc_tta_accordion][/vc_column][vc_column css_animation=”fadeInRight” width=”1/2″][vc_tta_accordion color=”peacoc” active_section=”1″][vc_tta_section title=”What is command for restarting just the splunk webserver?” tab_id=”1562227570827-6847385e-c2fd”][vc_column_text]

splunk start splunkweb

[/vc_column_text][/vc_tta_section][vc_tta_section title=”What is command for restarting just the splunk daemon?” tab_id=”1562227570849-e9876d5c-a31f”][vc_column_text]

splunk start splunkd

[/vc_column_text][/vc_tta_section][vc_tta_section title=”What is command to check for running splunk processes on unix/Linux ?” tab_id=”1562227580982-22001686-f989″][vc_column_text]

ps aux | grep splunk

[/vc_column_text][/vc_tta_section][vc_tta_section title=”What is Command to enable splunk to boot start?” tab_id=”1562227581496-89557b21-0c40″][vc_column_text]

$SPLUNK_HOME/bin/splunk enable boot-start

[/vc_column_text][/vc_tta_section][vc_tta_section title=”How to disable splunk boot start?” tab_id=”1562227582029-9ece8420-7ab4″][vc_column_text]

$SPLUNK_HOME/bin/splunk disable boot-start

[/vc_column_text][/vc_tta_section][vc_tta_section title=”What is sourcetype in splunk?” tab_id=”1562227582560-6a2afa6e-e81e”][vc_column_text]

Sourcetype is splunk way of identifying data

[/vc_column_text][/vc_tta_section][vc_tta_section title=”How to reset splunk admin password?” tab_id=”1562227583752-415719bb-bc76″][vc_column_text]To reset your password log in to server on which splunk is installed and rename passwd file at below location and then restart

splunk.After restart you can login using default username:adminpassword:changeme


[/vc_column_text][/vc_tta_section][vc_tta_section title=”How to disable splunk launch message?” tab_id=”1562227584273-134beb09-be8e”][vc_column_text]Set value OFFENSIVE=Less in splunk_launch.conf

Learn more about plunk launch message in Splunk tutorial.[/vc_column_text][/vc_tta_section][vc_tta_section title=”How to clear splunk search history?” tab_id=”1562227584889-78c7dc8a-800a”][vc_column_text]Delete following file on splunk server

$splunk_home/var/log/splunk/searches.log[/vc_column_text][/vc_tta_section][vc_tta_section title=”What is btool or how will you troubleshoot splunk configuration files?” tab_id=”1562227585481-4b801650-bcdb”][vc_column_text]

splunk btool is a command line tool that helps us to  troubleshoot configuration file issues or just see what values are being used by your Splunk Enterprise installation in existing environment

[/vc_column_text][/vc_tta_section][vc_tta_section title=”What is difference between splunk app and splunk add on?” tab_id=”1562227586013-2b9b1ca2-8a98″][vc_column_text]

Basiclly both contains preconfigured configuration and reports etc but splunk add on do not have visual app. Splunk apps have preconfigured visual app

[/vc_column_text][/vc_tta_section][vc_tta_section title=”What is .conf files precedence in splunk?” tab_id=”1562227586618-521808b9-c14c”][vc_column_text]File precedence is as follows :

System local directory — highest priority

App local directories

App default directories

System default directory — lowest priority[/vc_column_text][/vc_tta_section][vc_tta_section title=”what is fishbucket or what is fishbucket index?” tab_id=”1562227587200-d6dc2093-90f3″][vc_column_text]Its a directory or index at default location /opt/splunk/var/lib/splunk .It contains seek pointers and CRCs for the files you are indexing, so splunkd can tell if it has read them already.We can access it through GUI by seraching for  “index=_thefishbucket”[/vc_column_text][/vc_tta_section][vc_tta_section title=”How do i exclude some events from being indexed by Splunk?” tab_id=”1562227588570-55bbd833-d757″][vc_column_text]This can be  done by defining a regex to match the necessary event(s) and send everything else to nullqueue.Here is a basic

example that will drop everything except events that contain the string login In props.conf:



# Transforms must be applied in this order

# to make sure events are dropped on the

# floor prior to making their way to the

# index processor

TRANSFORMS-set= setnull,setparsing



In transforms.conf


[setnull] REGEX = . DEST_KEY = queue FORMAT = nullQueue


REGEX = login

DEST_KEY = queue

FORMAT = indexQueue

—————————————————————————————[/vc_column_text][/vc_tta_section][vc_tta_section title=”How can i tell when splunk is finished indexing a log file?” tab_id=”1562227589401-cf81bec6-59cb”][vc_column_text]By watching  data from splunk’s metrics log in real-time.

index=”_internal” source=”*metrics.log” group=”per_sourcetype_thruput” series=”&lt;your_sourcetype_here&gt;” |

eval MB=kb/1024 | chart sum(MB)

or to watch everything happening split by sourcetype….

index=”_internal” source=”*metrics.log” group=”per_sourcetype_thruput” | eval MB=kb/1024 | chart sum(MB) avg(eps) over series And if you’re having trouble with a data input and you want a way to troubleshoot it, particularly if your whitelist/blacklist rules arent working the way you expect, go to this URL:



These are described in more detail on Splunk community.

[/vc_column_text][/vc_tta_section][vc_tta_section title=”How to set the default search time in Splunk 6?” tab_id=”1562227589961-a936dc2b-728b”][vc_column_text]To do this in Splunk Enterprise 6.0, use ui-prefs.conf. If you set the value in $SPLUNK_HOME/etc/system/local, all your users

should see it as the default setting. For example, if your $SPLUNK_HOME/etc/system/local/ui-prefs.conf file includes :

  1. [search]
  1. dispatch.earliest_time = @d
  1. dispatch.latest_time = now

The default time range that all users will see in the search app will be today.

The configuration file reference for ui-prefs.conf is here: http://docs.splunk.com/Documentation/Splunk/latest/Admin/Ui-prefsconf[/vc_column_text][/vc_tta_section][vc_tta_section title=”What is dispatch directory?” tab_id=”1562227590537-6b4aaae1-d78f”][vc_column_text]$SPLUNK_HOME/var/run/splunk/dispatch contains a directory for each search that is running or has completed. For example,

a directory named 1434308943.358 will contain a CSV file of its search results, a search.log with details about the search execution, and other stuff. Using the defaults (which you can override in limits.conf), these directories will be deleted 10 minutes after the search completes – unless the user saves the search results, in which case the results will be deleted after 7 days.[/vc_column_text][/vc_tta_section][vc_tta_section title=”What is difference between search head pooling and search head clusttering?” tab_id=”1562227591074-0ca2640b-75e9″][vc_column_text]Both are features provided splunk for high availability of splunk search head in case any one search head goes down. Search head cluster is newly introduced and search head pooling will be removed in next upcoming versions.Search head cluster is managed by captain and captain controls its slaves.Search head cluster is more reliable and efficient than search head pooling.[/vc_column_text][/vc_tta_section][vc_tta_section title=” If I want add/onboard folder access logs from a windows machine to splunk how can I add same?” tab_id=”1562227592400-daeebf99-74ef”][vc_column_text]Below are steps to add folder access logs to splunk

  1. Enable Object Access Audit through group policy on windows machine on which folder is located
  2. Enable auditing on specific folder for which you want to monitor logs
  3. Install splunk universal forwarder on windows machine
  4. Configure universal forwarder to send security logs to splunk indexer

[/vc_column_text][/vc_tta_section][vc_tta_section title=”How would you handle/troubleshoot splunk license violation warning error?” tab_id=”1562227593006-28cd31dc-4348″][vc_column_text]License violation warning  meanssplunk has indexed more data than  our purchased license  quota.We have to identify which index/sourcetype has received more data recently than usual daily data volume.We can check on splunk license master pool wise available quota and identify the pool for which violation is occurring.Once we know the pool for which we are receiving more data then we have to identify top sourcetype for which we are receiving more data than usual data.Oncesourcetype is identified then we have to find out source machine which is sending huge number of logs and root cause for the same and troubleshoot accordingly.[/vc_column_text][/vc_tta_section][vc_tta_section title=” What is mapreduce algorithm?” tab_id=”1562227593537-946ac01a-f627″][vc_column_text]Maprduce algorithm is secret behind splunk fast data searching speed.It’s an algorithm typically used for batch based large scale parallelization.It’s inspired by functional programming’s map() and reduce () functions.[/vc_column_text][/vc_tta_section][vc_tta_section title=” How splunk avoids duplicate indexing of logs ?” tab_id=”1562227594134-dd97c0ef-e085″][vc_column_text]At indexer splunk keeps track of indexed events in a directory called fish buckets (default location /opt/splunk/var/lib/splunk). It contains seek pointers and CRCs for the files you are indexing, so splunkd can tell if it has read them already.[/vc_column_text][/vc_tta_section][vc_tta_section title=”What is difference between splunk SDK and splunk framework?” tab_id=”1562227594725-597b803f-95c5″][vc_column_text]Splunk SDKs are designed to allow you to develop applications from the ground up and not require Splunk Web or any components from the Splunk App Framework. These are separately licensed to you from the Splunk Software and do not alter the Splunk Software. Splunk App Framework resides within Splunk’s web server and permits you to customize the Splunk Web UI that comes with the product and develop Splunk apps using the Splunk web server. It is an important part of the features and functionalities of Splunk Software , which does not license users to modify anything in the Splunk Software.[/vc_column_text][/vc_tta_section][vc_tta_section title=”For what purpose inputlookup and outputlook are used in splunk search?” tab_id=”1562227595321-d2e0668f-e0f3″][vc_column_text]

inputlookup command returns the whole lookup table as search results.

For example

…| inputlookuplookuptabllename returns a search result for every row in the table lookup which has two field


  • host
  • machine_type.

Outputlookup  outputs the current search results to a lookup table on the disk.

For example

…| outputlookup lookup.csv saves all the results into lookup.csv.


WhatsApp us