Courseiva

CCNA SPL Search Proficiency Questions

38 questions · SPL Search Proficiency · All types, answers revealed

1
MCQeasy

What is the purpose of the 'head' command?

A.Return the last N results.
B.Sort the results.
C.Count the results.
D.Return the first N results.
AnswerD

Head limits results to the beginning of the list.

Why this answer

The 'head' command returns the first N results from a search.

2
Multi-Selectmedium

Which TWO of the following commands are used for data transformation or enrichment?

Select 2 answers
A.search
B.index
C.head
D.lookup
E.eval
AnswersD, E

Used for data enrichment.

Why this answer

Lookup and eval are core transformation commands.

3
MCQeasy

Which character acts as a wildcard in a search string?

A.*
B.$
C.?
D.%
AnswerA

The asterisk represents any number of characters.

Why this answer

The asterisk (*) is the standard wildcard character in Splunk.

4
MCQhard

You are using a subsearch to find 'dest_ip' values that appeared in a 'failed_login' search. What is a common limitation of subsearches that you must consider?

A.Subsearches are limited by the 'maxout' configuration and execution time.
B.Subsearches only return the first 10 results.
C.Subsearches cannot use the 'stats' command.
D.Subsearches cannot reference fields from the outer search.
E.Subsearches always run after the outer search completes.
AnswerA

The subsearch must complete within a specific time and result limit before the outer search runs.

Why this answer

Subsearches have a limit on the number of results returned (default 10,000) and a time limit.

5
Multi-Selectmedium

Which TWO commands provide information about the fields present in the events?

Select 2 answers
A.lookup
B.eval
C.sort
D.fields
E.table
AnswersD, E

Controls visibility of fields.

Why this answer

Fields and table can show which fields exist.

6
MCQhard

Which command is used to calculate the 'count' of events and concurrently keep the original 'raw' text?

A.eventstats count by host
B.collect count by host
C.stats count by host
D.streamstats count by host
AnswerA

Eventstats adds the calculated field to the original events without discarding the raw text.

Why this answer

The 'stats' command discards the raw text, so you need 'eventstats' if you want to keep the raw events.

7
MCQhard

You have a field 'raw_data' containing JSON. How do you extract fields from it within your SPL search?

A.eval json_parse(raw_data)
B.spath input=raw_data
C.json raw_data
D.extract json raw_data
AnswerB

The spath command automatically parses JSON if the input is valid.

Why this answer

The 'spath' command is specifically designed to parse JSON or XML data.

8
MCQhard

What is the purpose of the 'map' command in complex searches?

A.Maps IP addresses to locations.
B.Runs a subsearch for each event in the results.
C.Maps fields to a dashboard.
D.Creates a map visualization.
AnswerB

Map iterates through results and runs a search for each one.

Why this answer

The 'map' command executes a search for each event in the results.

9
MCQeasy

Which command is used to visualize data in a time-series chart?

A.graph count _time
B.stats count over time
C.timechart count by sourcetype
D.chart count by _time
AnswerC

Timechart is the standard command for aggregation over time.

Why this answer

The 'timechart' command is specifically for time-series visualization.

10
MCQmedium

You want to find the total count of events per hour over the last week. Which command sequence is most efficient?

A.chart count by _time | bucket 1h
B.bin _time span=1h | stats count by _time
C.timechart count span=1h
D.stats count by _time_hour
AnswerB, C

Binning time into hours and then counting is standard.

Why this answer

Using 'bin' followed by 'stats' is the most efficient pattern.

11
MCQhard

You want to dynamically update a lookup table with new indicators of compromise (IOCs) found during your search. Which command is used for this?

A.saveas lookup ioc_list.csv
B.outputlookup ioc_list.csv
C.write ioc_list.csv
D.inputlookup ioc_list.csv --append
AnswerB

Outputlookup writes the current results to the specified CSV file.

Why this answer

The 'outputlookup' command writes search results to a lookup file.

12
MCQmedium

What is the result of using 'bin _time span=1d'?

A.Counts events per day.
B.Deletes events older than 1 day.
C.Groups events into 24-hour buckets.
D.Changes the display format of the timestamp.
AnswerC

Binning 'span=1d' creates daily time windows.

Why this answer

Binning the time field rounds down to the nearest day.

13
MCQmedium

You are using 'lookup' to add user info. What happens if the common field doesn't exist in the lookup file?

A.The lookup file is renamed.
B.The events without a match are deleted.
C.The entire search fails.
D.The events without a match are left with null values in the lookup fields.
AnswerD

Lookup matches are non-binding by default, so unmatched events remain.

Why this answer

The lookup command leaves the output fields null for those events.

14
Multi-Selectmedium

Which TWO commands require a grouping field to function correctly?

Select 2 answers
A.transaction
B.eval
C.stats
D.search
E.rename
AnswersA, C

Groups events by a common field.

