Class PipelineInterpreter

java.lang.Object
org.graylog.plugins.pipelineprocessor.processors.PipelineInterpreter
All Implemented Interfaces:
MessageProcessor

public class PipelineInterpreter extends Object implements MessageProcessor
  • Constructor Details

  • Method Details

    • process

      public Messages process(Messages messages)
      Specified by:
      process in interface MessageProcessor
      Parameters:
      messages - messages to process
      Returns:
      messages to pass on to the next stage
    • process

      public Messages process(Messages messages, InterpreterListener interpreterListener, PipelineInterpreter.State state)
      Evaluates all pipelines that apply to the given messages, based on the current stream routing of the messages. The processing loops on each single message (passed in or created by pipelines) until the set of streams does not change anymore. No cycle detection is performed.
      Parameters:
      messages - the messages to process through the pipelines
      interpreterListener - a listener which gets called for each processing stage (e.g. to trace execution)
      state - the pipeline/stage/rule/stream connection state to use during processing
      Returns:
      the processed messages
    • potentiallyDropFilteredMessage

      public void potentiallyDropFilteredMessage(Message message)
    • processForPipelines

      public List<Message> processForPipelines(Message message, Set<String> pipelineIds, InterpreterListener interpreterListener, PipelineInterpreter.State state)
      Given a set of pipeline ids, process the given message according to the passed state. This method returns the list of messages produced by the configuration in state, it does not look at the database or any other external resource besides what is being passed as parameters. This can be used to simulate pipelines without having to store them in the database.
      Parameters:
      message - the message to process
      pipelineIds - the ids of the pipelines to resolve and run the message through
      interpreterListener - the listener tracing the execution
      state - the pipeline/stage/rule state to interpret
      Returns:
      the list of messages created during the interpreter run
    • processForResolvedPipelines

      public List<Message> processForResolvedPipelines(Message message, String msgId, Set<Pipeline> pipelines, InterpreterListener interpreterListener, PipelineInterpreter.State state)
    • evaluateStage

      public void evaluateStage(Stage stage, Message message, String msgId, List<Message> result, Set<Pipeline> pipelinesToSkip, InterpreterListener interpreterListener)
    • getRateLimitedLog

      public static com.swrve.ratelimitedlogger.RateLimitedLog getRateLimitedLog(Class clazz)