Skip to content

Commit 5fedd4e

Browse files
cosmo0920Pat
andauthored
in_prometheus_remote_write: Add documentation for input plugin of prometheus remote write (#1363)
* in_prometheus_remote_write: Add documentation for input plugin of prometheus remote write Signed-off-by: Hiroshi Hatake <[email protected]> * Update pipeline/inputs/prometheus-remote-write.md Co-authored-by: Pat <[email protected]> Signed-off-by: Hiroshi Hatake <[email protected]> * Address comments Signed-off-by: Hiroshi Hatake <[email protected]> * Use prometheus endpoint like example in a parameter description Signed-off-by: Hiroshi Hatake <[email protected]> * in_prometheus_remote_write: Use 8080 as a default port number Signed-off-by: Hiroshi Hatake <[email protected]> * in_prometheus_remote_write: Add example TLS enabled configuration Signed-off-by: Hiroshi Hatake <[email protected]> * in_prometheus_remote_write: Add more descriptions for prioritized conditions Signed-off-by: Hiroshi Hatake <[email protected]> * Update pipeline/inputs/prometheus-remote-write.md Co-authored-by: Pat <[email protected]> Signed-off-by: Hiroshi Hatake <[email protected]> * transport-security: in_prometheus_remite_write: Add mention for transport-security Signed-off-by: Hiroshi Hatake <[email protected]> * Apply suggestions Co-authored-by: Pat <[email protected]> Signed-off-by: Hiroshi Hatake <[email protected]> --------- Signed-off-by: Hiroshi Hatake <[email protected]> Co-authored-by: Pat <[email protected]>
1 parent 100aed5 commit 5fedd4e

File tree

3 files changed

+79
-0
lines changed

3 files changed

+79
-0
lines changed

SUMMARY.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@
106106
* [Process Log Based Metrics](pipeline/inputs/process.md)
107107
* [Process Exporter Metrics](pipeline/inputs/process-exporter-metrics.md)
108108
* [Prometheus Scrape Metrics](pipeline/inputs/prometheus-scrape-metrics.md)
109+
* [Prometheus Remote Write](pipeline/inputs/prometheus-remote-write.md)
109110
* [Random](pipeline/inputs/random.md)
110111
* [Serial Interface](pipeline/inputs/serial-interface.md)
111112
* [Splunk](pipeline/inputs/splunk.md)

administration/transport-security.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ The following **input** plugins can take advantage of the TLS feature:
6565
* [NGINX Exporter Metrics](../pipeline/inputs/nginx.md)
6666
* [OpenTelemetry](../pipeline/inputs/opentelemetry.md)
6767
* [Prometheus Scrape Metrics](../pipeline/inputs/prometheus-scrape-metrics.md)
68+
* [Prometheus Remote Write](../pipeline/inputs/prometheus-remote-write.md)
6869
* [Splunk (HTTP HEC)](../pipeline/inputs/splunk.md)
6970
* [Syslog](../pipeline/inputs/syslog.md)
7071
* [TCP](../pipeline/inputs/tcp.md)
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
---
2+
description: An input plugin to ingest payloads of Prometheus remote write
3+
---
4+
5+
# Prometheus Remote Write
6+
7+
This input plugin allows you to ingest a payload in the Prometheus remote-write format, i.e. a remote write sender can transmit data to Fluent Bit.
8+
9+
## Configuration
10+
11+
| Key | Description | default |
12+
| ----------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | ------- |
13+
| listen | The address to listen on | 0.0.0.0 |
14+
| port | The port for Fluent Bit to listen on | 8080 |
15+
| buffer\_max\_size | Specify the maximum buffer size in KB to receive a JSON message. | 4M |
16+
| buffer\_chunk\_size | This sets the chunk size for incoming incoming JSON messages. These chunks are then stored/managed in the space available by buffer_max_size. | 512K |
17+
|successful\_response\_code | It allows to set successful response code. `200`, `201` and `204` are supported.| 201 |
18+
| tag\_from\_uri | If true, tag will be created from uri, e.g. api\_prom\_push from /api/prom/push, and any tag specified in the config will be ignored. If false then a tag must be provided in the config for this input. | true |
19+
20+
21+
22+
A sample config file to get started will look something like the following:
23+
24+
25+
{% tabs %}
26+
{% tab title="fluent-bit.conf" %}
27+
```
28+
[INPUT]
29+
name prometheus_remote_write
30+
listen 127.0.0.1
31+
port 8080
32+
uri /api/prom/push
33+
34+
[OUTPUT]
35+
name stdout
36+
match *
37+
```
38+
{% endtab %}
39+
40+
{% tab title="fluent-bit.yaml" %}
41+
```yaml
42+
pipeline:
43+
inputs:
44+
- name: prometheus_remote_write
45+
listen: 127.0.0.1
46+
port: 8080
47+
uri: /api/prom/push
48+
outputs:
49+
- name: stdout
50+
match: '*'
51+
```
52+
{% endtab %}
53+
{% endtabs %}
54+
55+
With the above configuration, Fluent Bit will listen on port `8080` for data.
56+
You can now send payloads in Prometheus remote write format to the endpoint `/api/prom/push`.
57+
58+
## Examples
59+
60+
### Communicate with TLS
61+
62+
Prometheus Remote Write input plugin supports TLS/SSL, for more details about the properties available and general configuration, please refer to the [TLS/SSL](../../administration/transport-security.md) section.
63+
64+
Communicating with TLS, you will need to use the tls related parameters:
65+
66+
```
67+
[INPUT]
68+
Name prometheus_remote_write
69+
Listen 127.0.0.1
70+
Port 8080
71+
Uri /api/prom/push
72+
Tls On
73+
tls.crt_file /path/to/certificate.crt
74+
tls.key_file /path/to/certificate.key
75+
```
76+
77+
Now, you should be able to send data over TLS to the remote write input.

0 commit comments

Comments
 (0)