Knowledge Management

What is the max character limit for a macro?

hulahoop
Splunk Employee
Splunk Employee

I have a macro which does not work when invoked in a search, but does work when the contents are cut and paste directly into the search. I'm guessing this is due to a max character limit for macros. This macro is 27,000+ characters. 🙂

Tags (2)
0 Karma

hulahoop
Splunk Employee
Splunk Employee

no updates, but will be onsite with customer next week, will update then

0 Karma

chinmayc469
Explorer

Hi,

did you get solution for this issue, even i am facing same issue.

0 Karma

araitz
Splunk Employee
Splunk Employee

any update to this issue?

0 Karma

Genti
Splunk Employee
Splunk Employee

27,000+? holy macro!!

araitz
Splunk Employee
Splunk Employee

Hi hulahoop!

Do you see any errors thrown in splunkd.log?

My guess is that you are expanding past the default macro recursion depth as defined in limits.conf:

# max recursion depth for macros
# considered a search exception if macro expansion doesn't stop after this many levels
max_macro_depth = 100

If it fails silently, that's not good. Try appending "|format" to the end of the macro search and see if there are more than 100 levels of recursion in the resulting format string.

0 Karma
Get Updates on the Splunk Community!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...