Class MessageInput

java.lang.Object
org.graylog2.plugin.inputs.MessageInput
All Implemented Interfaces:
Stoppable
Direct Known Subclasses:
Beats2Input, BeatsInput, CEFAmqpInput, CEFKafkaInput, CEFTCPInput, CEFUDPInput, FakeHttpMessageInput, GELFAMQPInput, GELFHttpInput, GELFKafkaInput, GELFTCPInput, GELFUDPInput, JsonPathInput, NetFlowUdpInput, RawAMQPInput, RawKafkaInput, RawTCPInput, RawUDPInput, SyslogAMQPInput, SyslogKafkaInput, SyslogTCPInput, SyslogUDPInput

public abstract class MessageInput extends Object implements Stoppable
  • Field Details

  • Constructor Details

  • Method Details

    • getDefaultRecvBufferSize

      public static int getDefaultRecvBufferSize()
    • setDefaultRecvBufferSize

      public static void setDefaultRecvBufferSize(int size)
    • initialize

      public void initialize()
    • checkConfiguration

      public void checkConfiguration() throws ConfigurationException
      Throws:
      ConfigurationException
    • launch

      public void launch(InputBuffer buffer) throws MisfireException
      Throws:
      MisfireException
    • stop

      public void stop()
      Specified by:
      stop in interface Stoppable
    • terminate

      public void terminate()
    • getRequestedConfiguration

      public ConfigurationRequest getRequestedConfiguration()
    • getDescriptor

      public MessageInput.Descriptor getDescriptor()
    • getName

      public String getName()
    • isExclusive

      public boolean isExclusive()
    • getId

      public String getId()
    • getPersistId

      public String getPersistId()
    • setPersistId

      public void setPersistId(String id)
    • getTitle

      public String getTitle()
    • setTitle

      public void setTitle(String title)
    • getCreatorUserId

      public String getCreatorUserId()
    • setCreatorUserId

      public void setCreatorUserId(String creatorUserId)
    • getCreatedAt

      public org.joda.time.DateTime getCreatedAt()
    • setCreatedAt

      public void setCreatedAt(org.joda.time.DateTime createdAt)
    • getConfiguration

      public Configuration getConfiguration()
    • isGlobal

      public Boolean 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 also isGlobal.

      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

      public void setGlobal(Boolean global)
    • getDesiredState

      public IOState.Type getDesiredState()
    • setDesiredState

      public void setDesiredState(IOState.Type newDesiredState)
    • getContentPack

      public String getContentPack()
    • setContentPack

      public void setContentPack(String contentPack)
    • getAttributesWithMaskedPasswords

      @Deprecated public Map<String,Object> getAttributesWithMaskedPasswords()
      Deprecated.
    • asMapMasked

      public Map<String,Object> asMapMasked()
    • asMap

      public Map<String,Object> asMap()
    • addStaticField

      public void addStaticField(String key, String value)
    • addStaticFields

      public void addStaticFields(Map<String,String> staticFields)
    • getStaticFields

      public Map<String,String> getStaticFields()
    • getUniqueReadableId

      public String getUniqueReadableId()
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • getCodec

      public Codec getCodec()
    • processRawMessage

      public void processRawMessage(RawMessage rawMessage)
    • getType

      public String getType()
    • getNodeId

      public String getNodeId()
    • setNodeId

      public void setNodeId(String nodeId)
    • toString

      public String toString()
      Overrides:
      toString in class Object