File tree Expand file tree Collapse file tree 1 file changed +16
-16
lines changed
Expand file tree Collapse file tree 1 file changed +16
-16
lines changed Original file line number Diff line number Diff 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 {
You can’t perform that action at this time.
0 commit comments