Skip to content

Commit

Permalink
Update d_hec_debug to use gomplate
Browse files Browse the repository at this point in the history
* Update `d_hec_debug` to use gomplate to pick up post-tempated URL string
  • Loading branch information
Mark Bonsack committed Mar 17, 2020
1 parent ddab7c5 commit 474a81b
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
destination d_hec_debug {
file("/opt/syslog-ng/var/archive/debug/${.splunk.sourcetype}/${HOST}/$YEAR-$MONTH-$DAY-message.log"
template("curl -k -u \"sc4s HEC debug:$(env SPLUNK_HEC_TOKEN)\" \"$(env SPLUNK_HEC_URL)\" -d '$(format-json
template("curl -k -u \"sc4s HEC debug:{{- getenv "SPLUNK_HEC_TOKEN"}}\" \"{{- getenv "SPLUNK_HEC_URL" | strings.ReplaceAll "/services/collector" "" | strings.ReplaceAll "/event" "" | regexp.ReplaceLiteral "[, ]+" "/services/collector/event " }}/services/collector/event\" -d '$(format-json
time=$S_UNIXTIME.$S_MSEC
host=${HOST}
source=${.splunk.source}
Expand Down

0 comments on commit 474a81b

Please sign in to comment.