
Use comments to troubleshoot a search
You can use the inline commenting feature to troubleshoot a search.
The following search example is attempting to return the bytes for the individual indexes. However, the search has the wrong field in the stats
command <split-by clause>.
index=_internal source=*license* type=usage | stats sum(b) BY index
You can comment out portions of your search to help identify problems. In this search the stats
portion of the search is commented out.
index=_internal source=*license* type=usage ```| stats sum(b) BY index```
The results show the correct name for the field. You need to specify idx as the field name instead of index.
index=_internal source=*license* type=usage | stats sum(b) BY idx
(Thanks to Splunk user Runals for this example.)
For more information about adding inline comments to your searches, see Help reading searches.
PREVIOUS What's in this section? |
NEXT Calculate sizes of dynamic fields |
This documentation applies to the following versions of Splunk Cloud™: 8.1.2009, 8.1.2011, 8.1.2012, 8.1.2101
Feedback submitted, thanks!