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 Enterprise Security 8.0.2 Availability: On cloud and On-premise!

A few months ago, we released Splunk Enterprise Security 8.0 for our cloud customers. Today, we are excited to ...

Logs to Metrics

Logs and Metrics Logs are generally unstructured text or structured events emitted by applications and written ...

Developer Spotlight with Paul Stout

Welcome to our very first developer spotlight release series where we'll feature some awesome Splunk ...