Skip to content

Commit e59640d

Browse files
committed
add filter
1 parent 4cc242f commit e59640d

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

internal/collector/otel_collector_plugin.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -563,6 +563,15 @@ func (oc *Collector) updateTcplogReceivers(nginxConfigContext *model.NginxConfig
563563
"protocol": "rfc3164",
564564
},
565565
},
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": "'attributes.priority % 8 > 4'",
572+
"drop_ratio": "1.0",
573+
},
574+
},
566575
{
567576
Type: "remove",
568577
Fields: map[string]string{

0 commit comments

Comments
 (0)