Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
PR feedback
  • Loading branch information
aphralG committed Oct 14, 2025
commit b6501d861914ce53be5a3faca8b83acc62c597e9
4 changes: 2 additions & 2 deletions internal/collector/otel_collector_plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -572,7 +572,7 @@ func (oc *Collector) updateNginxAppProtectTcplogReceivers(
oc.config.Collector.Receivers.TcplogReceivers = make(map[string]*config.TcplogReceiver)
}

napSysLogServer := oc.findAvailableSyslogServers(ctx, nginxConfigContext.NAPSysLogServer)
napSysLogServer := oc.findAvailableSyslogServer(ctx, nginxConfigContext.NAPSysLogServer)

if napSysLogServer != "" {
if !oc.doesTcplogReceiverAlreadyExist(napSysLogServer) {
Expand Down Expand Up @@ -705,7 +705,7 @@ func (oc *Collector) updateResourceAttributes(
return actionUpdated
}

func (oc *Collector) findAvailableSyslogServers(ctx context.Context, napSyslogServer string) string {
func (oc *Collector) findAvailableSyslogServer(ctx context.Context, napSyslogServer string) string {
if oc.previousNAPSysLogServer != "" && oc.previousNAPSysLogServer == napSyslogServer {
return oc.previousNAPSysLogServer
}
Expand Down
2 changes: 1 addition & 1 deletion internal/collector/otel_collector_plugin_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -988,7 +988,7 @@ func TestCollector_findAvailableSyslogServers(t *testing.T) {
defer ln.Close()
}

actual := collector.findAvailableSyslogServers(ctx, test.syslogServers)
actual := collector.findAvailableSyslogServer(ctx, test.syslogServers)
assert.Equal(tt, test.expectedSyslogServer, actual)
})
}
Expand Down
2 changes: 1 addition & 1 deletion internal/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@ func registerFlags() {
fs.String(
SyslogServerPort,
DefSyslogServerPort,
"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",
)

registerCommonFlags(fs)
Expand Down
Loading