Splunk Search

Changing the color of comment macro

juhisaxena28
Explorer

We can add comments to a splunk search by using "comment" macro. However to distinguish between SPL and comment, is there any option to change the color for "comment" in SPL query?

Currently we are using comments all in uppercase letters to make it easy for us to read and differentiate from SPL query but would like to extend it to colors as well.

Tags (2)
0 Karma

jeffland
SplunkTrust
SplunkTrust

I don't know of a way to change the color scheme of SPL syntax highlighting, but I tend to insert blank lines (Shift + Enter) to format my searches readable. You could do the same with your comments, could look like this:

index=foo keyword
| eval stuff = bar
| lookup baz source

`comment("explicit lookup to avoid something for some reason")`

| table stuff source ...
Get Updates on the Splunk Community!

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...