diff --git a/pipeline/outputs/prometheus-remote-write.md b/pipeline/outputs/prometheus-remote-write.md index 08be0ec3d..a2925bd25 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 works only 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 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" %} @@ -40,10 +44,10 @@ 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: +service: flush: 1 log_level: info - + pipeline: inputs: - name: node_exporter_metrics @@ -64,7 +68,6 @@ pipeline: 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. ``` @@ -110,12 +113,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" %} @@ -126,7 +128,7 @@ pipeline: outputs: - name: prometheus_remote_write match: '*' - host: prometheus-us-central1.grafana.net + host: prometheus-us-central1.grafana.net uri: /api/prom/push port: 443 tls: on @@ -154,9 +156,9 @@ pipeline: {% 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" %} @@ -167,7 +169,7 @@ pipeline: outputs: - name: prometheus_remote_write match: '*' - host: listener.logz.io + host: listener.logz.io port: 8053 tls: on tls.verify: on @@ -194,7 +196,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" %} @@ -206,7 +208,7 @@ pipeline: - name: prometheus_remote_write match: '*' host: metrics-api.coralogix.com - uri: prometheus/api/v1/write?appLabelName=path&subSystemLabelName=path&severityLabelName=severity + uri: prometheus/api/v1/write?appLabelName=path&subSystemLabelName=path&severityLabelName=severity port: 443 header: 'Authorization Bearer ' tls: on @@ -245,7 +247,7 @@ pipeline: - name: prometheus_remote_write match: '*' host: app-tsdb.last9.io - uri: /v1/metrics/82xxxx/sender/org-slug/write + uri: /v1/metrics/82xxxx/sender/org-slug/write port: 443 tls: on tls.verify: on @@ -272,9 +274,9 @@ pipeline: {% 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" %} @@ -285,7 +287,7 @@ pipeline: outputs: - name: prometheus_remote_write match: your.metric - host: xxxxxxx.yyyyy.zzzz + host: xxxxxxx.yyyyy.zzzz port: 443 uri: /api/v1/write header: 'Authorization Bearer YOUR_LICENSE_KEY' @@ -320,4 +322,4 @@ pipeline: {% 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 +The `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