-
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.
Log previously silent startup config errors as sc4s:events:startup:err and sc4s:events:startup:out. Bump syslog-ng config to 3.25.1 remove version string from templates no longer required add tests to ensure version is bumbed in the future
- Loading branch information
rfaircloth-splunk
committed
Dec 20, 2019
1 parent
c930a66
commit e9cc6f9
Showing
8 changed files
with
82 additions
and
7 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
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,37 @@ | ||
| {{- define "log_path"}} | ||
| log { | ||
| source(s_startup_out); | ||
|
|
||
|
|
||
| rewrite { r_set_splunk_dest_default(sourcetype("sc4s:events"), index("main"))}; | ||
| parser {p_add_context_splunk(key("sc4s_events:startup:out")); }; | ||
|
|
||
| {{- if ((getenv "SC4S_DEST_SPLUNK_HEC_GLOBAL" "yes") | conv.ToBool) or (conv.ToBool (getenv "SC4S_DEST_INTERNAL_EVENTS_HEC" "no") | conv.ToBool) }} | ||
| destination(d_hec_internal); | ||
| {{- end}} | ||
|
|
||
| {{- if eq (getenv "SC4S_DEBUG_STDOUT" "yes") "yes"}} | ||
| destination(d_stdout); | ||
| {{- end}} | ||
|
|
||
| flags(flow-control,final); | ||
| }; | ||
| log { | ||
| source(s_startup_err); | ||
|
|
||
|
|
||
| rewrite { r_set_splunk_dest_default(sourcetype("sc4s:events:startup:err"), index("main"))}; | ||
| parser {p_add_context_splunk(key("sc4s_events")); }; | ||
|
|
||
| {{- if ((getenv "SC4S_DEST_SPLUNK_HEC_GLOBAL" "yes") | conv.ToBool) or (conv.ToBool (getenv "SC4S_DEST_INTERNAL_EVENTS_HEC" "no") | conv.ToBool) }} | ||
| destination(d_hec_internal); | ||
| {{- end}} | ||
|
|
||
| {{- if eq (getenv "SC4S_DEBUG_STDOUT" "yes") "yes"}} | ||
| destination(d_stdout); | ||
| {{- end}} | ||
|
|
||
| flags(flow-control,final); | ||
| }; | ||
| {{- end}} | ||
| {{- tmpl.Exec "log_path" "yes" }} |
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,13 @@ | ||
| source s_startup_out { | ||
| file("/var/log/syslog-ng.out" | ||
| program-override("syslog-ng-config") | ||
| flags(no-hostname,no-parse,assume-utf8) | ||
| ); | ||
|
|
||
| }; | ||
| source s_startup_err { | ||
| file("/var/log/syslog-ng.err" | ||
| program-override("syslog-ng-config") | ||
| flags(no-hostname,no-parse,assume-utf8) | ||
| ); | ||
| }; |
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 |
|---|---|---|
| @@ -1,4 +1,3 @@ | ||
| @version: 3.24 | ||
| filter f_test_test { | ||
| # host("something-*" type(glob)) or | ||
| # netmask(169.254.100.0/24) | ||
|
|
||
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 |
|---|---|---|
| @@ -1,5 +1,3 @@ | ||
| @version: 3.24 | ||
|
|
||
| filter f_test_test { | ||
| host("testvp-*" type(glob)) | ||
| #or netmask(xxx.xxx.xxx.xxx/xx) | ||
|
|
||
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 |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| @version:3.24 | ||
| @version:3.25 | ||
|
|
||
| # syslog-ng configuration file. | ||
| # | ||
|
|
||
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