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 23, 2025
commit 2300301c220a50f1bea03e224c8eec6ccb7a9695
2 changes: 0 additions & 2 deletions internal/collector/otel_collector_plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -724,8 +724,6 @@ func (oc *Collector) findAvailableSyslogServer(ctx context.Context, napSyslogSer
slog.DebugContext(ctx, "Failed to close syslog server", "address", napSyslogServer, "error", closeError)
}

slog.InfoContext(ctx, "Found valid NAP syslog server", "address", napSyslogServer)

oc.previousNAPSysLogServer = napSyslogServer

return napSyslogServer
Expand Down
15 changes: 9 additions & 6 deletions internal/datasource/config/nginx_config_parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -250,12 +250,6 @@ func (ncp *NginxConfigParser) createNginxConfigContext(
nginxConfigContext.PlusAPIs = append(nginxConfigContext.PlusAPIs, plusAPIs...)
}

if napEnabled && nginxConfigContext.NAPSysLogServer == "" {
slog.WarnContext(ctx, fmt.Sprintf("Could not find available local NGINX App Protect syslog"+
" server configured on port %s. Security violations will not be collected.",
ncp.agentConfig.SyslogServer.Port))
}

fileMeta, err := files.FileMeta(conf.File)
if err != nil {
slog.WarnContext(ctx, "Unable to get file metadata", "file_name", conf.File, "error", err)
Expand All @@ -264,6 +258,15 @@ func (ncp *NginxConfigParser) createNginxConfigContext(
}
}

if napEnabled && nginxConfigContext.NAPSysLogServer == "" {
slog.WarnContext(ctx, fmt.Sprintf("Could not find available local NGINX App Protect syslog"+
" server configured on port %s. Security violations will not be collected.",
ncp.agentConfig.SyslogServer.Port))
} else {
slog.InfoContext(ctx, fmt.Sprintf("Found available local NGINX App Protect syslog"+
"server configured on port %s", ncp.agentConfig.SyslogServer.Port))
}

nginxConfigContext.StubStatus = ncp.FindStubStatusAPI(ctx, nginxConfigContext)
nginxConfigContext.PlusAPI = ncp.FindPlusAPI(ctx, nginxConfigContext)

Expand Down
Loading