NATS
The NATS output plugin lets you flush your records into a NATS Server server endpoint.
Configuration parameters
This plugin supports the following parameters:
host
The IP address or hostname of the NATS server.
127.0.0.1
port
The TCP port of the target NATS server.
4222
Get started
To flush records to a NATS server, you can run the plugin from the command line or through the configuration file.
Command line
If you use the following command without specifying parameter values, Fluent Bit uses the default values defined in the previous section.
fluent-bit -i cpu -o nats -f 5Configuration file
In your main configuration file, append the following:
pipeline:
inputs:
- name: cpu
outputs:
- name: nats
match: '*'
host: 127.0.0.1
port: 4222[INPUT]
Name cpu
[OUTPUT]
Name nats
Match *
Host 127.0.0.1
Port 4222Data format
For every set of records flushed to a NATS server, Fluent Bit uses the following format:
Each record is an individual entity represented in a JSON array that contains a Unix timestamp and a JSON map with a set of key/value pairs. A summarized output of the CPU input plugin will resemble the following:
Last updated
Was this helpful?