Courseiva
Transactions and Event CorrelationmediumMultiple ChoiceObjective-mapped

SPLK-1002 Transactions and Event Correlation Practice Question

A Splunk user wants to correlate events from different sourcetypes (web_access, app_log) that belong to the same user session identified by session_id. The events should be grouped only if they occur within 30 minutes of each other, and each transaction should contain at least one event from each sourcetype. Which SPL construct should they use?

⚠ Common exam trap

Splunk often tests the distinction between `transaction` and `stats` or `join`; the trap here is that candidates mistakenly think `stats` can group events with time constraints, but `stats` lacks the ability to enforce a `maxspan` or require events from multiple sourcetypes within the same group.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

`transaction session_id maxspan=30m`

The `transaction` command groups events that share a common field (`session_id`) and allows you to set constraints like `maxspan=30m` to limit the time window between the first and last event in the transaction. However, `transaction` does not automatically require events from both sourcetypes; grouping is based solely on the session_id field. To ensure each transaction contains at least one event from both `web_access` and `app_log`, you would need to add a subsequent filter, such as `| where mvcount(sourcetype) > 1`. Nevertheless, option B is the correct construct because it groups events by session_id within the time window, and the additional requirement can be applied afterward. The other options fail to enforce the 30-minute window or the presence of both sourcetypes.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • `append [search sourcetype=app_log]` then sort by session_id

    Why it's wrong here

    Append does not correlate; it just adds events.

  • `transaction session_id maxspan=30m`

    Why this is correct

    Transaction groups events by session_id within 30 minutes, fulfilling both requirements.

  • `sourcetype=web_access OR sourcetype=app_log | eval session=session_id` then `stats values(*) as * by session`

    Why it's wrong here

    Stats with values does not preserve time proximity between events.

  • `join type=inner session_id [search sourcetype=app_log]` after a search on web_access

    Why it's wrong here

    Join can be inefficient and does not handle time proximity.

About these practice questions

Courseiva writes every SPLK-1002 question from scratch — 475 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This SPLK-1002 practice question is part of Courseiva's free Splunk certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the SPLK-1002 exam.