#
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)caPath: Path to CA certificate file
When _id is defined on the index, it will be used as the document id when indexing.
#
Example
Even though this plugin is a sink, it will emit the response from the bulk index request downstream as an event. If not consuming those events, then it is important to declare the stage with outputs: []. Otherwise, LogBus will think this is a misconfigured dead-end.
pipeline:
write-opensearch:
outputs: []
config:
interval: 10
buffer: 1000
endpoint: !!js/function >-
function() {
return 'http://localhost:9200'
}
index: !!js/function >-
function(event) {
return event._index || event.index || 'logbus'
}
ssl:
ca: ~/.certs/ca.pem