Skip to content

MongoDB

Write events to MongoDB collections.

Database Enterprise edition json

output:
mongodb:
collection: ~
database: ~
uri: ""
JSON
{
"output": {
"mongodb": {
"collection": null,
"database": null,
"uri": ""
}
}
}

A ✓ marks a field that accepts a context variable such as {{ VARIABLE }}.

Field Type Required Description
insert-one Insert One Insert a single document.
insert-many Insert Many Insert one or many documents. When the selected value is an array, each element is inserted.
replace-one Replace One Replace a single matched document.
update-one Update One Update a single matched document.
Batching
Field Type Required Description
batch Batch Optional output batching hints (used by insert-many).
Connection
Field Type Required Description
uri url (string) MongoDB connection URI.
Examples: https://example.com/path
database string Database name.
collection string Collection name.
Reliability
Field Type Required Description
retry Retry Retry policy for failed writes.
Field Type Required Description
document-field field (string) Optional event field containing the document to insert. Defaults to the entire event.
Examples: data_field
Field Type Required Description
document-field field (string) Optional event field containing the document(s) to insert. Defaults to the entire event.
Examples: data_field
Field Type Required Description
filter-field field (string) Event field that resolves to the filter document.
Examples: data_field
replacement-field field (string) Event field containing replacement document. Defaults to the entire event.
Examples: data_field
upsert boolean (bool) Create the document when no match exists.
Default: false
Field Type Required Description
filter-field field (string) Event field that resolves to the filter document.
Examples: data_field
update-field field (string) Event field containing update document. Defaults to the entire event.
Examples: data_field
upsert boolean (bool) Create the document when no match exists.
Default: false
Field Type Required Description
fixed-size number (integer) maximum number of events in an output batch.
Examples: 42, 1.2e-10
max-bytes number (integer) Close the batch before adding an event that would make the serialized request payload exceed this many bytes.
Examples: 42, 1.2e-10
mode Mode If ‘document’ send on end of document generated by input. If ‘fixed’, use fixed_size.
Allowed values: fixed, document
timeout time-interval (string) interval after which the batch is sent, to keep throughput going (default 100ms).
Default: 100ms
Examples: 500ms, 2h
header multiline-text (string) put a header line before the batch.
footer multiline-text (string) put a header line after the last line of the batch.
use-document-marker boolean (bool) Enrich the job metadata with a document marker (for document handling in batch mode).
Default: false
wrap-as-json boolean (bool) Format the output batch as a JSON array.
Default: false
Field Type Required Description
strategy Strategy Backoff strategy to use (default exponential).
Allowed values: exponential, linear, fixed
base string Base delay before retrying (e.g. “200ms”).
max string Maximum delay between retries.
jitter boolean (bool) Whether to add jitter to retry delays.
Default: false
Field Type Required Description
max-attempts number (integer) Maximum attempts before giving up.
Examples: 42, 1.2e-10
forever boolean (bool) Retry indefinitely until cancelled.
Default: false
backoff Backoff Backoff strategy configuration.
Value Aliases Name Description
fixed fixed
document document
Value Aliases Name Description
exponential exponential
linear linear
fixed fixed