-
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.
Merge pull request #380 from splunk/feature/f5
Support F5 and fix vmware docs
- Loading branch information
Showing
10 changed files
with
347 additions
and
6 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,53 @@ | ||
| # Vendor - F5 | ||
|
|
||
|
|
||
| ## Product - BigIP | ||
|
|
||
| | Ref | Link | | ||
| |----------------|---------------------------------------------------------------------------------------------------------| | ||
| | Splunk Add-on | https://splunkbase.splunk.com/app/2680/ | | ||
| | Product Manual | unknown | | ||
|
|
||
|
|
||
| ### Sourcetypes | ||
|
|
||
| | sourcetype | notes | | ||
| |----------------|---------------------------------------------------------------------------------------------------------| | ||
| | f5:bigip:syslog | None | | ||
| | f5:bigip:irule | None | | ||
| | nix:syslog | None | | ||
|
|
||
| ### Sourcetype and Index Configuration | ||
|
|
||
| | key | sourcetype | index | notes | | ||
| |----------------|----------------|----------------|----------------| | ||
| | f5_bigip | f5:bigip:syslog | netops | none | | ||
| | f5_bigip_irule | f5:bigip:syslog | netops | none | | ||
| | f5_bigip_nix | nix:syslog | netops | if `f_f5_bigip` is not set the index osnix will be used | | ||
|
|
||
| ### Filter type | ||
|
|
||
| Must be identified by host or ip assignment. Update the filter `f_f5_bigip` or configure a dedicated port as required | ||
|
|
||
| ### Setup and Configuration | ||
|
|
||
| * Install the Splunk Add-on on the search head(s) for the user communities interested in this data source. If SC4S is exclusively used the addon is not required on the indexer. | ||
| * Review and update the splunk_index.csv file and set the index and sourcetype as required for the data source. | ||
| * Refer to the admin manual for specific details of configuration | ||
|
|
||
| ### Options | ||
|
|
||
| | Variable | default | description | | ||
| |----------------|----------------|----------------| | ||
| | SC4S_LISTEN_F5_BIGIP_TCP_PORT | empty string | Enable a TCP port for this specific vendor product using the number defined | | ||
| | SC4S_LISTEN_F5_BIGIP_UDP_PORT | empty string | Enable a UDP port for this specific vendor product using the number defined | | ||
| | SC4S_ARCHIVE_F5_BIGIP | no | Enable archive to disk for this specific source | | ||
| | SC4S_DEST_F5_BIGIP_HEC | no | When Splunk HEC is disabled globally set to yes to enable this specific source | | ||
|
|
||
| ### Verification | ||
|
|
||
| An active device will generate frequent events. Use the following search to validate events are present per source device | ||
|
|
||
| ``` | ||
| index=<asconfigured> sourcetype=f5:bigip:*| stats count by host | ||
| ``` |
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,15 @@ | ||
| filter f_f5_bigip { | ||
| match("^f5_bigip", value("fields.sc4s_vendor_product")); | ||
| }; | ||
| filter f_f5_bigip_message { | ||
| message( | ||
| '^(?i)(<\d+> ?[[:alpha:]]+ \d\d \d\d:\d\d:\d\d +[^ ]+) +(?:notice|err|error|warning|info) +?(.*)' | ||
| flags(store-matches) | ||
| ); | ||
| }; | ||
| parser f_f5_bigip_message { | ||
| syslog-parser( | ||
| template("$1 $2") | ||
| flags(guess-timezone,assume-utf8,{{- if (conv.ToBool (getenv "SC4S_SOURCE_STORE_RAWMSG" "no")) }} store-raw-message {{- end}}) | ||
| ); | ||
| }; |
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,80 @@ | ||
| # F5_BIGIP | ||
| {{- /* The following provides a unique port source configuration if env var(s) are set */}} | ||
| {{- $context := dict "port_id" "F5_BIGIP" "parser" "common" }} | ||
| {{- tmpl.Exec "t/source_network.t" $context }} | ||
|
|
||
| log { | ||
| junction { | ||
| {{- if or (or (getenv (print "SC4S_LISTEN_F5_BIGIP_TCP_PORT")) (getenv (print "SC4S_LISTEN_F5_BIGIP_UDP_PORT"))) (getenv (print "SC4S_LISTEN_F5_BIGIP_TLS_PORT")) }} | ||
| channel { | ||
| # Listen on the specified dedicated port(s) for F5_BIGIP traffic | ||
| source (s_F5_BIGIP); | ||
| flags (final); | ||
| }; | ||
| {{- end}} | ||
| channel { | ||
| # Listen on the default port (typically 514) for F5_BIGIP traffic | ||
| source (s_DEFAULT); | ||
| flags(final); | ||
| }; | ||
| }; | ||
|
|
||
| if { | ||
| filter{ | ||
| program("tmsh") | ||
| or program("mcpd") | ||
| or program("tmm\d?") | ||
| }; | ||
| rewrite { | ||
| set("f5_bigip", value("fields.sc4s_vendor_product")); | ||
| set("${PROGRAM}", value(".PROGRAM")); | ||
| subst('^\/(?:[^\/]+\/)+', "" , value(".PROGRAM")); | ||
| r_set_splunk_dest_default(sourcetype("f5:bigip:syslog"), index("netops"), source("program:${.PROGRAM}")) | ||
| }; | ||
| parser { p_add_context_splunk(key("f5_bigip")); }; | ||
| parser (compliance_meta_by_source); | ||
| rewrite { set("$(template ${.splunk.sc4s_template} $(template t_program_msg))" value("MSG")); }; | ||
| } elif { | ||
| filter { | ||
| program('^,f5_irule') | ||
| }; | ||
| rewrite { | ||
| set("f5_bigip_irule", value("fields.sc4s_vendor_product")); | ||
| r_set_splunk_dest_default(sourcetype("f5:bigip:irule"), index("netops")) | ||
| }; | ||
| parser { p_add_context_splunk(key("f5_bigip_irule")); }; | ||
| parser (compliance_meta_by_source); | ||
| rewrite { set("$(template ${.splunk.sc4s_template} $(template t_legacy_hdr_msg))" value("MSG")); }; | ||
| } elif { | ||
| filter(f_f5_bigip); | ||
| rewrite { | ||
| set("f5_bigip_nix", value("fields.sc4s_vendor_product")); | ||
| subst("^[^\t]+\t", "", value("MESSAGE"), flags("global")); | ||
| set("${PROGRAM}", value(".PROGRAM")); | ||
| subst('^\/(?:[^\/]+\/)+', "" , value(".PROGRAM")); | ||
| r_set_splunk_dest_default(sourcetype("nix:syslog"), index("netops"), source("program:${.PROGRAM}")) | ||
| }; | ||
| parser { p_add_context_splunk(key("f5_bigip")); }; | ||
| parser (compliance_meta_by_source); | ||
| rewrite { set("$(template ${.splunk.sc4s_template} $(template t_program_msg))" value("MSG")); }; | ||
| }; | ||
|
|
||
|
|
||
| {{- if or (conv.ToBool (getenv "SC4S_DEST_SPLUNK_HEC_GLOBAL" "yes")) (conv.ToBool (getenv "SC4S_DEST_F5_BIGIP_HEC" "no")) }} | ||
| destination(d_hec); | ||
| {{- end}} | ||
|
|
||
| {{- if or (conv.ToBool (getenv "SC4S_ARCHIVE_GLOBAL" "no")) (conv.ToBool (getenv "SC4S_ARCHIVE_F5_BIGIP" "no")) }} | ||
| destination(d_archive); | ||
| {{- end}} | ||
|
|
||
| {{- if (print (getenv "SC4S_DEST_GLOBAL_ALTERNATES")) }} | ||
| {{ getenv "SC4S_DEST_GLOBAL_ALTERNATES" | regexp.ReplaceLiteral "^" "destination(" | regexp.ReplaceLiteral "[, ]+" ");\n destination(" }}); | ||
| {{- end }} | ||
|
|
||
| {{- if (print (getenv "SC4S_DEST_F5_BIGIP_ALTERNATES")) }} | ||
| {{ getenv "SC4S_DEST_F5_BIGIP_ALTERNATES" | regexp.ReplaceLiteral "^" "destination(" | regexp.ReplaceLiteral "[, ]+" ");\n destination(" }}); | ||
| {{- end }} | ||
|
|
||
| flags(flow-control,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
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.