|
| 1 | +--- |
| 2 | +description: Send logs to Dynatrace |
| 3 | +--- |
| 4 | + |
| 5 | +# Dynatrace |
| 6 | + |
| 7 | +Stream logs to [Dynatrace](https://www.dynatrace.com) by utilizing the **http** |
| 8 | +plugin to send data to the |
| 9 | +[Dynatrace generic log ingest API](https://docs.dynatrace.com/docs/shortlink/lma-generic-log-ingestion). |
| 10 | + |
| 11 | +## Configuration parameters |
| 12 | + |
| 13 | +| Key | Description | Default | |
| 14 | +| -------------------------- | ----------- | ------- | |
| 15 | +| `header` | The specific header for content-type. | `Content-Type application/json; charset=utf-8` | |
| 16 | +| `header` | The specific header for authorization token, where {your-API-token-here} is the Dynatrace API token with log ingest scope. | Authorization Api-Token {your-API-token-here} | |
| 17 | +| `allow_duplicated_headers` | Specifies duplicated header use. | `false` | |
| 18 | +| `host` | Your Dynatrace environment hostname where {your-environment-id} is your environment ID. | `{your-environment-id}.live.dynatrace.com` | |
| 19 | +| `port` | TCP port of your Dynatrace host. | `443` | |
| 20 | +| `uri` | Specify the HTTP URI for Dynatrace log ingest API. | `/api/v2/logs/ingest` | |
| 21 | +| `format` | The data format to be used in the HTTP request body. | `json` | |
| 22 | +| `json_date_format` | Date format standard for JSON. | `iso8601` | |
| 23 | +| `json_date_key` | Fieldname specifying message timestamp. | `timestamp` | |
| 24 | +| `tls` | Specify to use TLS. | `on` | |
| 25 | +| `tls.verify` | TLS verification. | `on` | |
| 26 | + |
| 27 | +## Getting started |
| 28 | + |
| 29 | +To get started with sending logs to Dynatrace: |
| 30 | + |
| 31 | +1. Get a [Dynatrace API](https://docs.dynatrace.com/docs/shortlink/api-authentication) |
| 32 | + token with the `logs.ingest` (Ingest Logs) scope. |
| 33 | +1. Determine your Dynatrace |
| 34 | + [environment ID](https://docs.dynatrace.com/docs/shortlink/monitoring-environment#environment-id). |
| 35 | +1. In your main Fluent Bit configuration file, append the following `Output` section: |
| 36 | + |
| 37 | + ```text |
| 38 | + [OUTPUT] |
| 39 | + name http |
| 40 | + match * |
| 41 | + header Content-Type application/json; charset=utf-8 |
| 42 | + header Authorization Api-Token {your-API-token-here} |
| 43 | + allow_duplicated_headers false |
| 44 | + host {your-environment-id}.live.dynatrace.com |
| 45 | + Port 443 |
| 46 | + URI /api/v2/logs/ingest |
| 47 | + Format json |
| 48 | + json_date_format iso8601 |
| 49 | + json_date_key timestamp |
| 50 | + tls On |
| 51 | + tls.verify On |
| 52 | +
|
| 53 | +## References |
| 54 | +
|
| 55 | +- [Dynatrace Fluent Bit documentation](https://docs.dynatrace.com/docs/shortlink/lma-stream-logs-with-fluent-bit) |
| 56 | +- [Fluent Bit integration in Dynatrace Hub](https://www.dynatrace.com/hub/detail/fluent-bit/?filter=log-management-and-analytics) |
| 57 | +- [Video: Stream a Log File to Dynatrace using Fluent Bit](https://www.youtube.com/watch?v=JJJNxhtJ6R0) |
| 58 | +- [Blog: Easily stream logs from Fluent Bit to Dynatrace](https://www.dynatrace.com/news/blog/easily-stream-logs-with-fluent-bit-to-dynatrace/) |
0 commit comments