Prometheus Remote Write
An input plugin to ingest payloads of Prometheus remote write
The Prometheus remote write input plugin lets you ingest a payload in the Prometheus remote-write format. A remote-write sender can transmit data to Fluent Bit.
Configuration parameters
listen
The address to listen on.
0.0.0.0
port
The port to listen on.
8080
buffer_max_size
Specifies the maximum buffer size in KB to receive a JSON message.
4M
buffer_chunk_size
Sets the chunk size for incoming JSON messages. These chunks are then stored and managed in the space specified by buffer_max_size
.
512K
successful_response_code
Specifies the success response code. Supported values are 200
, 201
, and 204
.
201
tag_from_uri
If true, a tag will be created from the uri
parameter (for example, api_prom_push
from /api/prom/push
), and any tag specified in the configuration will be ignored. If false, you must provide a tag in the configuration for this plugin.
true
uri
Specifies an optional HTTP URI for the target web server listening for Prometheus remote write payloads (for example, /api/prom/push
).
none
Configuration file
The following examples are sample configuration files for this input plugin:
pipeline:
inputs:
- name: prometheus_remote_write
listen: 127.0.0.1
port: 8080
uri: /api/prom/push
outputs:
- name: stdout
match: '*'
These sample configurations configure Fluent Bit to listen for data on port 8080
. You can send payloads in Prometheus remote-write format to the endpoint /api/prom/push
.
Examples
Communicate with TLS
The Prometheus remote write input plugin supports TLS and SSL. For more details about the properties available and general configuration, refer to the Transport security documentation.
To communicate with TLS, you must use these TLS-related parameters:
pipeline:
inputs:
- name: prometheus_remote_write
listen: 127.0.0.1
port: 8080
uri: /api/prom/push
tls: on
tls.crt_file: /path/to/certificate.crt
tls.key_file: /path/to/certificate.key
Now, you should be able to send data over TLS to the remote-write input.
Last updated
Was this helpful?