Courseiva
Macros, Saved Searches and CIMhardMultiple ChoiceObjective-mapped

SPLK-1002 Macros, Saved Searches and CIM Practice Question

A security team has a saved search that runs every 5 minutes and looks for 'FAILED' events in Windows Security logs. The search uses a macro 'failed_logins' defined as: `define failed_logins() [search index=windows sourcetype=WinEventLog:Security EventCode=4625]`. Recently, the team noticed that the search is returning no results even though there are failed login events. What is the most likely issue?

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

The macro definition includes empty parentheses 'failed_logins()' but is being called without parentheses, causing Splunk to treat it as a different macro.

The macro is defined with parentheses 'failed_logins()', indicating it expects an argument, but when it is called in the saved search, it is likely called without parentheses (e.g., `failed_logins`). In Splunk, a macro defined with parentheses must be called with parentheses even if no arguments are passed; otherwise, Splunk treats it as a different macro. This causes the search to not expand the macro, leading to no results. Option B is incorrect because permissions are not the issue if it worked before. Option C is incorrect because macros can be called with a pipe, not backticks. Option D is incorrect because wildcards in sourcetype are allowed.

Answer analysis

Option-by-option breakdown

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

  • The macro definition includes empty parentheses 'failed_logins()' but is being called without parentheses, causing Splunk to treat it as a different macro.

    Why this is correct

    The macro is defined with parentheses, so it expects to be called with parentheses even if no arguments. Alternatively, define without parentheses.

  • The macro does not have read permissions for the security team.

    Why it's wrong here

    If it worked before, permissions are unlikely the cause.

  • The macro must be called with backticks like `failed_logins` instead of pipe.

    Why it's wrong here

    Macros are called with pipe or backticks depending on context; backticks are for evaluating the macro inline but pipe works too.

  • The sourcetype field is using a wildcard, which is deprecated.

    Why it's wrong here

    Wildcards are still supported in sourcetype fields.

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.