Skip to content

Commit

Permalink
Merge pull request #362 from splunk/sources/raw_message
Browse files Browse the repository at this point in the history
Update raw message support for all traffic
  • Loading branch information
Ryan Faircloth authored and GitHub committed Mar 24, 2020
2 parents bc07dc4 + 38ca41b commit 9652d95
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions package/etc/go_templates/source_network.t
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ source s_{{ .port_id }} {
use-dns(no)
use-fqdn(no)
chain-hostnames(off)
flags(no-parse)
flags(no-parse {{- if (conv.ToBool (getenv "SC4S_SOURCE_STORE_RAWMSG" "no")) }} store-raw-message {{- end}})
);
{{- end}}
{{- if or (getenv (print "SC4S_LISTEN_" .port_id "_TCP_PORT")) (eq .port_id "DEFAULT") }}
Expand All @@ -32,7 +32,7 @@ source s_{{ .port_id }} {
use-dns(no)
use-fqdn(no)
chain-hostnames(off)
flags(no-parse)
flags(no-parse {{- if (conv.ToBool (getenv "SC4S_SOURCE_STORE_RAWMSG" "no")) }} store-raw-message {{- end}})
);
{{- end}}
{{- if (conv.ToBool (getenv "SC4S_SOURCE_TLS_ENABLE" "no")) }}
Expand All @@ -48,7 +48,7 @@ source s_{{ .port_id }} {
use-dns(no)
use-fqdn(no)
chain-hostnames(off)
flags(no-parse)
flags(no-parse {{- if (conv.ToBool (getenv "SC4S_SOURCE_STORE_RAWMSG" "no")) }} store-raw-message {{- end}})
tls(allow-compress(yes)
key-file("/opt/syslog-ng/tls/server.key")
cert-file("/opt/syslog-ng/tls/server.pem")
Expand All @@ -60,14 +60,14 @@ source s_{{ .port_id }} {
};
{{ if eq .parser "rfc3164" }}
parser {
syslog-parser(time-zone({{getenv "SC4S_DEFAULT_TIMEZONE" "GMT"}}) flags(guess-timezone {{- if (conv.ToBool (getenv "SC4S_SOURCE_STORE_RAWMSG" "no")) }} store-raw-message {{- end}}));
syslog-parser(time-zone({{getenv "SC4S_DEFAULT_TIMEZONE" "GMT"}}) flags(guess-timezone));
};
rewrite(set_rfc3164);
{{ else if eq .parser "rfc3164_version" }}
# filter(f_rfc3164_version);
rewrite(set_rfc3164_no_version_string);
parser {
syslog-parser(time-zone({{- getenv "SC4S_DEFAULT_TIMEZONE" "GMT"}}) flags(guess-timezone {{- if (conv.ToBool (getenv "SC4S_SOURCE_STORE_RAWMSG" "no")) }} store-raw-message {{- end}}));
syslog-parser(time-zone({{- getenv "SC4S_DEFAULT_TIMEZONE" "GMT"}}) flags(guess-timezone));
};
rewrite(set_rfc3164_version);
{{ else if eq .parser "rfc5424_strict" }}
Expand Down Expand Up @@ -138,7 +138,7 @@ source s_{{ .port_id }} {
filter(f_rfc3164_version);
rewrite(set_rfc3164_no_version_string);
parser {
syslog-parser(time-zone({{- getenv "SC4S_DEFAULT_TIMEZONE" "GMT"}}) flags(guess-timezone {{- if (conv.ToBool (getenv "SC4S_SOURCE_STORE_RAWMSG" "no")) }} store-raw-message {{- end}}));
syslog-parser(time-zone({{- getenv "SC4S_DEFAULT_TIMEZONE" "GMT"}}) flags(guess-timezone));
};
rewrite(set_rfc3164_version);
} elif {
Expand All @@ -149,7 +149,7 @@ source s_{{ .port_id }} {
rewrite(set_rfc5424_noversion);
} else {
parser {
syslog-parser(time-zone({{- getenv "SC4S_DEFAULT_TIMEZONE" "GMT"}}) flags(guess-timezone {{- if (conv.ToBool (getenv "SC4S_SOURCE_STORE_RAWMSG" "no")) }} store-raw-message {{- end}}));
syslog-parser(time-zone({{- getenv "SC4S_DEFAULT_TIMEZONE" "GMT"}}) flags(guess-timezone));
};
rewrite(set_rfc3164);
if {
Expand Down

0 comments on commit 9652d95

Please sign in to comment.