SPLK-1002 Transactions and Event Correlation Practice Question
An analyst wants to find transactions where the first event was a 'login' and the last event was a 'logout'. Which post-transaction filter is correct?
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
✓
where mvindex(action,0)="login" AND mvindex(action,-1)="logout"
The correct filter uses mvindex to access the first and last values of the multivalue 'action' field created by the transaction command. Option A uses invalid array indexing (action[0] is not valid in Splunk). Option B uses nonexistent functions first() and last(). Option C would require a single event to have both values simultaneously, which is impossible. Option D correctly uses mvindex(action,0) for the first event and mvindex(action,-1) for the last event, ensuring the transaction starts with 'login' and ends with 'logout'.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
where action[0]="login" AND action[-1]="logout"
Why it's wrong here
Incorrect: array indexing is not supported in SPL.
- ✗
where first(action)="login" AND last(action)="logout"
Why it's wrong here
Incorrect: first() and last() are not SPL functions.
- ✗
where action="login" AND action="logout"
Why it's wrong here
Incorrect: this matches if both values exist anywhere in the multivalue field.
- ✓
where mvindex(action,0)="login" AND mvindex(action,-1)="logout"
Why this is correct
Correct: mvindex accesses elements by position.
Go deeper
Related to this question
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 →
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.