-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Also changed: 1. default standard template to include $MSGHDR 2. Added template for RFC5424 structured data 3. Added fallback template in hec destination
- Loading branch information
mbonsack
authored and
Ryan Faircloth
committed
Aug 6, 2019
1 parent
b6b0b05
commit f472608
Showing
9 changed files
with
385 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,65 @@ | ||
| # =============================================================================================== | ||
| # Juniper Standard and Structured logging | ||
| # =============================================================================================== | ||
|
|
||
| log { | ||
|
|
||
| source(s_default-ports); | ||
|
|
||
| # For newer (structured) format; RFC 5424 compliant. The existing TA will not work for this format; these filters | ||
| # are included for future TA development. The exception is NSM IDP, for which we're awaiting a data | ||
| # sample to confirm that it follows the RFC 5424 format. | ||
| # If it is determined that NSM IDP ("syslog@juniper.net") messages are indeed 3164 format, remove the check for | ||
| # the "syslog@juniper.net" message below. It will then be caught by the standard section following. | ||
|
|
||
| junction { | ||
| channel { | ||
| filter { tags("juniper_structured") or message('junos@2636') or message('syslog@juniper.net'); }; | ||
| parser { syslog-parser(flags(syslog-protocol)); }; | ||
| if (tags("juniper_JunOS_IDP") or program('RT_IDP')) { | ||
| parser {p_add_context_splunk(key("juniper:junos:idp:structured")); }; | ||
| } elif (tags("juniper_JunOS_Firewall") or program('RT_FLOW|RT_IDS|RT_UTM')) { | ||
| parser {p_add_context_splunk(key("juniper:junos:firewall:structured")); }; | ||
| } | ||
| elif (tags("juniper_idp") or program('Jnpr')) { | ||
| parser {p_add_context_splunk(key("juniper:idp:structured")); }; | ||
| } | ||
| else { | ||
| parser {p_add_context_splunk(key("juniper:structured")); }; | ||
| }; | ||
| rewrite { r_set_splunk_basic(template("t_hdr_sdata_msg"))}; | ||
| destination(d_hec); #--HEC-- | ||
| flags(final); | ||
| }; | ||
|
|
||
| # For legacy "standard" format. The existing Juniper TA will work for these data sources. | ||
| # Remove the message filter below when tag support is implemented. | ||
|
|
||
| channel { | ||
| filter { tags("juniper_standard") or message('RT_IDP:|RT_FLOW:|RT_IDS:|RT_UTM:|Juniper:|traffic\,\s+traffic\s+log|syslog@juniper.net|predefined\,\s+|NetScreen\s+device_id\=') }; | ||
| # filter { tags("juniper_standard") }; | ||
| parser { syslog-parser(time-zone(`default-timezone`)); }; | ||
| if (program('RT_IDP')) { | ||
| parser {p_add_context_splunk(key("juniper:junos:idp")); }; | ||
| } elif (program('RT_FLOW|RT_IDS|RT_UTM')) { | ||
| parser {p_add_context_splunk(key("juniper:junos:firewall")); }; | ||
| } elif (program('Juniper')) { | ||
| parser {p_add_context_splunk(key("juniper:sslvpn")); }; | ||
| } elif (message('traffic\,\s+traffic\s+log')) { | ||
| parser {p_add_context_splunk(key("juniper:nsm")); }; | ||
| } elif (message('syslog@juniper.net')) { | ||
| parser {p_add_context_splunk(key("juniper:idp")); }; | ||
| } elif (message('predefined\,\s+')) { | ||
| parser {p_add_context_splunk(key("juniper:nsm:idp")); }; | ||
| } elif (message('NetScreen\s+device_id\=')) { | ||
| parser {p_add_context_splunk(key("juniper:netscreen")); }; | ||
| } | ||
| else { | ||
| parser {p_add_context_splunk(key("juniper:legacy")); }; | ||
| }; | ||
| rewrite { r_set_splunk_basic(template("t_standard")) }; | ||
| destination(d_hec); #--HEC-- | ||
| flags(final); | ||
| }; | ||
| }; | ||
| }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.