[ 
https://issues.apache.org/jira/browse/NIFI-5325?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16518570#comment-16518570
 ] 

ASF GitHub Bot commented on NIFI-5325:
--------------------------------------

Github user ottobackwards commented on a diff in the pull request:

    https://github.com/apache/nifi/pull/2805#discussion_r196932588
  
    --- Diff: 
nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/syslog/StrictSyslog5424Parser.java
 ---
    @@ -0,0 +1,210 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one or more
    + * contributor license agreements.  See the NOTICE file distributed with
    + * this work for additional information regarding copyright ownership.
    + * The ASF licenses this file to You under the Apache License, Version 2.0
    + * (the "License"); you may not use this file except in compliance with
    + * the License.  You may obtain a copy of the License at
    + *
    + *     http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing, software
    + * distributed under the License is distributed on an "AS IS" BASIS,
    + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    + * See the License for the specific language governing permissions and
    + * limitations under the License.
    + */
    +package org.apache.nifi.processors.standard.syslog;
    +
    +import com.github.palindromicity.syslog.DefaultKeyProvider;
    +import com.github.palindromicity.syslog.KeyProvider;
    +import com.github.palindromicity.syslog.NilPolicy;
    +import com.github.palindromicity.syslog.SyslogParserBuilder;
    +
    +import java.nio.ByteBuffer;
    +import java.nio.charset.Charset;
    +import java.nio.charset.StandardCharsets;
    +import java.util.HashMap;
    +import java.util.Map;
    +import java.util.regex.Pattern;
    +
    +/**
    + * Parses a Syslog message from a ByteBuffer into a SyslogEvent instance.
    + *
    + * The Syslog regular expressions below were adapted from the Apache Flume 
project for RFC3164 logs.
    --- End diff --
    
    sorry, leftover from my initial SyslogParser modifications


> Need a Syslog Parser that fully supports the 5424 Spec
> ------------------------------------------------------
>
>                 Key: NIFI-5325
>                 URL: https://issues.apache.org/jira/browse/NIFI-5325
>             Project: Apache NiFi
>          Issue Type: New Feature
>            Reporter: Otto Fowler
>            Assignee: Otto Fowler
>            Priority: Major
>
> from NIFI-5139
> "The Structured Data as described in 
> [https://tools.ietf.org/html/rfc5424#section-6.3] are not read by Nifi.
>  
> I suggest the SD to be put in attributes, prefixed by the ID:
> [exampleSDID@32473 iut="3" eventSource="Application" eventID="1011"]
> to become 3 attributes
>  * exampleSID@32473-iut = 3
>  * exampleSID@32473-eventSource=Application
>  * exampleSID@32473-eventID=1011
>  
> This could be useful to preprocess RFC5424 message, prioritize or route them."
>  
> Nifi should a have a parser to fully support the spec and structured data.
> Since integrating it, and special casing the existing parser would 
> simnifically complicate that processor and move it from it's least common 
> denominator goal, it should be a new parser
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to