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!

Detecting Remote Code Executions With the Splunk Threat Research Team

REGISTER NOWRemote code execution (RCE) vulnerabilities pose a significant risk to organizations. If ...

Observability | Use Synthetic Monitoring for Website Metadata Verification

If you are on Splunk Observability Cloud, you may already have Synthetic Monitoringin your observability ...

More Ways To Control Your Costs With Archived Metrics | Register for Tech Talk

Tuesday, May 14, 2024  |  11AM PT / 2PM ET Register to Attend Join us for this Tech Talk and learn how to ...