Class DBProcessingStatusService

java.lang.Object
org.graylog2.system.processing.DBProcessingStatusService

public class DBProcessingStatusService extends Object
Manages the database collection for processing status.
  • Field Details

  • Constructor Details

  • Method Details

    • all

      public List<ProcessingStatusDto> all()
      Rerturns all existing processing status entries from the database.
      Returns:
      a list of all processing status entries
    • get

      Returns the processing status entry for the calling node.
      Returns:
      the processing status entry or an empty optional if none exists
    • save

      public ProcessingStatusDto save(ProcessingStatusRecorder processingStatusRecorder)
      Create or update (upsert) a processing status entry for the given ProcessingStatusRecorder using the caller's node ID.
      Parameters:
      processingStatusRecorder - the processing recorder object to create/update
      Returns:
      the created/updated entry
    • calculateProcessingState

      public DBProcessingStatusService.ProcessingNodesState calculateProcessingState(TimeRange timeRange)
      Calculates the processing state of all active Graylog nodes in the cluster. This can be used to find out if a certain timerange is already searchable in Elastic / OpenSearch.

      Beware: This only takes the message receive time into account. It doesn't help when log sources send their messages late.

      Returns:
      A combined state of all processing nodes in this cluster. See DBProcessingStatusService.ProcessingNodesState