You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+4-1Lines changed: 4 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -360,7 +360,10 @@ Feel free to open an issue on github or use the contact author on the SplunkBase
360
360
361
361
## Release Notes
362
362
### 3.0.15
363
-
- Merged pull request from sifters relating to replacing comment macro with the triple backtick option introduced in Splunk 8.1
363
+
- Merged pull request from sifters relating to replacing comment macro with the triple backtick option introduced in Splunk 8.1. This involved editing many searches to change the format of the comments.
Copy file name to clipboardExpand all lines: default/macros.conf
+22-22Lines changed: 22 additions & 22 deletions
Original file line number
Diff line number
Diff line change
@@ -572,14 +572,14 @@ iseval = 0
572
572
#Substitute `<macro name>` within the audit.log files with the audit definition based on a lookup file
573
573
#note this version only substitutes the first macro seen...the Splunk 8 version can handle multiple macros at once
574
574
[splunkadmins_audit_logs_macro_sub]
575
-
definition = search ```Set all values to null() in case this macro is called again within the same search. Subsitute a macro used inside a search with the definition found in the lookup file```\
575
+
definition = ```Set all values to null() in case this macro is called again within the same search. Subsitute a macro used inside a search with the definition found in the lookup file```\
#Substitute `<macro name>` within the audit.log files with the audit definition based on a lookup file
596
596
#note this version only works on Splunk 8 due to the use of mvmap
597
597
[splunkadmins_audit_logs_macro_sub_v8]
598
-
definition = search ```Set all values to null() in case this macro is called again within the same search. Subsitute a macro used inside a search with the definition found in the lookup file``` \
definition = ```Set all values to null() in case this macro is called again within the same search. Subsitute a macro used inside a search with the definition found in the lookup file``` \
| lookup splunkadmins_macros title AS macroName, app AS app_name, splunk_server \
610
610
| eval app_name2="global" \
611
-
| search ```The original version just did an OUTPUTNEW definition, however this has the limitation that if 1 of the 5 macros found resolves, output stops. And this can result in missing macros. So this version over-matches but that appears to be the tradeoff...without making this even more complicated``` \
611
+
```The original version just did an OUTPUTNEW definition, however this has the limitation that if 1 of the 5 macros found resolves, output stops. And this can result in missing macros. So this version over-matches but that appears to be the tradeoff...without making this even more complicated``` \
612
612
| lookup splunkadmins_macros title AS macroName, app AS app_name2, splunk_server OUTPUT definition AS definition2 \
613
613
| lookup splunkadmins_macros title AS macroName, splunk_server OUTPUT definition AS definition3 \
| search ```While an mvmap could replace per-macro that results in a multivalue output. Also replace doesn't handle a multivalued replacement argument so just replace the first macro if it exists with the definitions of all the macros, close enough for what we want``` \
618
+
```While an mvmap could replace per-macro that results in a multivalue output. Also replace doesn't handle a multivalued replacement argument so just replace the first macro if it exists with the definitions of all the macros, close enough for what we want``` \
definition = search ```Set all values to null() in case this macro is called again within the same search. Subsitute a macro used inside a search with the definition found in the lookup file``` \
definition = ```Set all values to null() in case this macro is called again within the same search. Subsitute a macro used inside a search with the definition found in the lookup file``` \
| lookup splunkadmins_macros title AS macroName, app AS app_name, splunk_server \
637
637
| eval app_name2="global" \
638
-
| search ```The original version just did an OUTPUTNEW definition, however this has the limitation that if 1 of the 5 macros found resolves, output stops. And this can result in missing macros. So this version over-matches but that appears to be the tradeoff...without making this even more complicated``` \
638
+
```The original version just did an OUTPUTNEW definition, however this has the limitation that if 1 of the 5 macros found resolves, output stops. And this can result in missing macros. So this version over-matches but that appears to be the tradeoff...without making this even more complicated``` \
639
639
| lookup splunkadmins_macros title AS macroName, app AS app_name2, splunk_server OUTPUT definition AS definition2 \
640
640
| lookup splunkadmins_macros title AS macroName, splunk_server OUTPUT definition AS definition3 \
| search ```While an mvmap could replace per-macro that results in a multivalue output. Also replace doesn't handle a multivalued replacement argument so just replace the first macro if it exists with the definitions of all the macros, close enough for what we want``` \
645
+
```While an mvmap could replace per-macro that results in a multivalue output. Also replace doesn't handle a multivalued replacement argument so just replace the first macro if it exists with the definitions of all the macros, close enough for what we want``` \
| rex field=$search_id$ "(_rt)?(_?subsearch)*_?(?P<from>[^_]+)((_(?P<base64username>[^_]+))|(__(?P<username>[^_]+)))((__(?P<app>[^_]+)__(?P<searchname2>[^_]+))|(_(?P<base64appname>[^_]+)__(?P<searchname>[^_]+)))"\
711
711
| rex field=$search_id$ "^_?(?P<from>SummaryDirector)"\
712
-
| search ```Pattern appears to vary but remote_<hostname>_ is consistent along with the optional _subsearch, the _from can be <username>__ownername__appname__RMD for dashboards as one pattern, it can also be unixepoch (ad-hoc), or scheduler__username__appname (scheduled search), or username__owner__(something)__dashboardview, among others. RMD values can be translated via audit.log, scheduler.log or remote_searches.log (if savedsearch_name is there)!```\
712
+
```Pattern appears to vary but remote_<hostname>_ is consistent along with the optional _subsearch, the _from can be <username>__ownername__appname__RMD for dashboards as one pattern, it can also be unixepoch (ad-hoc), or scheduler__username__appname (scheduled search), or username__owner__(something)__dashboardview, among others. RMD values can be translated via audit.log, scheduler.log or remote_searches.log (if savedsearch_name is there)!```\
definition = eval $afield$=null() | search ```As per https://docs.splunk.com/Documentation/Splunk/latest/Report/Createandeditreports usernames/apps can be base64 encrypted, remove the eval when ready to use this...decrypt2 (splunkbase) can be used to decrypt with (remove the backslashes): eval $afield$=$afield$ . \"===\" | decrypt field=$afield$ atob emit('$afield$')```
720
+
definition = eval $afield$=null() ```As per https://docs.splunk.com/Documentation/Splunk/latest/Report/Createandeditreports usernames/apps can be base64 encrypted, remove the eval when ready to use this...decrypt2 (splunkbase) can be used to decrypt with (remove the backslashes): eval $afield$=$afield$ . "===" | decrypt field=$afield$ atob emit('$afield$')```
721
721
iseval = 0
722
722
723
723
[dashboard_depends_filter1]
724
724
definition = ""
725
725
iseval = 0
726
726
727
727
[dashboard_depends_filter2]
728
-
definition = search ```potentially a where clause to only filter when a certain number of tokens exist...```
728
+
definition = ```potentially a where clause to only filter when a certain number of tokens exist...``` ""
729
729
iseval = 0
730
730
731
731
[dashboard_depends_filter3]
732
-
definition = search ```potentially a where clause to only filter when a certain number of tokens were matched or similar...```
732
+
definition = ```potentially a where clause to only filter when a certain number of tokens were matched or similar...``` ""
| lookup splunkadmins_datamodels datamodel AS datamodel_res, splunk_server OUTPUTNEW definition\
801
801
| nomv definition \
802
802
| eval definition=" " . definition . " "\
803
-
| search ```While an mvmap could replace per-datamodel that results in a multivalue output. Also replace doesn't handle a multivalued replacement argument so just replace the first macro if it exists with the definitions of all the datamodels``` \
803
+
```While an mvmap could replace per-datamodel that results in a multivalue output. Also replace doesn't handle a multivalued replacement argument so just replace the first macro if it exists with the definitions of all the datamodels``` \
0 commit comments