Skip to content

Commit 39df77f

Browse files
committed
merge main
1 parent 1b69bf3 commit 39df77f

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

internal/collector/otel_collector_plugin.go

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -554,24 +554,24 @@ func (oc *Collector) updateNginxAppProtectTcplogReceivers(nginxConfigContext *mo
554554
oc.config.Collector.Receivers.TcplogReceivers["nginx_app_protect"] = &config.TcplogReceiver{
555555
ListenAddress: nginxConfigContext.NAPSysLogServer,
556556
Operators: []config.Operator{
557-
// regex captures the priority number from the log line
558-
{
559-
Type: "regex_parser",
560-
Fields: map[string]string{
561-
"regex": "^<(?P<priority>\\d+)>",
562-
"parse_from": "body",
563-
"parse_to": "attributes",
557+
// regex captures the priority number from the log line
558+
{
559+
Type: "regex_parser",
560+
Fields: map[string]string{
561+
"regex": "^<(?P<priority>\\d+)>",
562+
"parse_from": "body",
563+
"parse_to": "attributes",
564+
},
564565
},
565-
},
566-
// filter drops all logs that have a severity above 4
567-
// https://docs.secureauth.com/0902/en/how-to-read-a-syslog-message.html#severity-code-table
568-
{
569-
Type: "filter",
570-
Fields: map[string]string{
571-
"expr": "'int(attributes.priority) % 8 > 4'",
572-
"drop_ratio": "1.0",
566+
// filter drops all logs that have a severity above 4
567+
// https://docs.secureauth.com/0902/en/how-to-read-a-syslog-message.html#severity-code-table
568+
{
569+
Type: "filter",
570+
Fields: map[string]string{
571+
"expr": "'int(attributes.priority) % 8 > 4'",
572+
"drop_ratio": "1.0",
573+
},
573574
},
574-
},
575575
{
576576
Type: "add",
577577
Fields: map[string]string{

0 commit comments

Comments
 (0)