SPLK-1002 Macro Disabled Practice Question
A Splunk admin has created several macros to simplify complex search commands. One macro, named `time_filter`, is defined as `earliest=-7d@d latest=@d`. The admin also has a saved search that uses this macro. Recently, users have complained that the saved search reports data from the wrong time range: it appears to be showing data from the last 24 hours instead of the last 7 days. The admin inspects the saved search and finds that the search string is:
`index=main | eval days=now() | where days > relative_time(now(), "-7d@d") | `time_filter``
The admin suspects the macro is not being expanded correctly. Which of the following is the most likely cause of the issue?
⚠ Common exam trap
The trap is that candidates may assume macro definition is correct and overlook the macro's enabled status. A disabled macro will not expand, leading to unexpected default behavior.
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 is disabled; the admin needs to enable it in the macros list.
The macro `time_filter` is defined as `earliest=-7d@d latest=@d`, but if it is disabled, it will not be expanded when invoked with backticks. Consequently, the search runs without the specified time range, defaulting to the last 24 hours, which explains the user reports. The admin should verify and enable the macro in the settings.
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 arguments (`$earliest$`, `$latest$`), but the invocation does not pass any arguments; thus, the macro expands to nothing.
Why it's wrong here
Ly claims the macro has arguments, but the macro definition has no arguments. The invocation with backticks is correct for a text macro, so this is not the cause.
- ✗
The saved search permissions are set to 'Private', so the macro does not apply.
Why it's wrong here
Permissions affect who can see the search, not macro expansion; macros are resolved at search time regardless of permissions.
- ✗
The macro should be invoked with a pipe, like `| time_filter` instead of backticks.
Why it's wrong here
The backtick syntax is correct for macro invocation; a pipe would treat it as a search command, which is not the intended use.
- ✓
The macro is disabled; the admin needs to enable it in the macros list.
Why this is correct
If the macro is disabled, it will not expand. This would cause the search to miss the time range modifiers and default to the last 24 hours.
Go deeper
Related to this question
About these practice questions
This SPLK-1002 question is part of Courseiva's 475-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam 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.