You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: pipeline/outputs/prometheus-remote-write.md
+47-45Lines changed: 47 additions & 45 deletions
Original file line number
Diff line number
Diff line change
@@ -2,34 +2,38 @@
2
2
description: An output plugin to submit Prometheus Metrics using the remote write protocol
3
3
---
4
4
5
-
# Prometheus Remote Write
6
-
7
-
The prometheus remote write plugin allows you to take metrics from Fluent Bit and submit them to a Prometheus server through the remote write mechanism.
8
-
9
-
Important Note: The prometheus exporter only works with metric plugins, such as Node Exporter Metrics
| AWS\_Service | For Amazon Managed Service for Prometheus, the service name is aps | aps |
18
-
| AWS\_Region | Region of your Amazon Managed Service for Prometheus workspace ||
19
-
| AWS\_STS\_Endpoint | Specify the custom sts endpoint to be used with STS API, used with the AWS_Role_ARN option, used by SigV4 authentication ||
20
-
| AWS\_Role\_ARN | AWS IAM Role to assume, used by SigV4 authentication ||
21
-
| AWS\_External\_ID | External ID for the AWS IAM Role specified with `aws_role_arn`, used by SigV4 authentication ||
22
-
| port | TCP port of the target HTTP Server | 80 |
23
-
| proxy | Specify an HTTP Proxy. The expected format of this value is `http://HOST:PORT`. Note that HTTPS is **not** currently supported. It is recommended not to set this and to configure the [HTTP proxy environment variables](https://docs.fluentbit.io/manual/administration/http-proxy) instead as they support both HTTP and HTTPS. ||
24
-
| uri | Specify an optional HTTP URI for the target web server, e.g: /something | / |
25
-
| header | Add a HTTP header key/value pair. Multiple headers can be set. ||
26
-
| log_response_payload | Log the response payload within the Fluent Bit log | false |
27
-
| add_label | This allows you to add custom labels to all metrics exposed through the prometheus exporter. You may have multiple of these fields ||
28
-
| workers | The number of [workers](../../administration/multithreading.md#outputs) to perform flush operations for this output. |`2`|
29
-
30
-
## Getting Started
31
-
32
-
The Prometheus remote write plugin only works with metrics collected by one of the metric input plugins. In the following example, host metrics are collected by the node exporter metrics plugin and then delivered by the prometheus remote write output plugin.
5
+
# Prometheus remote write
6
+
7
+
The _Prometheus remote write_ plugin lets you take metrics from Fluent Bit and submit them to a Prometheus server through the remote write mechanism.
8
+
9
+
The Prometheus exporter works only with metric plugins, such as Node Exporter Metrics.
10
+
11
+
## Configuration parameters
12
+
13
+
This plugin supports the following parameters:
14
+
15
+
| Key | Description | Default |
16
+
|-----|-------------|---------|
17
+
|`host`| IP address or hostname of the target HTTP server. |`127.0.0.1`|
18
+
|`http_user`| Basic Auth username. |_none_|
19
+
|`http_passwd`| Basic Auth Password. Requires `HTTP_user` to be set. |_none_|
|`AWS_Service`| For Amazon Managed Service for Prometheus, the service name is `aps`. |`aps`|
22
+
|`AWS_Region`| Region of your Amazon Managed Service for Prometheus workspace. |_none_|
23
+
|`AWS_STS_Endpoint`| Specify the custom STS endpoint to be used with STS API, used with the `AWS_Role_ARN` option, used by SigV4 authentication. |_none_|
24
+
|`AWS_Role_ARN`| AWS IAM Role to assume, used by SigV4 authentication. |_none_|
25
+
|`AWS_External_ID`| External ID for the AWS IAM Role specified with `aws_role_arn`, used by SigV4 authentication. |_none_|
26
+
|`port`| TCP port of the target HTTP server. |`80`|
27
+
|`proxy`| Specify an HTTP proxy. The expected format of this value is `http://HOST:PORT`. HTTPS isn't supported. Configure the [HTTP proxy environment variables](https://docs.fluentbit.io/manual/administration/http-proxy) instead as they support both HTTP and HTTPS. |_none_|
28
+
|`uri`| Specify an optional HTTP URI for the target web server. For example: `/someuri`|`/`|
29
+
|`header`| Add a HTTP header key/value pair. Multiple headers can be set. |_none_|
30
+
|`log_response_payload`| Log the response payload within the Fluent Bit log. |`false`|
31
+
|`add_label`| This lets you add custom labels to all metrics exposed through the Prometheus exporter. You can have multiple of these fields. |_none_|
32
+
|`workers`| The number of [workers](../../administration/multithreading.md#outputs) to perform flush operations for this output. |`2`|
33
+
34
+
## Get started
35
+
36
+
The Prometheus remote write plugin works only with metrics collected by one of the metric input plugins. In the following example, host metrics are collected by the node exporter metrics plugin and then delivered by the Prometheus remote write output plugin.
33
37
34
38
{% tabs %}
35
39
{% tab title="fluent-bit.yaml" %}
@@ -40,10 +44,10 @@ The Prometheus remote write plugin only works with metrics collected by one of t
40
44
# The following example collects host metrics on Linux and delivers
41
45
# them through the Prometheus remote write plugin to new relic :
42
46
#
43
-
service:
47
+
service:
44
48
flush: 1
45
49
log_level: info
46
-
50
+
47
51
pipeline:
48
52
inputs:
49
53
- name: node_exporter_metrics
@@ -64,7 +68,6 @@ pipeline:
64
68
add_label:
65
69
- app fluent-bit
66
70
- color blue
67
-
68
71
# Note : it would be necessary to replace both YOUR_DATA_SOURCE_NAME and YOUR_LICENSE_KEY
69
72
# with real values for this example to work.
70
73
```
@@ -110,12 +113,11 @@ pipeline:
110
113
111
114
## Examples
112
115
113
-
The following are examples of using Prometheus remote write with hosted services below
116
+
The following are examples of using Prometheus remote write with hosted services:
114
117
115
118
### Grafana Cloud
116
119
117
-
With [Grafana Cloud](https://grafana.com/products/cloud/) hosted metrics you will need to use the specific host that is mentioned as well as specify the HTTP username and password given within the Grafana Cloud page.
118
-
120
+
With [Grafana Cloud](https://grafana.com/products/cloud/) hosted metrics you will need to use the specific host mentioned and specify the HTTP username and password given within the Grafana Cloud page.
119
121
120
122
{% tabs %}
121
123
{% tab title="fluent-bit.yaml" %}
@@ -126,7 +128,7 @@ pipeline:
126
128
outputs:
127
129
- name: prometheus_remote_write
128
130
match: '*'
129
-
host: prometheus-us-central1.grafana.net
131
+
host: prometheus-us-central1.grafana.net
130
132
uri: /api/prom/push
131
133
port: 443
132
134
tls: on
@@ -154,9 +156,9 @@ pipeline:
154
156
{% endtab %}
155
157
{% endtabs %}
156
158
157
-
### Logz.io Infrastructure Monitoring
159
+
### Logz.io infrastructure monitoring
158
160
159
-
With Logz.io [hosted prometheus](https://logz.io/solutions/infrastructure-monitoring/) you will need to make use of the header option and add the Authorization Bearer with the proper key. The host and port may also differ within your specific hosted instance.
161
+
With Logz.io [hosted Prometheus](https://logz.io/solutions/infrastructure-monitoring/) you will need to make use of the header option and add the Authorization Bearer with the proper key. The host and port can also differ within your specific hosted instance.
160
162
161
163
{% tabs %}
162
164
{% tab title="fluent-bit.yaml" %}
@@ -167,7 +169,7 @@ pipeline:
167
169
outputs:
168
170
- name: prometheus_remote_write
169
171
match: '*'
170
-
host: listener.logz.io
172
+
host: listener.logz.io
171
173
port: 8053
172
174
tls: on
173
175
tls.verify: on
@@ -194,7 +196,7 @@ pipeline:
194
196
195
197
### Coralogix
196
198
197
-
With [Coralogix Metrics](https://coralogix.com/platform/metrics/) you may need to customize the URI. Additionally, you will make use of the header key with Coralogix private key.
199
+
With [Coralogix Metrics](https://coralogix.com/platform/metrics/) you might need to customize the URI. Additionally, you will make use of the header key with Coralogix private key.
0 commit comments