Have inputs.conf files in multiple directories that needs to match and parse each stanza and modify the index= to index=secure. This are files type in inputs.conf and also do run the script to locate the inputs file in this dir (_GWAS_pr_linux_t1/local/inputs.conf) to modify the index
[monitor:///var/log/messages]
index=BDBD_np
sourcetype=syslog
[monitor:///var/log/cron]
index=NDNW_np
sourcetype=syslog
[monitor:///var/log/maillog]
index=BSKX_np
sourcetype=syslog
[monitor:///var/log/secure]
index=NDNDK_np
sourcetype=syslog
[monitor:///var/log/spooler]
index=DNWN_np
sourcetype=syslog
[monitor:///var/log/audit/audit.log]
index=XBJB_np
sourcetype=syslog
sed -i -e 's/.*(?s)((\[monitor\:\/\/\/var\/log\/messages|secure\]).*?)(?:(?:\r*\n){2})' /index=secure *linux*/local/inputs.conf
############################
match each stanza and modify index name to index=windows
inputs file in this dir (_GWAS_pr_window_t1/local/inputs.conf)
[WinEventLog://Application]
checkpointInterval = 5
current_only = 0
disabled =0
start_from = oldest
index =
[WinEventLog://Security]
checkpointInterval = 5
current_only = 0
disabled =0
start_from = oldest
index =
[WinEventLog://System]
checkpointInterval = 5
current_only = 0
disabled =0
start_from = oldest
index =
[WinEventLog://ForwardedEvents]
checkpointInterval = 5
current_only = 0
disabled =0
start_from = oldest
index =
[WinEventLog://Setup]
checkpointInterval = 5
current_only = 0
disabled =0
start_from = oldest
index =
sed -i -e 's/.*(?s)((\[WinEventLog:\/\/Application|Security|System|ForwardedEvents|Setup\]).*?)(?:(?:\r\n){2}) /index=window *window*/local/inputs.conf