Interview Questions and Answers
Interview Questions and Answers
1) Define Splunk
It is a software technology that is used for searching, visualizing, and monitoring machine-
generated big data. It monitors and different types of log files and stores data in Indexers.
2) List out common ports used by Splunk.
Common ports used by Splunk are as follows:
6) What are the pros of getting data into a Splunk instance using forwarders?
The advantages of getting data into Splunk via forwarders are TCP connection, bandwidth
throttling, and secure SSL connection for transferring crucial data from a forwarder to an indexer.
7) What is the importance of license master in Splunk?
License master in Splunk ensures that the right amount of data gets indexed. It ensures that the
environment remains within the limits of the purchased volume as Splunk license depends on the
data volume, which comes to the platform within a 24-hour window.
• Inputs file
• Transforms file
• Server file
• Indexes file
• Props file
However, in a free version, license violation warning shows only 3 counts of warning.
Here map() function is associated with Mapper class and reduce() function is associated with a
Reducer class.
Data models are most commonly used for creating a hierarchical model of data. However, it can
also be used when you have a large amount of unstructured data. It helps you make use of that
information without using complicated search queries.
Replication factor determines the number of copies maintained by the cluster as well as the
number of copies that each site maintains.
Another way to extract fields in Splunk is to write your regular expressions in a props configuration
file.
19) What do you mean by summary index?
A summary index is a special index that stores that result calculated by Splunk. It is a fast and
cheap way to run a query over a longer period of time.
25) What is the difference between Index time and Search time?
Index time is a period when the data is consumed and the point when it is written to disk. Search
time take place while the search is run as events are composed by the search.
27) Name the command which is used to the “filtering results” category
The command which is used to the “filtering results” category is: “where,” “Sort,” “rex,” and
“search.”
• Free license
• Beta license
• Search heads license
• Cluster members license
• Forwarder license
• Enterprise license
1) Filtering Results, 2) Sorting Results, 3) Filtering Grouping Results, 4) Adding Fields, and 5)
Reporting Results.
$splunk_home/var/log/splunk/searches.log
34. What is Btool? How will you troubleshoot Splunk configuration files?
Splunk Btool is a command-line tool that helps us troubleshoot configuration file issues or just see
what values are being used by our Splunk Enterprise installation in the existing environment.
35. What is the difference between Splunk App and Splunk Add-on?
In fact, both contain preconfigured configuration, reports, etc., but the Splunk add-on does not
have a visual app. On the other hand, a Splunk app has a preconfigured visual app.
/opt/splunk/var/lib/splunk
It contains seek pointers and CRCs for the files we are indexing, so ‘splunkd’ can tell us if it has
read them already. We can access it through the GUI by searching for:
index=_thefishbucket
In props.conf:
<code>[source::/var/log/foo]
# index processor
TRANSFORMS-set= setnull,setparsing
</code>
In transforms.conf:
[setparsing]
REGEX = login
DEST_KEY = queue
FORMAT = indexQueue
39. How can I understand when Splunk has finished indexing a log file?
We can figure this out:
If we are having trouble with data input and we want a way to troubleshoot it, particularly if our
whitelist/blacklist rules are not working the way we expected, we will go to the following URL:
$SPLUNK_HOME/etc/system/local
$SPLUNK_HOME/etc/system/local/ui-prefs.conf file
includes:
[search]
dispatch.earliest_time = @d
dispatch.latest_time = now
The default time range that all users will see in the search app will be today.
http://docs.splunk.com/Documentation/Splunk/latest/Admin/Ui-prefsconf
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 we 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.
42. What is the difference between Search Head Pooling and Search Head Clustering?
Both are features provided by Splunk for the high availability of Splunk search head in case any
search head goes down. However, the search head cluster is newly introduced and search head
pooling will be removed in the next upcoming versions.
The search head cluster is managed by a captain, and the captain controls its slaves. The search
head cluster is more reliable and efficient than the search head pooling.
43. If I want to add folder access logs from a windows machine to Splunk, how do I do it?
Below are the steps to add folder access logs to Splunk:
Enable Object Access Audit through group policy on the Windows machine on which the folder is
located
/opt/splunk/var/lib/splunk
It contains seek pointers and CRCs for the files we are indexing, so splunkd can tell us if it has
read them already.
47. What is the difference between Splunk SDK and Splunk Framework?
Splunk SDKs are designed to allow us to develop applications from scratch and they do not
require Splunk Web or any components from the Splunk App Framework. These are separately
licensed from Splunk and do not alter the Splunk Software.
Splunk App Framework resides within the Splunk web server and permits us 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, which does not license users
to modify anything in Splunk.
48. For what purpose inputlookup and outputlookup are used in Splunk Search?
The inputlookup command is used to search the contents of a Splunk lookup table. The lookup
table can be a CSV lookup or a KV store lookup. The inputlookup command is considered to be an
event-generating command. An event-generating command generates events or reports from one
or more indexes without transforming them. There are many commands that come under the
event-generating commands such as metadata, loadjob, inputcsv, etc. The inputlookup command
is one of them.
Syntax:
inputlookup [append=] [start=] [max=] [ | ] [WHERE ]
Now coming to the outputlookup command, it writes the search results to a static lookup table, or KV
store collection, that we specify. The outputlookup command is not being used with external lookups.
Syntax:
outputlookup [append=<bool>] [create_empty=<bool>] [max=<int>] [key_field=<field_name>]
[createinapp=<bool>] [override_if_empty=<bool>] (<filename> | <tablename>)
49. Explain how Splunk works?
We can divide the working of Splunk into three main parts:
Forwarder: You can see it as a dumb agent whose main task is to collect the data from various
sources like remote machines and transfer it to the indexer.
Indexer: The indexer will then process the data in real-time and store & index it on the localhost or
cloud server.
Search Head: It allows the end-user to interact with the data and perform various operations like
searching, analyzing, and visualizing the information.
50. How to add the colors in Splunk UI based on the field names?
Splunk UI has a number of features that allow the administrator to make the reports more
presentable. One such feature that proves to be very useful for presenting distinguished results is
the custom colors. For example, if the sales of a product drop below a threshold value, then as an
administrator you can set the chart to display the values in red color.
The administrator can also change chart colors in the Splunk Web UI by editing the panels from
the panel settings mentioned above the dashboard. Moreover, you can write the codes and use
hexadecimal values to choose a color from the palette.