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!

Splunk Platform | Upgrading your Splunk Deployment to Python 3.9

Splunk initially announced the removal of Python 2 during the release of Splunk Enterprise 8.0.0, aiming to ...

From Product Design to User Insights: Boosting App Developer Identity on Splunkbase

co-authored by Yiyun Zhu & Dan Hosaka Engaging with the Community at .conf24 At .conf24, we revitalized the ...

Detect and Resolve Issues in a Kubernetes Environment

We’ve gone through common problems one can encounter in a Kubernetes environment, their impacts, and the ...