Splunk Search

Macro oddness with inputlookup

chirsf
Explorer

I have an odd situation with a macro starting with an inputlookup like this:

 

inputlookup ADcomputerslist
```logic time```
| search Enabled="True"

 

I run it like this:

 

| `adsearchsortingv3`

 

 However it expands like this:

 

| inputlookup ADcomputerslist where Enabled="True" 

 

This doesn't seem right to me, but I am probably doing something wrong.

Labels (1)
0 Karma

richgalloway
SplunkTrust
SplunkTrust

There's nothing technically wrong with that.  It's not a literal replacement of the macro name with its definition, so that could be considered incorrect, but the change is an optimization that should make the search run faster so that's good.

---
If this reply helps you, Karma would be appreciated.
0 Karma

s2_splunk
Splunk Employee
Splunk Employee

I don't think you need to escape/triple your backticks around logic time, it should work without it. Can you share your macros.conf with the two macro definitions?

0 Karma

chirsf
Explorer

I'd have to file a ticket to get the .conf. 🙂

 

Can't really share the definition on a public forum. If you think it's a bug or something else like that I can file a ticket though

0 Karma
Get Updates on the Splunk Community!

Technical Workshop Series: Splunk Data Management and SPL2 | Register here!

Hey, Splunk Community! Ready to take your data management skills to the next level? Join us for a 3-part ...

Spotting Financial Fraud in the Haystack: A Guide to Behavioral Analytics with Splunk

In today's digital financial ecosystem, security teams face an unprecedented challenge. The sheer volume of ...

Solve Problems Faster with New, Smarter AI and Integrations in Splunk Observability

Solve Problems Faster with New, Smarter AI and Integrations in Splunk Observability As businesses scale ...