MongoDB
Based on the MongoDB destination of AxoSyslog core.
Example
apiVersion: logging.banzaicloud.io/v1beta1
kind: SyslogNGOutput
metadata:
name: mongodb
namespace: default
spec:
mongodb:
collection: syslog
uri: "mongodb://mongodb-endpoint/syslog?wtimeoutMS=60000&socketTimeoutMS=60000&connectTimeoutMS=60000"
value_pairs: scope("selected-macros" "nv-pairs")
Configuration
collection (string, required)
The name of the MongoDB collection where the log messages are stored (collections are similar to SQL tables). Note that the name of the collection must not start with a dollar sign ($), and that it may contain dot (.) characters.
Default: -
dir (string, optional)
Defines the folder where the disk-buffer files are stored.
Default: -
disk_buffer (*DiskBuffer, optional)
This option enables putting outgoing messages into the disk buffer of the destination to avoid message loss in case of a system failure on the destination side. For details, see the Syslog-ng DiskBuffer options.
Default: false
uri (*secret.Secret, optional)
Connection string used for authentication. See the AxoSyslog Core documentation
Default: mongodb://127.0.0.1:27017/syslog?wtimeoutMS=60000&socketTimeoutMS=60000&connectTimeoutMS=60000
value_pairs (ValuePairs, optional)
Creates structured name-value pairs from the data and metadata of the log message.
Default: “scope(“selected-macros” “nv-pairs”)”
(Batch, required)
Batching parameters
Default: -
(Bulk, required)
Bulk operation related options
Default: -
log-fifo-size (int, optional)
The number of messages that the output queue can store.
Default: -
persist_name (string, optional)
If you receive the following error message during AxoSyslog startup, set the persist-name() option of the duplicate drivers: Error checking the uniqueness of the persist names, please override it with persist-name option. Shutting down.
See syslog-ng docs for more information.
Default: -
retries (int, optional)
The number of times syslog-ng OSE attempts to send a message to this destination. If syslog-ng OSE could not send a message, it will try again until the number of attempts reaches retries, then drops the message.
Default: -
time_reopen (int, optional)
The time to wait in seconds before a dead connection is reestablished.
Default: 60
write_concern (RawString, optional)
Description: Sets the write concern mode of the MongoDB operations, for both bulk and single mode. See the AxoSyslog Core documentation
Default: -
Bulk
Bulk operation related options See AxoSyslog Core documentation
bulk (*bool, optional)
Enables bulk insert mode. If disabled, each messages is inserted individually.
Default: yes
bulk_bypass_validation (*bool, optional)
If set to yes, it disables MongoDB bulk operations validation mode.
Default: no
bulk_unordered (*bool, optional)
Description: Enables unordered bulk operations mode.
Default: no
ValuePairs
TODO move this to a common module once it is used in more places
scope (RawString, optional)
Default: -
exclude (RawString, optional)
Default: -
key (RawString, optional)
Default: -
pair (RawString, optional)
Default: -
RawString
raw_string (string, optional)
Default: -