Skip to content

Commit ae1bb1f

Browse files
authored
Merge pull request #1965 from fluent/lynettemiles/sc-136261/update-fluent-bit-docs-pipeline-outputs-prometheus
2 parents 1f1e656 + 3e7f701 commit ae1bb1f

File tree

2 files changed

+48
-45
lines changed

2 files changed

+48
-45
lines changed

pipeline/outputs/prometheus-remote-write.md

Lines changed: 47 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -2,34 +2,38 @@
22
description: An output plugin to submit Prometheus Metrics using the remote write protocol
33
---
44

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
10-
11-
| Key | Description | Default |
12-
|----------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------|
13-
| host | IP address or hostname of the target HTTP Server | 127.0.0.1 |
14-
| http_user | Basic Auth Username | |
15-
| http_passwd | Basic Auth Password. Requires HTTP_user to be set | |
16-
| AWS\_Auth | Enable AWS SigV4 authentication | false |
17-
| 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_ |
20+
| `AWS_Auth` | Enable AWS SigV4 authentication. | `false` |
21+
| `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.
3337

3438
{% tabs %}
3539
{% tab title="fluent-bit.yaml" %}
@@ -40,10 +44,10 @@ The Prometheus remote write plugin only works with metrics collected by one of t
4044
# The following example collects host metrics on Linux and delivers
4145
# them through the Prometheus remote write plugin to new relic :
4246
#
43-
service:
47+
service:
4448
flush: 1
4549
log_level: info
46-
50+
4751
pipeline:
4852
inputs:
4953
- name: node_exporter_metrics
@@ -64,7 +68,6 @@ pipeline:
6468
add_label:
6569
- app fluent-bit
6670
- color blue
67-
6871
# Note : it would be necessary to replace both YOUR_DATA_SOURCE_NAME and YOUR_LICENSE_KEY
6972
# with real values for this example to work.
7073
```
@@ -110,12 +113,11 @@ pipeline:
110113

111114
## Examples
112115

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:
114117

115118
### Grafana Cloud
116119

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.
119121

120122
{% tabs %}
121123
{% tab title="fluent-bit.yaml" %}
@@ -126,7 +128,7 @@ pipeline:
126128
outputs:
127129
- name: prometheus_remote_write
128130
match: '*'
129-
host: prometheus-us-central1.grafana.net
131+
host: prometheus-us-central1.grafana.net
130132
uri: /api/prom/push
131133
port: 443
132134
tls: on
@@ -154,9 +156,9 @@ pipeline:
154156
{% endtab %}
155157
{% endtabs %}
156158

157-
### Logz.io Infrastructure Monitoring
159+
### Logz.io infrastructure monitoring
158160

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.
160162

161163
{% tabs %}
162164
{% tab title="fluent-bit.yaml" %}
@@ -167,7 +169,7 @@ pipeline:
167169
outputs:
168170
- name: prometheus_remote_write
169171
match: '*'
170-
host: listener.logz.io
172+
host: listener.logz.io
171173
port: 8053
172174
tls: on
173175
tls.verify: on
@@ -194,7 +196,7 @@ pipeline:
194196

195197
### Coralogix
196198

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.
198200

199201
{% tabs %}
200202
{% tab title="fluent-bit.yaml" %}
@@ -206,7 +208,7 @@ pipeline:
206208
- name: prometheus_remote_write
207209
match: '*'
208210
host: metrics-api.coralogix.com
209-
uri: prometheus/api/v1/write?appLabelName=path&subSystemLabelName=path&severityLabelName=severity
211+
uri: prometheus/api/v1/write?appLabelName=path&subSystemLabelName=path&severityLabelName=severity
210212
port: 443
211213
header: 'Authorization Bearer <CORALOGIX Key>'
212214
tls: on
@@ -245,7 +247,7 @@ pipeline:
245247
- name: prometheus_remote_write
246248
match: '*'
247249
host: app-tsdb.last9.io
248-
uri: /v1/metrics/82xxxx/sender/org-slug/write
250+
uri: /v1/metrics/82xxxx/sender/org-slug/write
249251
port: 443
250252
tls: on
251253
tls.verify: on
@@ -272,9 +274,9 @@ pipeline:
272274
{% endtab %}
273275
{% endtabs %}
274276

275-
### Add Prometheus like Labels
277+
### Add Prometheus-like labels
276278

277-
Ordinary prometheus clients add some of the labels as below:
279+
Ordinary Prometheus clients add some of the following labels:
278280

279281
{% tabs %}
280282
{% tab title="fluent-bit.yaml" %}
@@ -285,7 +287,7 @@ pipeline:
285287
outputs:
286288
- name: prometheus_remote_write
287289
match: your.metric
288-
host: xxxxxxx.yyyyy.zzzz
290+
host: xxxxxxx.yyyyy.zzzz
289291
port: 443
290292
uri: /api/v1/write
291293
header: 'Authorization Bearer YOUR_LICENSE_KEY'
@@ -320,4 +322,4 @@ pipeline:
320322
{% endtab %}
321323
{% endtabs %}
322324

323-
`instance` label can be emulated with `add_label instance ${HOSTNAME}`. And other labels can be added with `add_label <key> <value>` setting.
325+
The `instance` label can be emulated with `add_label instance ${HOSTNAME}`. And other labels can be added with `add_label <key> <value>` setting.

vale-styles/FluentBit/Headings.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ exceptions:
5151
- Google Cloud BigQuery
5252
- Google Cloud Platform
5353
- Grafana
54+
- Grafana Cloud
5455
- Graylog Extended Log Format
5556
- gRPC
5657
- HTTP

0 commit comments

Comments
 (0)