From 122854834a4ad5480f34bee5ed708f80f5f42c65 Mon Sep 17 00:00:00 2001 From: Lynette Miles Date: Mon, 21 Jul 2025 15:14:49 -0700 Subject: [PATCH 1/5] Pipeline: output: prom remote write: style Signed-off-by: Lynette Miles --- pipeline/outputs/prometheus-remote-write.md | 351 ++++++++++---------- vale-styles/FluentBit/Headings.yml | 1 + 2 files changed, 178 insertions(+), 174 deletions(-) diff --git a/pipeline/outputs/prometheus-remote-write.md b/pipeline/outputs/prometheus-remote-write.md index 08be0ec3d..dba54d204 100644 --- a/pipeline/outputs/prometheus-remote-write.md +++ b/pipeline/outputs/prometheus-remote-write.md @@ -2,34 +2,38 @@ description: An output plugin to submit Prometheus Metrics using the remote write protocol --- -# Prometheus Remote Write - -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. - -Important Note: The prometheus exporter only works with metric plugins, such as Node Exporter Metrics - -| Key | Description | Default | -|----------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------| -| host | IP address or hostname of the target HTTP Server | 127.0.0.1 | -| http_user | Basic Auth Username | | -| http_passwd | Basic Auth Password. Requires HTTP_user to be set | | -| AWS\_Auth | Enable AWS SigV4 authentication | false | -| AWS\_Service | For Amazon Managed Service for Prometheus, the service name is aps | aps | -| AWS\_Region | Region of your Amazon Managed Service for Prometheus workspace | | -| 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 | | -| AWS\_Role\_ARN | AWS IAM Role to assume, used by SigV4 authentication | | -| AWS\_External\_ID | External ID for the AWS IAM Role specified with `aws_role_arn`, used by SigV4 authentication | | -| port | TCP port of the target HTTP Server | 80 | -| 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. | | -| uri | Specify an optional HTTP URI for the target web server, e.g: /something | / | -| header | Add a HTTP header key/value pair. Multiple headers can be set. | | -| log_response_payload | Log the response payload within the Fluent Bit log | false | -| add_label | This allows you to add custom labels to all metrics exposed through the prometheus exporter. You may have multiple of these fields | | -| workers | The number of [workers](../../administration/multithreading.md#outputs) to perform flush operations for this output. | `2` | - -## Getting Started - -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. +# Prometheus remote write + +The _Prometheus remote write_ plugin lets you take metrics from Fluent Bit and submit them to a Prometheus server through the remote write mechanism. + +The Prometheus exporter only works with metric plugins, such as Node Exporter Metrics + +## Configuration parameters + +This plugin supports the following parameters: + +| Key | Description | Default | +|-----|-------------|---------| +| `host` | IP address or hostname of the target HTTP server. | `127.0.0.1` | +| `http_user` | Basic Auth username. | _none_ | +| `http_passwd` | Basic Auth Password. Requires `HTTP_user` to be set. | _none_ | +| `AWS_Auth` | Enable AWS SigV4 authentication | `false` | +| `AWS_Service` | For Amazon Managed Service for Prometheus, the service name is `aps`. | `aps` | +| `AWS_Region` | Region of your Amazon Managed Service for Prometheus workspace. | _none_ | +| `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_ | +| `AWS_Role_ARN` | AWS IAM Role to assume, used by SigV4 authentication. | _none_ | +| `AWS_External_ID` | External ID for the AWS IAM Role specified with `aws_role_arn`, used by SigV4 authentication. | _none_ | +| `port` | TCP port of the target HTTP server. | `80` | +| `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_ | +| `uri` | Specify an optional HTTP URI for the target web server. For example: `/someuri` | `/` | +| `header` | Add a HTTP header key/value pair. Multiple headers can be set. | _none_ | +| `log_response_payload` | Log the response payload within the Fluent Bit log | `false` | +| `add_label` | This lets you add custom labels to all metrics exposed through the Prometheus exporter. You can have multiple of these fields. | _none_ | +| `workers` | The number of [workers](../../administration/multithreading.md#outputs) to perform flush operations for this output. | `2` | + +## Get started + +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. {% tabs %} {% tab title="fluent-bit.yaml" %} @@ -40,30 +44,30 @@ The Prometheus remote write plugin only works with metrics collected by one of t # The following example collects host metrics on Linux and delivers # them through the Prometheus remote write plugin to new relic : # -service: - flush: 1 - log_level: info - +service: + flush: 1 + log_level: info + pipeline: - inputs: - - name: node_exporter_metrics - tag: node_metrics - scrape_interval: 2 - - outputs: - - name: prometheus_remote_write - match: node_metrics - host: metric-api.newrelic.com - port: 443 - uri: /prometheus/v1/write?prometheus_server=YOUR_DATA_SOURCE_NAME - header: 'Authorization Bearer YOUR_LICENSE_KEY' - log_response_payload: true - tls: on - tls.verify: on - # add user-defined labels - add_label: - - app fluent-bit - - color blue + inputs: + - name: node_exporter_metrics + tag: node_metrics + scrape_interval: 2 + + outputs: + - name: prometheus_remote_write + match: node_metrics + host: metric-api.newrelic.com + port: 443 + uri: /prometheus/v1/write?prometheus_server=YOUR_DATA_SOURCE_NAME + header: 'Authorization Bearer YOUR_LICENSE_KEY' + log_response_payload: true + tls: on + tls.verify: on + # add user-defined labels + add_label: + - app fluent-bit + - color blue # Note : it would be necessary to replace both YOUR_DATA_SOURCE_NAME and YOUR_LICENSE_KEY # with real values for this example to work. @@ -79,27 +83,27 @@ pipeline: # them through the Prometheus remote write plugin to new relic : # [SERVICE] - Flush 1 - Log_level info + Flush 1 + Log_level info [INPUT] - Name node_exporter_metrics - Tag node_metrics - Scrape_interval 2 + Name node_exporter_metrics + Tag node_metrics + Scrape_interval 2 [OUTPUT] - Name prometheus_remote_write - Match node_metrics - Host metric-api.newrelic.com - Port 443 - Uri /prometheus/v1/write?prometheus_server=YOUR_DATA_SOURCE_NAME - Header Authorization Bearer YOUR_LICENSE_KEY - Log_response_payload True - Tls On - Tls.verify On - # add user-defined labels - add_label app fluent-bit - add_label color blue + Name prometheus_remote_write + Match node_metrics + Host metric-api.newrelic.com + Port 443 + Uri /prometheus/v1/write?prometheus_server=YOUR_DATA_SOURCE_NAME + Header Authorization Bearer YOUR_LICENSE_KEY + Log_response_payload True + Tls On + Tls.verify On + # add user-defined labels + add_label app fluent-bit + add_label color blue # Note : it would be necessary to replace both YOUR_DATA_SOURCE_NAME and YOUR_LICENSE_KEY # with real values for this example to work. @@ -110,12 +114,11 @@ pipeline: ## Examples -The following are examples of using Prometheus remote write with hosted services below +The following are examples of using Prometheus remote write with hosted services: ### Grafana Cloud -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. - +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. {% tabs %} {% tab title="fluent-bit.yaml" %} @@ -123,16 +126,16 @@ With [Grafana Cloud](https://grafana.com/products/cloud/) hosted metrics you wil ```yaml pipeline: - outputs: - - name: prometheus_remote_write - match: '*' - host: prometheus-us-central1.grafana.net - uri: /api/prom/push - port: 443 - tls: on - tls.verify: on - http_user: - http_passwd: + outputs: + - name: prometheus_remote_write + match: '*' + host: prometheus-us-central1.grafana.net + uri: /api/prom/push + port: 443 + tls: on + tls.verify: on + http_user: + http_passwd: ``` {% endtab %} @@ -140,23 +143,23 @@ pipeline: ```text [OUTPUT] - name prometheus_remote_write - match * - host prometheus-us-central1.grafana.net - uri /api/prom/push - port 443 - tls on - tls.verify on - http_user - http_passwd + name prometheus_remote_write + match * + host prometheus-us-central1.grafana.net + uri /api/prom/push + port 443 + tls on + tls.verify on + http_user + http_passwd ``` {% endtab %} {% endtabs %} -### Logz.io Infrastructure Monitoring +### Logz.io infrastructure monitoring -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. +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. {% tabs %} {% tab title="fluent-bit.yaml" %} @@ -164,14 +167,14 @@ With Logz.io [hosted prometheus](https://logz.io/solutions/infrastructure-monito ```yaml pipeline: - outputs: - - name: prometheus_remote_write - match: '*' - host: listener.logz.io - port: 8053 - tls: on - tls.verify: on - log_response_payload: true + outputs: + - name: prometheus_remote_write + match: '*' + host: listener.logz.io + port: 8053 + tls: on + tls.verify: on + log_response_payload: true ``` {% endtab %} @@ -179,14 +182,14 @@ pipeline: ```text [OUTPUT] - name prometheus_remote_write - match * - host listener.logz.io - port 8053 - header Authorization Bearer - tls on - tls.verify on - log_response_payload true + name prometheus_remote_write + match * + host listener.logz.io + port 8053 + header Authorization Bearer + tls on + tls.verify on + log_response_payload true ``` {% endtab %} @@ -194,7 +197,7 @@ pipeline: ### Coralogix -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. +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. {% tabs %} {% tab title="fluent-bit.yaml" %} @@ -202,15 +205,15 @@ With [Coralogix Metrics](https://coralogix.com/platform/metrics/) you may need t ```yaml pipeline: - outputs: - - name: prometheus_remote_write - match: '*' - host: metrics-api.coralogix.com - uri: prometheus/api/v1/write?appLabelName=path&subSystemLabelName=path&severityLabelName=severity - port: 443 - header: 'Authorization Bearer ' - tls: on - tls.verify: on + outputs: + - name: prometheus_remote_write + match: '*' + host: metrics-api.coralogix.com + uri: prometheus/api/v1/write?appLabelName=path&subSystemLabelName=path&severityLabelName=severity + port: 443 + header: 'Authorization Bearer ' + tls: on + tls.verify: on ``` {% endtab %} @@ -218,14 +221,14 @@ pipeline: ```text [OUTPUT] - name prometheus_remote_write - match * - host metrics-api.coralogix.com - uri prometheus/api/v1/write?appLabelName=path&subSystemLabelName=path&severityLabelName=severity - port 443 - header Authorization Bearer - tls on - tls.verify on + name prometheus_remote_write + match * + host metrics-api.coralogix.com + uri prometheus/api/v1/write?appLabelName=path&subSystemLabelName=path&severityLabelName=severity + port 443 + header Authorization Bearer + tls on + tls.verify on ``` {% endtab %} @@ -241,16 +244,16 @@ With [Levitate](https://last9.io/levitate-tsdb), you must use the Levitate clust ```yaml pipeline: - outputs: - - name: prometheus_remote_write - match: '*' - host: app-tsdb.last9.io - uri: /v1/metrics/82xxxx/sender/org-slug/write - port: 443 - tls: on - tls.verify: on - http_user: - http_passwd: + outputs: + - name: prometheus_remote_write + match: '*' + host: app-tsdb.last9.io + uri: /v1/metrics/82xxxx/sender/org-slug/write + port: 443 + tls: on + tls.verify: on + http_user: + http_passwd: ``` {% endtab %} @@ -258,23 +261,23 @@ pipeline: ```text [OUTPUT] - name prometheus_remote_write - match * - host app-tsdb.last9.io - uri /v1/metrics/82xxxx/sender/org-slug/write - port 443 - tls on - tls.verify on - http_user - http_passwd + name prometheus_remote_write + match * + host app-tsdb.last9.io + uri /v1/metrics/82xxxx/sender/org-slug/write + port 443 + tls on + tls.verify on + http_user + http_passwd ``` {% endtab %} {% endtabs %} -### Add Prometheus like Labels +### Add Prometheus-like labels -Ordinary prometheus clients add some of the labels as below: +Ordinary Prometheus clients add some of the following labels: {% tabs %} {% tab title="fluent-bit.yaml" %} @@ -282,20 +285,20 @@ Ordinary prometheus clients add some of the labels as below: ```yaml pipeline: - outputs: - - name: prometheus_remote_write - match: your.metric - host: xxxxxxx.yyyyy.zzzz - port: 443 - uri: /api/v1/write - header: 'Authorization Bearer YOUR_LICENSE_KEY' - log_response_payload: true - tls: on - tls.verify: on - # add user-defined labels - add_label: - - instance ${HOSTNAME} - - job fluent-bit + outputs: + - name: prometheus_remote_write + match: your.metric + host: xxxxxxx.yyyyy.zzzz + port: 443 + uri: /api/v1/write + header: 'Authorization Bearer YOUR_LICENSE_KEY' + log_response_payload: true + tls: on + tls.verify: on + # add user-defined labels + add_label: + - instance ${HOSTNAME} + - job fluent-bit ``` {% endtab %} @@ -303,21 +306,21 @@ pipeline: ```text [OUTPUT] - Name prometheus_remote_write - Match your.metric - Host xxxxxxx.yyyyy.zzzz - Port 443 - Uri /api/v1/write - Header Authorization Bearer YOUR_LICENSE_KEY - Log_response_payload True - Tls On - Tls.verify On - # add user-defined labels - add_label instance ${HOSTNAME} - add_label job fluent-bit + Name prometheus_remote_write + Match your.metric + Host xxxxxxx.yyyyy.zzzz + Port 443 + Uri /api/v1/write + Header Authorization Bearer YOUR_LICENSE_KEY + Log_response_payload True + Tls On + Tls.verify On + # add user-defined labels + add_label instance ${HOSTNAME} + add_label job fluent-bit ``` {% endtab %} {% endtabs %} -`instance` label can be emulated with `add_label instance ${HOSTNAME}`. And other labels can be added with `add_label ` setting. \ No newline at end of file +`instance` label can be emulated with `add_label instance ${HOSTNAME}`. And other labels can be added with `add_label ` setting. diff --git a/vale-styles/FluentBit/Headings.yml b/vale-styles/FluentBit/Headings.yml index fb109ae38..97c93492d 100644 --- a/vale-styles/FluentBit/Headings.yml +++ b/vale-styles/FluentBit/Headings.yml @@ -49,6 +49,7 @@ exceptions: - Google Cloud BigQuery - Google Cloud Platform - Grafana + - Grafana Cloud - Graylog Extended Log Format - gRPC - HTTP From fbcbb2f17507af70a1dce62effbf80c61035d9e0 Mon Sep 17 00:00:00 2001 From: Lynette Miles Date: Mon, 21 Jul 2025 15:25:02 -0700 Subject: [PATCH 2/5] fixing code format I messed up Signed-off-by: Lynette Miles --- pipeline/outputs/prometheus-remote-write.md | 271 ++++++++++---------- 1 file changed, 135 insertions(+), 136 deletions(-) diff --git a/pipeline/outputs/prometheus-remote-write.md b/pipeline/outputs/prometheus-remote-write.md index dba54d204..138c71c9e 100644 --- a/pipeline/outputs/prometheus-remote-write.md +++ b/pipeline/outputs/prometheus-remote-write.md @@ -45,30 +45,29 @@ The Prometheus remote write plugin only works with metrics collected by one of t # them through the Prometheus remote write plugin to new relic : # service: - flush: 1 - log_level: info + flush: 1 + log_level: info pipeline: inputs: - - name: node_exporter_metrics - tag: node_metrics - scrape_interval: 2 - - outputs: - - name: prometheus_remote_write - match: node_metrics - host: metric-api.newrelic.com - port: 443 - uri: /prometheus/v1/write?prometheus_server=YOUR_DATA_SOURCE_NAME - header: 'Authorization Bearer YOUR_LICENSE_KEY' - log_response_payload: true - tls: on - tls.verify: on - # add user-defined labels - add_label: - - app fluent-bit - - color blue - + - name: node_exporter_metrics + tag: node_metrics + scrape_interval: 2 + + outputs: + - name: prometheus_remote_write + match: node_metrics + host: metric-api.newrelic.com + port: 443 + uri: /prometheus/v1/write?prometheus_server=YOUR_DATA_SOURCE_NAME + header: 'Authorization Bearer YOUR_LICENSE_KEY' + log_response_payload: true + tls: on + tls.verify: on + # add user-defined labels + add_label: + - app fluent-bit + - color blue # Note : it would be necessary to replace both YOUR_DATA_SOURCE_NAME and YOUR_LICENSE_KEY # with real values for this example to work. ``` @@ -83,27 +82,27 @@ pipeline: # them through the Prometheus remote write plugin to new relic : # [SERVICE] - Flush 1 - Log_level info + Flush 1 + Log_level info [INPUT] - Name node_exporter_metrics - Tag node_metrics - Scrape_interval 2 + Name node_exporter_metrics + Tag node_metrics + Scrape_interval 2 [OUTPUT] - Name prometheus_remote_write - Match node_metrics - Host metric-api.newrelic.com - Port 443 - Uri /prometheus/v1/write?prometheus_server=YOUR_DATA_SOURCE_NAME - Header Authorization Bearer YOUR_LICENSE_KEY - Log_response_payload True - Tls On - Tls.verify On - # add user-defined labels - add_label app fluent-bit - add_label color blue + Name prometheus_remote_write + Match node_metrics + Host metric-api.newrelic.com + Port 443 + Uri /prometheus/v1/write?prometheus_server=YOUR_DATA_SOURCE_NAME + Header Authorization Bearer YOUR_LICENSE_KEY + Log_response_payload True + Tls On + Tls.verify On + # add user-defined labels + add_label app fluent-bit + add_label color blue # Note : it would be necessary to replace both YOUR_DATA_SOURCE_NAME and YOUR_LICENSE_KEY # with real values for this example to work. @@ -126,16 +125,16 @@ With [Grafana Cloud](https://grafana.com/products/cloud/) hosted metrics you wil ```yaml pipeline: - outputs: - - name: prometheus_remote_write - match: '*' - host: prometheus-us-central1.grafana.net - uri: /api/prom/push - port: 443 - tls: on - tls.verify: on - http_user: - http_passwd: + outputs: + - name: prometheus_remote_write + match: '*' + host: prometheus-us-central1.grafana.net + uri: /api/prom/push + port: 443 + tls: on + tls.verify: on + http_user: + http_passwd: ``` {% endtab %} @@ -143,15 +142,15 @@ pipeline: ```text [OUTPUT] - name prometheus_remote_write - match * - host prometheus-us-central1.grafana.net - uri /api/prom/push - port 443 - tls on - tls.verify on - http_user - http_passwd + name prometheus_remote_write + match * + host prometheus-us-central1.grafana.net + uri /api/prom/push + port 443 + tls on + tls.verify on + http_user + http_passwd ``` {% endtab %} @@ -167,14 +166,14 @@ With Logz.io [hosted Prometheus](https://logz.io/solutions/infrastructure-monito ```yaml pipeline: - outputs: - - name: prometheus_remote_write - match: '*' - host: listener.logz.io - port: 8053 - tls: on - tls.verify: on - log_response_payload: true + outputs: + - name: prometheus_remote_write + match: '*' + host: listener.logz.io + port: 8053 + tls: on + tls.verify: on + log_response_payload: true ``` {% endtab %} @@ -182,14 +181,14 @@ pipeline: ```text [OUTPUT] - name prometheus_remote_write - match * - host listener.logz.io - port 8053 - header Authorization Bearer - tls on - tls.verify on - log_response_payload true + name prometheus_remote_write + match * + host listener.logz.io + port 8053 + header Authorization Bearer + tls on + tls.verify on + log_response_payload true ``` {% endtab %} @@ -205,15 +204,15 @@ With [Coralogix Metrics](https://coralogix.com/platform/metrics/) you might need ```yaml pipeline: - outputs: - - name: prometheus_remote_write - match: '*' - host: metrics-api.coralogix.com - uri: prometheus/api/v1/write?appLabelName=path&subSystemLabelName=path&severityLabelName=severity - port: 443 - header: 'Authorization Bearer ' - tls: on - tls.verify: on + outputs: + - name: prometheus_remote_write + match: '*' + host: metrics-api.coralogix.com + uri: prometheus/api/v1/write?appLabelName=path&subSystemLabelName=path&severityLabelName=severity + port: 443 + header: 'Authorization Bearer ' + tls: on + tls.verify: on ``` {% endtab %} @@ -221,14 +220,14 @@ pipeline: ```text [OUTPUT] - name prometheus_remote_write - match * - host metrics-api.coralogix.com - uri prometheus/api/v1/write?appLabelName=path&subSystemLabelName=path&severityLabelName=severity - port 443 - header Authorization Bearer - tls on - tls.verify on + name prometheus_remote_write + match * + host metrics-api.coralogix.com + uri prometheus/api/v1/write?appLabelName=path&subSystemLabelName=path&severityLabelName=severity + port 443 + header Authorization Bearer + tls on + tls.verify on ``` {% endtab %} @@ -244,16 +243,16 @@ With [Levitate](https://last9.io/levitate-tsdb), you must use the Levitate clust ```yaml pipeline: - outputs: - - name: prometheus_remote_write - match: '*' - host: app-tsdb.last9.io - uri: /v1/metrics/82xxxx/sender/org-slug/write - port: 443 - tls: on - tls.verify: on - http_user: - http_passwd: + outputs: + - name: prometheus_remote_write + match: '*' + host: app-tsdb.last9.io + uri: /v1/metrics/82xxxx/sender/org-slug/write + port: 443 + tls: on + tls.verify: on + http_user: + http_passwd: ``` {% endtab %} @@ -261,15 +260,15 @@ pipeline: ```text [OUTPUT] - name prometheus_remote_write - match * - host app-tsdb.last9.io - uri /v1/metrics/82xxxx/sender/org-slug/write - port 443 - tls on - tls.verify on - http_user - http_passwd + name prometheus_remote_write + match * + host app-tsdb.last9.io + uri /v1/metrics/82xxxx/sender/org-slug/write + port 443 + tls on + tls.verify on + http_user + http_passwd ``` {% endtab %} @@ -285,20 +284,20 @@ Ordinary Prometheus clients add some of the following labels: ```yaml pipeline: - outputs: - - name: prometheus_remote_write - match: your.metric - host: xxxxxxx.yyyyy.zzzz - port: 443 - uri: /api/v1/write - header: 'Authorization Bearer YOUR_LICENSE_KEY' - log_response_payload: true - tls: on - tls.verify: on - # add user-defined labels - add_label: - - instance ${HOSTNAME} - - job fluent-bit + outputs: + - name: prometheus_remote_write + match: your.metric + host: xxxxxxx.yyyyy.zzzz + port: 443 + uri: /api/v1/write + header: 'Authorization Bearer YOUR_LICENSE_KEY' + log_response_payload: true + tls: on + tls.verify: on + # add user-defined labels + add_label: + - instance ${HOSTNAME} + - job fluent-bit ``` {% endtab %} @@ -306,21 +305,21 @@ pipeline: ```text [OUTPUT] - Name prometheus_remote_write - Match your.metric - Host xxxxxxx.yyyyy.zzzz - Port 443 - Uri /api/v1/write - Header Authorization Bearer YOUR_LICENSE_KEY - Log_response_payload True - Tls On - Tls.verify On - # add user-defined labels - add_label instance ${HOSTNAME} - add_label job fluent-bit + Name prometheus_remote_write + Match your.metric + Host xxxxxxx.yyyyy.zzzz + Port 443 + Uri /api/v1/write + Header Authorization Bearer YOUR_LICENSE_KEY + Log_response_payload True + Tls On + Tls.verify On + # add user-defined labels + add_label instance ${HOSTNAME} + add_label job fluent-bit ``` {% endtab %} {% endtabs %} -`instance` label can be emulated with `add_label instance ${HOSTNAME}`. And other labels can be added with `add_label ` setting. +The `instance` label can be emulated with `add_label instance ${HOSTNAME}`. And other labels can be added with `add_label ` setting. From a3102928c06cefb5900dd97126f611362ef6be03 Mon Sep 17 00:00:00 2001 From: Lynette Miles <6818907+esmerel@users.noreply.github.com> Date: Mon, 21 Jul 2025 15:26:47 -0700 Subject: [PATCH 3/5] Update pipeline/outputs/prometheus-remote-write.md Signed-off-by: Lynette Miles <6818907+esmerel@users.noreply.github.com> --- pipeline/outputs/prometheus-remote-write.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pipeline/outputs/prometheus-remote-write.md b/pipeline/outputs/prometheus-remote-write.md index 138c71c9e..b53ccce57 100644 --- a/pipeline/outputs/prometheus-remote-write.md +++ b/pipeline/outputs/prometheus-remote-write.md @@ -49,7 +49,7 @@ service: log_level: info pipeline: - inputs: + inputs: - name: node_exporter_metrics tag: node_metrics scrape_interval: 2 From fce0984440ff5af32dcf4937c0e659ca9b2f7ad7 Mon Sep 17 00:00:00 2001 From: Lynette Miles <6818907+esmerel@users.noreply.github.com> Date: Tue, 22 Jul 2025 13:46:03 -0700 Subject: [PATCH 4/5] Apply suggestions from code review Co-authored-by: Craig Norris <112565517+cnorris-cs@users.noreply.github.com> Signed-off-by: Lynette Miles <6818907+esmerel@users.noreply.github.com> --- pipeline/outputs/prometheus-remote-write.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pipeline/outputs/prometheus-remote-write.md b/pipeline/outputs/prometheus-remote-write.md index b53ccce57..6d5a40683 100644 --- a/pipeline/outputs/prometheus-remote-write.md +++ b/pipeline/outputs/prometheus-remote-write.md @@ -6,7 +6,7 @@ description: An output plugin to submit Prometheus Metrics using the remote writ The _Prometheus remote write_ plugin lets you take metrics from Fluent Bit and submit them to a Prometheus server through the remote write mechanism. -The Prometheus exporter only works with metric plugins, such as Node Exporter Metrics +The Prometheus exporter works only with metric plugins, such as Node Exporter Metrics. ## Configuration parameters @@ -27,13 +27,13 @@ This plugin supports the following parameters: | `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_ | | `uri` | Specify an optional HTTP URI for the target web server. For example: `/someuri` | `/` | | `header` | Add a HTTP header key/value pair. Multiple headers can be set. | _none_ | -| `log_response_payload` | Log the response payload within the Fluent Bit log | `false` | +| `log_response_payload` | Log the response payload within the Fluent Bit log. | `false` | | `add_label` | This lets you add custom labels to all metrics exposed through the Prometheus exporter. You can have multiple of these fields. | _none_ | | `workers` | The number of [workers](../../administration/multithreading.md#outputs) to perform flush operations for this output. | `2` | ## Get started -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. +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. {% tabs %} {% tab title="fluent-bit.yaml" %} From 3e7f701cf9b0558a42cdcbaf53ed4117acc4dcca Mon Sep 17 00:00:00 2001 From: Lynette Miles <6818907+esmerel@users.noreply.github.com> Date: Tue, 22 Jul 2025 13:46:16 -0700 Subject: [PATCH 5/5] Update pipeline/outputs/prometheus-remote-write.md Co-authored-by: Craig Norris <112565517+cnorris-cs@users.noreply.github.com> Signed-off-by: Lynette Miles <6818907+esmerel@users.noreply.github.com> --- pipeline/outputs/prometheus-remote-write.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pipeline/outputs/prometheus-remote-write.md b/pipeline/outputs/prometheus-remote-write.md index 6d5a40683..a2925bd25 100644 --- a/pipeline/outputs/prometheus-remote-write.md +++ b/pipeline/outputs/prometheus-remote-write.md @@ -17,7 +17,7 @@ This plugin supports the following parameters: | `host` | IP address or hostname of the target HTTP server. | `127.0.0.1` | | `http_user` | Basic Auth username. | _none_ | | `http_passwd` | Basic Auth Password. Requires `HTTP_user` to be set. | _none_ | -| `AWS_Auth` | Enable AWS SigV4 authentication | `false` | +| `AWS_Auth` | Enable AWS SigV4 authentication. | `false` | | `AWS_Service` | For Amazon Managed Service for Prometheus, the service name is `aps`. | `aps` | | `AWS_Region` | Region of your Amazon Managed Service for Prometheus workspace. | _none_ | | `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_ |