Why this answer

Stats and transaction require a grouping field.

15
MCQhard

How can you ensure that a search field is only treated as a number for calculation purposes?

A.eval count = number(count)
B.cast(count as int)
C.eval count = tonumber(count)
D.eval count = int(count)
AnswerC

Tonumber explicitly forces a numerical data type.

Why this answer

The 'tonumber' function in 'eval' converts a string to a number.

16
Multi-Selecthard

Which THREE of the following are valid uses of the 'eval' command?

Select 3 answers
A.eval is_error = if(status>400, 1, 0)
B.eval new_field = field1 + field2
C.eval count by host
D.eval filter status=200
E.eval full_name = first + " " + last
AnswersA, B, E

Logic function.

Why this answer

Creating fields, string concatenation, and math operations are valid.

17
MCQmedium

You want to calculate the standard deviation of 'response_time' per 'server'. Which command is correct?

A.stats variance(response_time) as std_dev by server
B.stats stdev(response_time) as std_dev by server
C.stats sigma(response_time) by server
D.stats dev(response_time) by server
AnswerB

Stdev is the standard function for deviation in stats.

Why this answer

The 'stdev' function is used within the stats command.

18
MCQmedium

You are performing a search and want to ensure the subsearch runs against a specific time range relative to the main search. Which command/option achieves this?

A.search index=logs [search index=logs earliest=-24h]
B.[search index=logs | stats count by host | return $host] earliest=-24h
C.set_time -24h
D.subsearch_time=-24h
AnswerA, B

Actually, this is a standard pattern, but the question asks for the mechanism of relative time.

Why this answer

The 'earliest' and 'latest' arguments within a subsearch bracket control the time window.

19
MCQmedium

You want to use the 'eval' command to create a new field 'is_critical' that is 'yes' if 'severity' is 'high' or 'critical', and 'no' otherwise. Which syntax is correct?

A.eval is_critical = if(severity=="high" || "critical", "yes", "no")
B.eval is_critical = case(severity="high" OR "critical", "yes", 1=1, "no")
C.eval is_critical = if(severity IN("high", "critical"), "yes", "no")
D.eval is_critical = switch(severity, "high", "yes", "critical", "yes")
AnswerC

The IN operator and if function are the cleanest way to handle multiple matches.

Why this answer

The 'if' function combined with 'in' or 'OR' logic is required.

20
Multi-Selecthard

Which THREE of the following are valid search operators?

Select 3 answers
A.WITH
B.OR
C.AND
D.BUT
E.NOT
AnswersB, C, E

Union.

Why this answer

AND, OR, and NOT are the three fundamental boolean operators in SPL.

21
Multi-Selecthard

Which THREE of the following represent valid ways to use the 'lookup' command?

Select 3 answers
A.lookup file.csv field1
B.lookup file.csv --all
C.lookup file.csv field1 AS field_a OUTPUT field2 AS field_b
D.lookup file.csv field1 OUTPUT field2
E.lookup file.csv --join
AnswersA, C, D

Standard lookup usage.

Why this answer

Standard lookup, lookup with OUTPUT, and lookup with AS aliasing are valid.

22
MCQmedium

You are investigating a potential data exfiltration event. You have a lookup file called 'authorized_servers.csv' containing a field 'ip_address'. You want to find all connections to IPs not in this list. Which command fulfills this?

A.index=network | lookup authorized_servers.csv ip_address AS dest_ip OUTPUT ip_address as is_authorized | where is_authorized=""
B.index=network | inputlookup authorized_servers.csv | where dest_ip!=ip_address
C.index=network | lookup authorized_servers.csv dest_ip | where isnull(dest_ip)
D.index=network | filter dest_ip NOT IN authorized_servers.csv
AnswerA

Using a lookup to output a field and checking for nulls is a standard way to find non-matches.

Why this answer

The 'inputlookup' combined with 'NOT [search]' or the 'lookup' command with a filter is used for exclusion.

23
MCQhard

You need to calculate the average time delta between 'login' and 'logout' events for each user. Which command approach is most effective?

A.index=auth | transaction user_id | stats avg(duration) by user_id
B.index=auth | delta _time as time_diff by user_id
C.index=auth | stats min(_time) as start, max(_time) as end by user_id | eval delta=end-start
D.index=auth | eval time_diff = logout_time - login_time
AnswerA

The transaction command automatically calculates a 'duration' field for grouped events.

Why this answer

Transaction is effective for grouping events by a common ID and calculating duration.

24
Multi-Selecthard

Which THREE commands can be used to handle or create statistical summaries?

Select 3 answers
A.stats
B.fields
C.streamstats
D.eventstats
E.sort
AnswersA, C, D

Standard aggregation.

Why this answer

Stats, eventstats, and streamstats are the primary statistical commands.

25
MCQeasy

Which command is used to rename a field in the results table for better readability?

