|
| 1 | +--- |
| 2 | +description: An output plugin to submit Metrics to an OpenTelemetry endpoint |
| 3 | +--- |
| 4 | + |
| 5 | +# OpenTelemetry |
| 6 | + |
| 7 | +The OpenTelemetry plugin allows you to take metrics from Fluent Bit and submit them to an OpenTelemetry HTTP endpoint. |
| 8 | + |
| 9 | +Important Note: At the moment only HTTP endpoints are supported. |
| 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 | +| port | TCP port of the target HTTP Server | 80 | |
| 17 | +| 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. | | |
| 18 | +| uri | Specify an optional HTTP URI for the target web server, e.g: /something | / | |
| 19 | +| header | Add a HTTP header key/value pair. Multiple headers can be set. | | |
| 20 | +| log_response_payload | Log the response payload within the Fluent Bit log | false | |
| 21 | +| add_label | This allows you to add custom labels to all metrics exposed through the OpenTelemetry exporter. You may have multiple of these fields | | |
| 22 | + |
| 23 | +## Getting Started |
| 24 | + |
| 25 | +The OpenTelemetry plugin only works with metrics collected by one of the from metric input plugins. In the following example, host metrics are collected by the node exporter metrics plugin and then delivered by the OpenTelemetry output plugin. |
| 26 | + |
| 27 | +``` |
| 28 | +# Node Exporter Metrics + OpenTelemetry output plugin |
| 29 | +# ------------------------------------------- |
| 30 | +# The following example collects host metrics on Linux and delivers |
| 31 | +# them through the OpenTelemetry plugin to a local collector : |
| 32 | +# |
| 33 | +[SERVICE] |
| 34 | + Flush 1 |
| 35 | + Log_level info |
| 36 | +
|
| 37 | +[INPUT] |
| 38 | + Name node_exporter_metrics |
| 39 | + Tag node_metrics |
| 40 | + Scrape_interval 2 |
| 41 | +
|
| 42 | +[OUTPUT] |
| 43 | + Name opentelemetry |
| 44 | + Match node_metrics |
| 45 | + Host localhost |
| 46 | + Port 443 |
| 47 | + Uri /v1/metrics |
| 48 | + Log_response_payload True |
| 49 | + Tls On |
| 50 | + Tls.verify Off |
| 51 | + # add user-defined labels |
| 52 | + add_label app fluent-bit |
| 53 | + add_label color blue |
| 54 | +``` |
0 commit comments