Skip to content

Commit

Permalink
Merge pull request #299 from splunk/debug/rawmsg
Browse files Browse the repository at this point in the history
Add RAWMSG storage for debugging
  • Loading branch information
Ryan Faircloth authored and GitHub committed Feb 2, 2020
2 parents 04ef223 + 3348868 commit 1008c53
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
1 change: 1 addition & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ services:
- SC4S_LISTEN_PALOALTO_PANOS_TCP_PORT=5005
- SC4S_LISTEN_PFSENSE_TCP_PORT=5006
- SC4S_ARCHIVE_GLOBAL=yes
# - SC4S_SOURCE_STORE_RAWMSG=yes
volumes:
- ./tls:/opt/syslog-ng/tls
splunk:
Expand Down
2 changes: 1 addition & 1 deletion docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ and/or move them to an archival system to avoid exhaustion of disk space.
| SC4S_SOURCE_TCP_IW_SIZE | 20000000 | Initial Window size |
| SC4S_SOURCE_TCP_FETCH_LIMIT | 2000 | Number of events to fetch from server buffer at once |
| SC4S_SOURCE_UDP_SO_RCVBUFF | 425984 | UDP server buffer size in bytes |

| SC4S_SOURCE_STORE_RAWMSG | undefined or "no" | Store unprocessed "on the wire" raw message in the RAWMSG macro for use with the "fallback" sourcetype. Do _not_ set this in production; substantial memory and disk overhead will result. Use for log path/filter development only. |

## Syslog Source TLS Certificate Configuration

Expand Down
1 change: 1 addition & 0 deletions package/etc/conf.d/conflib/_common/templates.conf
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ template t_JSON_3164 {
template('$(format-json --scope rfc3164
--pair PRI="<$PRI>"
--key LEGACY_MSGHDR
--key RAWMSG
--exclude FACILITY
--exclude PRIORITY
)');
Expand Down
8 changes: 4 additions & 4 deletions package/etc/go_templates/source_network.t
Original file line number Diff line number Diff line change
Expand Up @@ -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));
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}}));
};
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));
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}}));
};
rewrite(set_rfc3164_version);
{{ else if eq .parser "rfc5424_strict" }}
Expand Down Expand Up @@ -104,7 +104,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));
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}}));
};
rewrite(set_rfc3164_version);
} elif {
Expand All @@ -118,7 +118,7 @@ source s_{{ .port_id }} {
rewrite(set_cisco_ios);
} else {
parser {
syslog-parser(time-zone({{- getenv "SC4S_DEFAULT_TIMEZONE" "GMT"}}) flags(guess-timezone));
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}}));
};
rewrite(set_rfc3164);
};
Expand Down

0 comments on commit 1008c53

Please sign in to comment.