A.table src_ip as "Source Address"
B.fields src_ip:"Source Address"
C.eval "Source Address" = src_ip
D.rename src_ip as "Source Address"
AnswerD

The rename command follows the syntax: rename <field> as <new_name>.

Why this answer

The rename command allows changing the display name of a field.

26
MCQeasy

Which command allows you to limit the number of fields displayed in your final results table?

A.table src_ip, dest_ip
B.select src_ip, dest_ip
C.show src_ip, dest_ip
D.fields + src_ip, dest_ip
AnswerD

The '+' includes only the specified fields.

Why this answer

The 'fields' command is used to include or exclude fields from the event display.

27
MCQmedium

You need to append the contents of a lookup file 'threat_intel.csv' to your search results based on the field 'src_ip'. Which command is correct?

A.index=firewall | enrich src_ip threat_intel.csv
B.index=firewall | lookup threat_intel.csv src_ip OUTPUTNEW severity, threat_type
C.index=firewall | join src_ip [inputlookup threat_intel.csv]
D.index=firewall | inputlookup threat_intel.csv src_ip
E.index=firewall | append threat_intel.csv
AnswerB

The lookup command adds fields from the CSV to existing events based on a common field.

Why this answer

The lookup command is designed to enrich events with data from a lookup file.

28
MCQeasy

What does the 'OR' operator do in a search?

A.Matches either condition.
B.Excludes the specified condition.
C.Matches both conditions.
D.Matches only the first condition.
AnswerA

OR is a boolean operator that expands the scope of the search.

Why this answer

The 'OR' operator returns results that match either condition.

29
MCQmedium

Which command would you use to filter out events where the 'status' field is 200?

A.eval status!=200
B.where status=200
C.drop status=200
D.search status!=200
AnswerD

This is the most direct way to exclude events with status 200.

Why this answer

The 'where' command or 'search' command can be used to filter events.

30
Multi-Selectmedium

Which TWO commands are helpful for identifying specific patterns in data?

Select 2 answers
A.rename
B.sort
C.head
D.transaction
E.cluster
AnswersD, E

Groups events by common fields.

Why this answer

Cluster and transaction help identify event patterns.

31
Multi-Selecthard

Which THREE commands are used to manipulate multi-value fields?

Select 3 answers
A.rename
B.mvcombine
C.table
D.mvexpand
E.mvfilter
AnswersB, D, E

Combines fields into MV.

Why this answer

Mvexpand, mvcombine, and mvfilter are used for MV fields.

32
Multi-Selecthard

Which THREE of the following are valid ways to filter events based on time?

Select 3 answers
A.stats _time
B.earliest=, latest=
C.bin _time
D.index=logs earliest=-1h latest=now
E.where _time > relative_time(now(), "-24h")
AnswersB, D, E

Direct time modifiers in the search bar.

Why this answer

Earliest/latest, relative time modifiers, and 'where' with _time are valid.

33
MCQhard

When using 'stats', how can you include the values of a field as columns in your output?

A.stats count by host, sourcetype
B.stats count by host | transpose
C.stats count by host, sourcetype | xyseries host, sourcetype, count
D.stats pivot host sourcetype
AnswerC

Xyseries transforms result rows into a table format (x, y, z).

Why this answer

The 'xyseries' or 'chart' command is used to create columns from field values.

34
MCQeasy

Which command is used to append results from one search to another?

A.add [search index=other]
B.join [search index=other]
C.append [search index=other]
D.combine [search index=other]
AnswerC

The append command concatenates results from a subsearch.

Why this answer

The 'append' command adds results to the current result set.

35
MCQhard

When dealing with multi-value fields, which command allows you to break them into individual events?

A.expand field_name
B.mvexpand field_name
C.mv_to_events field_name
D.split field_name
AnswerB

Mvexpand creates a new event for each value in the multi-value field.

Why this answer

The 'mvexpand' command expands a multi-value field into separate events.

36
MCQmedium

Which command is used to remove duplicate events based on a field?

A.remove_duplicates event_id
B.distinct event_id
C.unique event_id
D.dedup event_id
AnswerD

Dedup keeps the first occurrence of an event based on a field and discards the rest.

Why this answer

The 'dedup' command is specifically for removing duplicates.

37
Multi-Selectmedium

Which TWO commands are commonly used to remove or limit the results returned by a search?

Select 2 answers
A.head
B.dedup
C.eval
D.stats
E.rename
AnswersA, B

Limits results by count.

Why this answer

Dedup and head are used to limit or filter results.

38
Multi-Selectmedium

Which TWO of these commands are used for data visualization prep?

Select 2 answers
A.chart
B.stats
C.fields
D.timechart
E.eval
AnswersA, D

Prepares categorical data.

Why this answer

Timechart and chart are designed for visualization.

Ready to test yourself?

Try a timed practice session using only SPL Search Proficiency questions.