write-opensearch

Buffer events until buffer or interval seconds and then ship them to endpoint() in index() using the /_bulk API.

Config

Required:

  • index: Function that returns the index name (async not supported)

Optional:

  • endpoint: Function that returns server endpoint (default: http://localhost:9200)
  • buffer: Number of events to buffer before shipping (default: 1000)
  • interval: Number of seconds between shipments (default: 60)
  • ca-path: Path to CA certificate file (not yet implemented)

Example

pipeline:
  write-opensearch:
    outputs: []
    config:
      endpoint: !!js/function >-
        () => 'http://localhost:9200'
      index: !!js/function >-
        (event) => event._index ?? event.index ?? 'logbus'
      interval: 10
      buffer: 1000
      ssl:
        ca: ~/.certs/ca.pem