Courseiva

SPLK-1004 · topic practice

Macros And Workflow Actions practice questions

This domain covers Splunk macros (search, eval, and workflow-action varieties) and workflow actions that turn field values into clickable links. Questions test where link targets get their values, how arguments and labels behave, and the order in which macro contents are expanded and processed inside a search pipeline.

Courseiva uses original exam-style practice questions designed for learning and revision. The goal is to understand the concepts, recognise exam patterns, and improve through explanations — not memorise copied exam dumps.

Editorial oversight:Johnson Ajibi· MSc IT Security, IEEE Senior Member
20 questionsDomain: Macros And Workflow Actions

What the exam tests

What to know about Macros And Workflow Actions

Be able to create and call macros with correct argument syntax and configure workflow actions that build links from field values. The critical skill is knowing which macro type fits a task and where a workflow action link actually gets its values.

Distinguishing search, eval, and workflow-action macro types and their argument definitions

Identifying valid sources for workflow action link values such as field values and search results

Configuring workflow actions to open external URLs or run secondary searches from a field

Understanding macro expansion order relative to search command processing and field extraction

Watch out for

Common Macros And Workflow Actions exam traps

  • ▸Confusing eval macros, which return a value to a field, with search macros that insert SPL into the pipeline
  • ▸Assuming workflow action links can pull values from anywhere instead of only defined fields and results
  • ▸Forgetting that macro arguments are positional and that missing or extra arguments break expansion

Practice set

Macros And Workflow Actions questions

20 questions · select your answer, then reveal the explanation

Which setting in the workflow action configuration determines whether the action opens in the current window or a new window?

If you are using a macro to generate a search string, how can you ensure the macro is 'validated' to prevent malicious code injection?

If you need a macro to perform a search that uses a pipe ('|'), how should it be defined?

Which THREE components must be specified when creating a new search workflow action?

Which TWO of the following are true regarding workflow action field targeting?

Which TWO of the following are valid macro argument types for validation?

Which TWO of the following describe the functionality of the Workflow Action 'Type' setting?

Which TWO of the following are valid uses for the 'Validation error message' field in a Search Macro?

A Splunk administrator wants to create a search macro that accepts a single argument named 'index_name' and expands to a search that selects all events from that index. The macro will be invoked as `my_macro("main")`. Which definition correctly defines this macro in macros.conf?

A security analyst is creating a search macro to standardize the calculation of risk scores across multiple dashboards. The macro must accept a field name to evaluate and a multiplier to apply, but the multiplier should only accept positive integers; if a non-integer or negative value is passed, the search should fail with a clear message. Which configuration should the analyst use when defining the macro?

A Splunk administrator is creating a search macro that accepts two arguments: `src_ip` and `dest_ip`. The macro should validate that both arguments are valid IP addresses before executing the search. Which TWO of the following are required to enable this validation? (Choose two.)

A Splunk power user is configuring a workflow action that will appear when a user clicks on a field value in search results. The workflow action should open a new browser tab and pass the field value to an external ticketing system via a URL. The user wants to ensure that the field value is properly URL-encoded and that the action is only available for fields named 'ticket_id'. Which two of the following configuration settings are required to meet these requirements? (Choose two.)

Question 13mediummultiple choice
Read the full network assurance explanation →

An analyst maintains a macro named `net_flow(2)` that runs `index=netflow src=$src$ dest=$dst$ | stats sum(bytes) AS total_bytes by src, dest`. They want to create a workflow action on the `src` field so that clicking a source IP opens a new browser tab showing the aggregated byte totals for that IP against a fixed destination of `10.0.0.1`. Which configuration accomplishes this with the least maintenance overhead?

A Splunk power user is creating a search macro that will be used in multiple dashboards. The macro should accept a field name and a time range modifier, and it should validate that the field name is not empty and that the time range modifier is one of the allowed values: "day", "week", or "month". Which two validation expressions should be used in the macro definition? (Choose two.)

A security analyst wants to create a search macro named `threat_lookup` that accepts an IP address and returns a boolean indicating whether the IP is on a known threat list. The macro should reference a lookup definition named `threat_intel_lookup`. The analyst defines the macro in `macros.conf` with the following stanza:

[threat_lookup]

definition = | lookup threat_intel_lookup ip AS src_ip OUTPUT threat_flag args = ip

When the analyst later runs `| makeresults | eval ip="10.0.0.1" | `threat_lookup(ip)` `, the search fails with an error. What is the most likely cause?

A Splunk administrator is designing a workflow action that should only appear when a user clicks on a field named 'src_ip' and should run a search that uses the value of 'src_ip' to look up additional information from a lookup table. The administrator wants the search to run in the background and display a notification when it completes. Which of the following workflow action configurations will achieve this?

An administrator creates a global search macro in the `search` app named `top_src` that expands to `| top limit=10 src`. Later, an analyst in the `es` app writes a search starting with `top_src` and finds that it does not behave as expected. What is the most likely cause?

A Splunk power user is defining a search macro that will be used in a dashboard. The macro takes a single argument, index_name, and should expand to a search that filters events from that index. The user wants to ensure that the macro can be used in a search string without causing syntax errors, even if the index name contains special characters like hyphens. Which definition should be used?

A Splunk power user is designing a set of search macros to standardize common search operations across a team. The user wants to create macros that accept arguments and can be used in scheduled searches and dashboards. Which two of the following are valid considerations when defining these macros? (Choose two.)

A Splunk power user is creating a search macro that will be used to calculate the duration between two timestamps. The macro should accept two arguments: 'start_time' and 'end_time'. The user wants to ensure that if the arguments are not provided, the macro defaults to using the current time for both. Which of the following macro definitions will achieve this?

Free account

Track your progress over time

Create a free account to save your results and see which topics improve across sessions.

Focused Macros And Workflow Actions sessions

Start a Macros And Workflow Actions only practice session

Every question in these sessions is drawn from the Macros And Workflow Actions domain — nothing else.

Related practice questions

Related SPLK-1004 topic practice pages

Move into related areas when this topic feels solid.

Frequently asked questions

What does the SPLK-1004 exam test about Macros And Workflow Actions?
Be able to create and call macros with correct argument syntax and configure workflow actions that build links from field values. The critical skill is knowing which macro type fits a task and where a workflow action link actually gets its values.
How should I use these practice questions?
Select your answer before revealing the explanation. Then read why each option is right or wrong — this active recall approach builds retention far faster than re-reading notes.
Can I practise just Macros And Workflow Actions questions in a focused session?
Yes — the session launcher on this page draws every question from the Macros And Workflow Actions domain. Use a 10-question session first to gauge your baseline, then move to 20 or 30 once the weak spots are clear.
Where can I practise other SPLK-1004 topics?
Use the topic links above to move to related areas, or go back to the SPLK-1004 question bank to see all topics.
Are these real exam questions or dumps?
These are original practice questions written to test the same concepts the SPLK-1004 exam covers. They are not copied from any real exam or dump site.