Skip to content

Commit

Permalink
Update source_network.t
Browse files Browse the repository at this point in the history
  • Loading branch information
rfaircloth-splunk committed Apr 2, 2020
1 parent 5ccc40e commit ab87f12
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions package/etc/go_templates/source_network.t
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
syslog (
transport("udp")
so-reuseport(1)
persist-name("{{.port_id}}{{.instance}}")
persist-name("{{ .port_id }}{{ .instance }}")
port({{ getenv (print "SC4S_LISTEN_" .port_id "_UDP_PORT") "514" }})
ip-protocol(4)
so-rcvbuf({{getenv "SC4S_SOURCE_UDP_SO_RCVBUFF" "1703936"}})
Expand All @@ -23,8 +23,9 @@ source s_{{ .port_id }} {
channel {
source {
{{- if or (getenv (print "SC4S_LISTEN_" .port_id "_UDP_PORT")) (eq .port_id "DEFAULT") }}
{{- $port_id := .port_id }}
{{- range (math.Seq (getenv "SC4S_SOURCE_LISTEN_UDP_SOCKETS" "5"))}}
{{- $context := dict "instance" . "port_id" "DEFAULT" }}
{{- $context := dict "instance" . "port_id" $port_id }}
{{- template "UDP" $context }}
{{- end}}
{{- end}}
Expand Down

0 comments on commit ab87f12

Please sign in to comment.