Class ParseSyslog5424

java.lang.Object
org.apache.nifi.components.AbstractConfigurableComponent
org.apache.nifi.processor.AbstractSessionFactoryProcessor
org.apache.nifi.processor.AbstractProcessor
org.apache.nifi.processors.standard.ParseSyslog5424
All Implemented Interfaces:
org.apache.nifi.components.ConfigurableComponent, org.apache.nifi.processor.Processor

@SideEffectFree @SupportsBatching @InputRequirement(INPUT_REQUIRED) @Tags({"logs","syslog","syslog5424","attributes","system","event","message"}) @CapabilityDescription("Attempts to parse the contents of a well formed Syslog message in accordance to RFC5424 format and adds attributes to the FlowFile for each of the parts of the Syslog message, including Structured Data.Structured Data will be written to attributes as one attribute per item id + parameter see https://tools.ietf.org/html/rfc5424.Note: ParseSyslog5424 follows the specification more closely than ParseSyslog. If your Syslog producer does not follow the spec closely, with regards to using \'-\' for missing header entries for example, those logs will fail with this parser, where they would not fail with ParseSyslog.") @WritesAttribute(attribute="syslog.priority",description="The priority of the Syslog message.") @WritesAttribute(attribute="syslog.severity",description="The severity of the Syslog message derived from the priority.") @WritesAttribute(attribute="syslog.facility",description="The facility of the Syslog message derived from the priority.") @WritesAttribute(attribute="syslog.version",description="The optional version from the Syslog message.") @WritesAttribute(attribute="syslog.timestamp",description="The timestamp of the Syslog message.") @WritesAttribute(attribute="syslog.hostname",description="The hostname or IP address of the Syslog message.") @WritesAttribute(attribute="syslog.appname",description="The appname of the Syslog message.") @WritesAttribute(attribute="syslog.procid",description="The procid of the Syslog message.") @WritesAttribute(attribute="syslog.messageid",description="The messageid the Syslog message.") @WritesAttribute(attribute="syslog.structuredData",description="Multiple entries per structuredData of the Syslog message.") @WritesAttribute(attribute="syslog.sender",description="The hostname of the Syslog server that sent the message.") @WritesAttribute(attribute="syslog.body",description="The body of the Syslog message, everything after the hostname.") @SeeAlso({ListenSyslog.class,ParseSyslog.class,PutSyslog.class}) public class ParseSyslog5424 extends org.apache.nifi.processor.AbstractProcessor
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private Charset
     
    static final org.apache.nifi.components.PropertyDescriptor
     
    static final org.apache.nifi.components.AllowableValue
     
    static final org.apache.nifi.components.PropertyDescriptor
     
    static final org.apache.nifi.components.PropertyDescriptor
     
    static final org.apache.nifi.components.AllowableValue
     
    static final org.apache.nifi.components.AllowableValue
     
     
    private static final List<org.apache.nifi.components.PropertyDescriptor>
     
    (package private) static final org.apache.nifi.processor.Relationship
     
    (package private) static final org.apache.nifi.processor.Relationship
     
    private static final Set<org.apache.nifi.processor.Relationship>
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    private static Map<String,String>
     
    Set<org.apache.nifi.processor.Relationship>
     
    protected List<org.apache.nifi.components.PropertyDescriptor>
     
    void
    onScheduled(org.apache.nifi.processor.ProcessContext context)
     
    void
    onTrigger(org.apache.nifi.processor.ProcessContext context, org.apache.nifi.processor.ProcessSession session)
     

    Methods inherited from class org.apache.nifi.processor.AbstractProcessor

    onTrigger

    Methods inherited from class org.apache.nifi.processor.AbstractSessionFactoryProcessor

    getControllerServiceLookup, getIdentifier, getLogger, getNodeTypeProvider, init, initialize, isConfigurationRestored, isScheduled, toString, updateConfiguredRestoredTrue, updateScheduledFalse, updateScheduledTrue

    Methods inherited from class org.apache.nifi.components.AbstractConfigurableComponent

    customValidate, equals, getPropertyDescriptor, getPropertyDescriptors, getSupportedDynamicPropertyDescriptor, hashCode, onPropertyModified, validate

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface org.apache.nifi.components.ConfigurableComponent

    getPropertyDescriptor, getPropertyDescriptors, onPropertyModified, validate

    Methods inherited from interface org.apache.nifi.processor.Processor

    isStateful, migrateProperties, migrateRelationships
  • Field Details

    • OMIT

      public static final org.apache.nifi.components.AllowableValue OMIT
    • NULL

      public static final org.apache.nifi.components.AllowableValue NULL
    • DASH

      public static final org.apache.nifi.components.AllowableValue DASH
    • CHARSET

      public static final org.apache.nifi.components.PropertyDescriptor CHARSET
    • NIL_POLICY

      public static final org.apache.nifi.components.PropertyDescriptor NIL_POLICY
    • INCLUDE_BODY_IN_ATTRIBUTES

      public static final org.apache.nifi.components.PropertyDescriptor INCLUDE_BODY_IN_ATTRIBUTES
    • PROPERTY_DESCRIPTORS

      private static final List<org.apache.nifi.components.PropertyDescriptor> PROPERTY_DESCRIPTORS
    • REL_FAILURE

      static final org.apache.nifi.processor.Relationship REL_FAILURE
    • REL_SUCCESS

      static final org.apache.nifi.processor.Relationship REL_SUCCESS
    • RELATIONSHIPS

      private static final Set<org.apache.nifi.processor.Relationship> RELATIONSHIPS
    • parser

      private volatile StrictSyslog5424Parser parser
    • charset

      private volatile Charset charset
  • Constructor Details

    • ParseSyslog5424

      public ParseSyslog5424()
  • Method Details

    • getSupportedPropertyDescriptors

      protected List<org.apache.nifi.components.PropertyDescriptor> getSupportedPropertyDescriptors()
      Overrides:
      getSupportedPropertyDescriptors in class org.apache.nifi.components.AbstractConfigurableComponent
    • getRelationships

      public Set<org.apache.nifi.processor.Relationship> getRelationships()
      Specified by:
      getRelationships in interface org.apache.nifi.processor.Processor
      Overrides:
      getRelationships in class org.apache.nifi.processor.AbstractSessionFactoryProcessor
    • onScheduled

      @OnScheduled public void onScheduled(org.apache.nifi.processor.ProcessContext context)
    • onTrigger

      public void onTrigger(org.apache.nifi.processor.ProcessContext context, org.apache.nifi.processor.ProcessSession session) throws org.apache.nifi.processor.exception.ProcessException
      Specified by:
      onTrigger in class org.apache.nifi.processor.AbstractProcessor
      Throws:
      org.apache.nifi.processor.exception.ProcessException
    • convertMap

      private static Map<String,String> convertMap(Map<String,Object> map)