Package org.graylog2.plugin.inputs
Class MessageInput
java.lang.Object
org.graylog2.plugin.inputs.MessageInput
- All Implemented Interfaces:
Stoppable
- Direct Known Subclasses:
AWSInput
,Beats2Input
,BeatsInput
,CEFAmqpInput
,CEFKafkaInput
,CEFTCPInput
,CEFUDPInput
,CloudTrailInput
,FakeHttpMessageInput
,GELFAMQPInput
,GELFHttpInput
,GELFKafkaInput
,GELFTCPInput
,GELFUDPInput
,IpfixUdpInput
,JsonPathInput
,NetFlowUdpInput
,PaloAlto9xInput
,PaloAltoTCPInput
,RawAMQPInput
,RawKafkaInput
,RawTCPInput
,RawUDPInput
,SyslogAMQPInput
,SyslogKafkaInput
,SyslogTCPInput
,SyslogUDPInput
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
static class
static interface
-
Field Summary
Modifier and TypeFieldDescriptionprotected final Configuration
protected String
protected org.joda.time.DateTime
protected String
protected IOState.Type
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
protected Boolean
protected InputBuffer
protected String
protected String
-
Constructor Summary
ConstructorDescriptionMessageInput
(com.codahale.metrics.MetricRegistry metricRegistry, Configuration configuration, Transport transport, LocalMetricRegistry localRegistry, Codec codec, MessageInput.Config config, MessageInput.Descriptor descriptor, ServerStatus serverStatus) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addStaticField
(String key, String value) void
addStaticFields
(Map<String, String> staticFields) asMap()
void
boolean
Deprecated.getCodec()
org.joda.time.DateTime
static int
getId()
getName()
getTitle()
getType()
int
hashCode()
void
boolean
boolean
boolean
isGlobal()
void
launch
(InputBuffer buffer) Deprecated.void
launch
(InputBuffer buffer, InputFailureRecorder inputFailureRecorder) boolean
Determines if Graylog should only launch a single instance of this input at a time in the cluster.void
processRawMessage
(RawMessage rawMessage) void
setContentPack
(String contentPack) void
setCreatedAt
(org.joda.time.DateTime createdAt) void
setCreatorUserId
(String creatorUserId) static void
setDefaultRecvBufferSize
(int size) void
setDesiredState
(IOState.Type newDesiredState) void
void
void
setPersistId
(String id) void
void
stop()
void
toString()
-
Field Details
-
FIELD_ID
- See Also:
-
FIELD_TYPE
- See Also:
-
FIELD_NODE_ID
- See Also:
-
FIELD_NAME
- See Also:
-
FIELD_TITLE
- See Also:
-
FIELD_CONFIGURATION
- See Also:
-
FIELD_CREATOR_USER_ID
- See Also:
-
FIELD_CREATED_AT
- See Also:
-
FIELD_STARTED_AT
- See Also:
-
FIELD_ATTRIBUTES
- See Also:
-
FIELD_STATIC_FIELDS
- See Also:
-
FIELD_GLOBAL
- See Also:
-
FIELD_DESIRED_STATE
- See Also:
-
FIELD_CONTENT_PACK
- See Also:
-
title
-
creatorUserId
-
persistId
-
createdAt
protected org.joda.time.DateTime createdAt -
global
-
desiredState
-
contentPack
-
configuration
-
inputBuffer
-
-
Constructor Details
-
MessageInput
public MessageInput(com.codahale.metrics.MetricRegistry metricRegistry, Configuration configuration, Transport transport, LocalMetricRegistry localRegistry, Codec codec, MessageInput.Config config, MessageInput.Descriptor descriptor, ServerStatus serverStatus)
-
-
Method Details
-
getDefaultRecvBufferSize
public static int getDefaultRecvBufferSize() -
setDefaultRecvBufferSize
public static void setDefaultRecvBufferSize(int size) -
initialize
public void initialize() -
checkConfiguration
- Throws:
ConfigurationException
-
launch
public void launch(InputBuffer buffer, InputFailureRecorder inputFailureRecorder) throws MisfireException - Throws:
MisfireException
-
launch
Deprecated.- Throws:
MisfireException
-
stop
public void stop() -
terminate
public void terminate() -
getRequestedConfiguration
-
getDescriptor
-
getName
-
isExclusive
public boolean isExclusive() -
getId
-
getPersistId
-
setPersistId
-
getTitle
-
setTitle
-
getCreatorUserId
-
setCreatorUserId
-
getCreatedAt
public org.joda.time.DateTime getCreatedAt() -
setCreatedAt
public void setCreatedAt(org.joda.time.DateTime createdAt) -
getConfiguration
-
isGlobal
-
onlyOnePerCluster
public boolean onlyOnePerCluster()Determines if Graylog should only launch a single instance of this input at a time in the cluster.This might be useful for an input which polls data from an external source and maintains local state, i.e. a cursor, to determine records have been fetched already. In that case, running a second instance of the input at the same time on a different node in the cluster might then lead to the same data fetched again, which would produce duplicate log messages in Graylog.
Returning
true
from this method will only really make sense if the input alsoisGlobal
.- Returns:
true
if only a single instance of the input should be launched in the cluster. It will be launched on the leader node.false
otherwise
-
setGlobal
-
getDesiredState
-
setDesiredState
-
getContentPack
-
setContentPack
-
getAttributesWithMaskedPasswords
Deprecated. -
asMapMasked
-
asMap
-
addStaticField
-
addStaticFields
-
getStaticFields
-
getUniqueReadableId
-
hashCode
public int hashCode() -
equals
-
getCodec
-
processRawMessage
-
getType
-
getNodeId
-
setNodeId
-
isCloudCompatible
public boolean isCloudCompatible() -
isForwarderCompatible
public boolean isForwarderCompatible() -
toString
-
toIdentifier
-