-
Notifications
You must be signed in to change notification settings - Fork 101
Add default syslog server #1317
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
napSyslogServersMap := make(map[string]bool) | ||
for _, server := range napSyslogServers { | ||
napSyslogServersMap[server] = true | ||
func (oc *Collector) findAvailableSyslogServers(ctx context.Context, napSyslogServer string) string { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
func (oc *Collector) findAvailableSyslogServers(ctx context.Context, napSyslogServer string) string { | |
func (oc *Collector) findAvailableSyslogServer(ctx context.Context, napSyslogServer string) string { |
internal/config/config.go
Outdated
fs.String( | ||
SyslogServerPort, | ||
DefSyslogServerPort, | ||
"The port Agent will start the syslog server for Nginx App Protect Security violations on", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"The port Agent will start the syslog server for Nginx App Protect Security violations on", | |
"The port Agent will start the syslog server on for logs collection", |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1317 +/- ##
==========================================
+ Coverage 84.88% 84.98% +0.10%
==========================================
Files 100 100
Lines 14520 14522 +2
==========================================
+ Hits 12325 12342 +17
+ Misses 1734 1717 -17
- Partials 461 463 +2
... and 5 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
Proposed changes
Added syslog server port option in agent config
Default value is
1514
, agent will parse the NGINX config for Nap syslog server directives, when one is found agent will check if the host is valid and then check if the port matches the configured syslog server port in the config (or default if not set)If the agent fails to find a valid syslog server it will log the following warning, which contains the configured port
Changed NapSyslogServers in NginxConfigContext to a single value as we no longer allow multiple syslog servers.
Checklist
Before creating a PR, run through this checklist and mark each as complete.
CONTRIBUTING
documentmake install-tools
and have attached any dependency changes to this pull requestREADME.md
)