NATS

The NATS output plugin lets you flush your records into a NATS Serverarrow-up-right server endpoint.

Configuration parameters

This plugin supports the following parameters:

Key
Description
Default

host

The IP address or hostname of the NATS server.

127.0.0.1

port

The TCP port of the target NATS server.

4222

workers

The number of workers to perform flush operations for this output.

0

circle-info

To override the default configuration values, this plugin uses the optional Fluent Bit network address format (for example, nats://host:port).

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 5

Configuration file

In your main configuration file, append the following:

pipeline:
  inputs:
    - name: cpu

  outputs:
    - name: nats
      match: '*'
      host: 127.0.0.1
      port: 4222

Data 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?