@InputRequirement(value=INPUT_FORBIDDEN) @Tags(value={"listen","beats","tcp","logs"}) @CapabilityDescription(value="Listens for messages sent by libbeat compatible clients (e.g. filebeats, metricbeats, etc) using Libbeat\'s \'output.logstash\', writing its JSON formatted payload to the content of a FlowFile.This processor replaces the now deprecated/removed ListenLumberjack") @WritesAttribute(attribute="beats.sender",description="The sending host of the messages.") @WritesAttribute(attribute="beats.port",description="The sending port the messages were received over.") @WritesAttribute(attribute="beats.sequencenumber",description="The sequence number of the message. Only included if <Batch Size> is 1.") @WritesAttribute(attribute="mime.type",description="The mime.type of the content which is application/json") @SeeAlso(classNames="org.apache.nifi.processors.standard.ParseSyslog") public class ListenBeats extends AbstractProcessor
| Modifier and Type | Class and Description |
|---|---|
static class |
ListenBeats.beatsAttributes |
| Modifier and Type | Field and Description |
|---|---|
static PropertyDescriptor |
CLIENT_AUTH |
protected List<PropertyDescriptor> |
descriptors |
protected BlockingQueue<BeatsMessage> |
errorEvents |
protected EventBatcher<BeatsMessage> |
eventBatcher |
protected BlockingQueue<BeatsMessage> |
events |
protected org.apache.nifi.event.transport.EventServer |
eventServer |
protected byte[] |
messageDemarcatorBytes |
protected int |
port |
static Relationship |
REL_SUCCESS |
protected Set<Relationship> |
relationships |
static PropertyDescriptor |
SSL_CONTEXT_SERVICE |
| Constructor and Description |
|---|
ListenBeats() |
| Modifier and Type | Method and Description |
|---|---|
protected Collection<ValidationResult> |
customValidate(ValidationContext validationContext) |
protected Map<String,String> |
getAttributes(FlowFileEventBatch<BeatsMessage> batch) |
private EventBatcher<BeatsMessage> |
getEventBatcher() |
private String |
getMessageDemarcator(ProcessContext context) |
Set<Relationship> |
getRelationships() |
List<PropertyDescriptor> |
getSupportedPropertyDescriptors() |
protected String |
getTransitUri(FlowFileEventBatch<BeatsMessage> batch) |
protected void |
init(ProcessorInitializationContext context) |
void |
onScheduled(ProcessContext context) |
void |
onTrigger(ProcessContext context,
ProcessSession session) |
private void |
processEvents(ProcessSession session,
Map<String,FlowFileEventBatch<BeatsMessage>> batches) |
void |
stopped() |
onTriggergetControllerServiceLookup, getIdentifier, getLogger, getNodeTypeProvider, initialize, isConfigurationRestored, isScheduled, toString, updateConfiguredRestoredTrue, updateScheduledFalse, updateScheduledTrueequals, getPropertyDescriptor, getPropertyDescriptors, getSupportedDynamicPropertyDescriptor, hashCode, onPropertyModified, validateclone, finalize, getClass, notify, notifyAll, wait, wait, waitisStatefulgetPropertyDescriptor, getPropertyDescriptors, onPropertyModified, validatepublic static final PropertyDescriptor SSL_CONTEXT_SERVICE
public static final PropertyDescriptor CLIENT_AUTH
public static final Relationship REL_SUCCESS
protected List<PropertyDescriptor> descriptors
protected Set<Relationship> relationships
protected volatile int port
protected volatile BlockingQueue<BeatsMessage> events
protected volatile BlockingQueue<BeatsMessage> errorEvents
protected volatile org.apache.nifi.event.transport.EventServer eventServer
protected volatile byte[] messageDemarcatorBytes
protected volatile EventBatcher<BeatsMessage> eventBatcher
protected void init(ProcessorInitializationContext context)
init in class AbstractSessionFactoryProcessorprotected Collection<ValidationResult> customValidate(ValidationContext validationContext)
customValidate in class AbstractConfigurableComponentpublic final Set<Relationship> getRelationships()
getRelationships in interface ProcessorgetRelationships in class AbstractSessionFactoryProcessorpublic List<PropertyDescriptor> getSupportedPropertyDescriptors()
getSupportedPropertyDescriptors in class AbstractConfigurableComponent@OnScheduled public void onScheduled(ProcessContext context) throws IOException
IOExceptionpublic void onTrigger(ProcessContext context, ProcessSession session) throws ProcessException
onTrigger in class AbstractProcessorProcessException@OnStopped public void stopped()
private void processEvents(ProcessSession session, Map<String,FlowFileEventBatch<BeatsMessage>> batches)
protected String getTransitUri(FlowFileEventBatch<BeatsMessage> batch)
protected Map<String,String> getAttributes(FlowFileEventBatch<BeatsMessage> batch)
private String getMessageDemarcator(ProcessContext context)
private EventBatcher<BeatsMessage> getEventBatcher()
Copyright © 2022 Apache NiFi Project. All rights reserved.