| 
2 | 2 | 
 
  | 
3 | 3 | ## Overview  | 
4 | 4 | 
 
  | 
5 |  | -This check monitors [KrakenD][1] through the Datadog Agent.   | 
 | 5 | +This check monitors [KrakenD][1] through the Datadog Agent.  | 
6 | 6 | 
 
  | 
7 |  | -Include a high level overview of what this integration does:  | 
8 |  | -- What does your product do (in 1-2 sentences)?  | 
9 |  | -- What value will customers get from this integration, and why is it valuable to them?  | 
10 |  | -- What specific data will your integration monitor, and what's the value of that data?  | 
 | 7 | +KrakenD is a high-performance API Gateway that provides a single entry point for microservices. This integration collects metrics using KrakenD's [OpenTelemetry exporter with Prometheus format][2] and supports [log collection][3] for comprehensive monitoring.  | 
11 | 8 | 
 
  | 
12 |  | -**Minimum Agent version:** 7.69.0  | 
 | 9 | +### What This Integration Monitors  | 
 | 10 | + | 
 | 11 | +The integration collects metrics across multiple [layers][4] of the KrakenD gateway:  | 
 | 12 | + | 
 | 13 | +- **HTTP Server Layer**: Request durations, response sizes, and status codes for client-facing traffic  | 
 | 14 | +- **Proxy Layer**: Processing times and performance metrics for KrakenD's internal proxy operations  | 
 | 15 | +- **Backend Layer**: Connection times, response durations, error rates, DNS resolution, TLS handshakes, timeouts, and connection details for upstream service calls  | 
 | 16 | +- **Go Runtime**: Garbage collection, memory usage, goroutines, and Go-specific performance metrics  | 
 | 17 | +- **System Process**: CPU usage, memory consumption, file descriptors, and network I/O  | 
 | 18 | + | 
 | 19 | +In addition to metrics, you can collect access and application logs from KrakenD.  | 
 | 20 | + | 
 | 21 | +### Deployment Support  | 
 | 22 | + | 
 | 23 | +This integration works with KrakenD in both containerized (Docker, Kubernetes) and traditional deployment environments.  | 
13 | 24 | 
 
  | 
14 |  | -## Setup  | 
15 | 25 | 
 
  | 
16 |  | -Follow the instructions below to install and configure this check for an Agent running on a host. For containerized environments, see the [Autodiscovery Integration Templates][3] for guidance on applying these instructions.  | 
 | 26 | +## Setup  | 
17 | 27 | 
 
  | 
18 | 28 | ### Installation  | 
19 | 29 | 
 
  | 
20 |  | -The KrakenD check is included in the [Datadog Agent][2] package.  | 
21 |  | -No additional installation is needed on your server.  | 
 | 30 | +The KrakenD check is included in the [Datadog Agent][6] package. No additional installation is needed on your server.  | 
22 | 31 | 
 
  | 
23 | 32 | ### Configuration  | 
24 | 33 | 
 
  | 
25 |  | -1. Edit the `krakend.d/conf.yaml` file, in the `conf.d/` folder at the root of your Agent's configuration directory to start collecting your krakend performance data. See the [sample krakend.d/conf.yaml][4] for all available configuration options.  | 
26 |  | - | 
27 |  | -2. [Restart the Agent][5].  | 
 | 34 | +### Metrics  | 
28 | 35 | 
 
  | 
 | 36 | +The KrakenD integration uses the OpenTelemetry component in KrakenD with a Prometheus exporter to parse and emit metrics to Datadog. Make sure that your KrakenD installation is configured appropriately following the [instructions provided by KrakenD][7] and use the `prometheus` exporter.  | 
 | 37 | + | 
 | 38 | +The snippet below configures KrakenD to emit metrics for [all layers][4] including Go and process metrics, exposing the Prometheus metrics endpoint on port 9090 on all network interfaces (`0.0.0.0`). The specific endpoint URL you configure in the integration as the `openmetrics_endpoint` option depends on your deployment:  | 
 | 39 | + | 
 | 40 | +- **Same host**: `http://localhost:9090/metrics`  | 
 | 41 | +- **Docker containers and Kubernetes**: With Autodiscovery you can use the template variable `%%host%%`: `http://%%host%%:9090/metrics`.  | 
 | 42 | + | 
 | 43 | +```json  | 
 | 44 | +{  | 
 | 45 | +   "extra_config": {  | 
 | 46 | +      "telemetry/opentelemetry": {  | 
 | 47 | +         "service_name": "krakend-gateway",  | 
 | 48 | +         "service_version": "1.0.0",  | 
 | 49 | +         "exporters": {  | 
 | 50 | +               "prometheus": [  | 
 | 51 | +                  {  | 
 | 52 | +                     "name": "krakend_metrics",  | 
 | 53 | +                     "port": 9090,  | 
 | 54 | +                     "listen_ip": "0.0.0.0",  | 
 | 55 | +                     "process_metrics": true,  | 
 | 56 | +                     "go_metrics": true  | 
 | 57 | +                  }  | 
 | 58 | +               ]  | 
 | 59 | +         },  | 
 | 60 | +         "layers": {  | 
 | 61 | +               "global": {  | 
 | 62 | +                  "disable_metrics": false  | 
 | 63 | +               },  | 
 | 64 | +               "proxy": {  | 
 | 65 | +                  "disable_metrics": false  | 
 | 66 | +               },  | 
 | 67 | +               "backend": {  | 
 | 68 | +                  "metrics": {  | 
 | 69 | +                     "disable_stage": false,  | 
 | 70 | +                     "round_trip": true,  | 
 | 71 | +                     "read_payload": true,  | 
 | 72 | +                     "detailed_connection": true,  | 
 | 73 | +                     "static_attributes": [  | 
 | 74 | +                           {  | 
 | 75 | +                              "key": "backend_type",  | 
 | 76 | +                              "value": "test_api"  | 
 | 77 | +                           }  | 
 | 78 | +                     ]  | 
 | 79 | +                  }  | 
 | 80 | +               }  | 
 | 81 | +         }  | 
 | 82 | +      }  | 
 | 83 | +   }  | 
 | 84 | +}  | 
 | 85 | +```  | 
 | 86 | + | 
 | 87 | +In KrakenD, emitting Go and process metrics is optional and can be disabled by setting `go_metrics` and `process_metrics` to `false`. For debugging purposes, to emit these metrics but not send them to Datadog, you can set the same options to `false` in the integration configuration. By default, they are enabled to respect the configuration set up in KrakenD.  | 
 | 88 | + | 
 | 89 | +To configure the integration with KrakenD deployed on a host:  | 
 | 90 | + | 
 | 91 | +1. Edit the `krakend.d/conf.yaml` file, in the `conf.d/` folder at the root of your Agent's configuration directory to start collecting your KrakenD performance data. See the sample [`krakend.d/conf.yaml`][9] for all available configuration options.  | 
 | 92 | + | 
 | 93 | +2. [Restart the Agent][10].  | 
 | 94 | + | 
 | 95 | +For containerized environments, see the [Autodiscovery Integration Templates][5] for guidance.  | 
 | 96 | + | 
 | 97 | +### Logs  | 
 | 98 | + | 
 | 99 | +Ensure the agent is configured to load logs following the instructions about [Log Collection and Integrations][3].  | 
 | 100 | + | 
 | 101 | +To enable collection of KrakenD access and application logs, uncomment this section in the integration configuration file, replacing `<SERVICE>`  with the service to associate the logs with:  | 
 | 102 | + | 
 | 103 | +```yaml  | 
 | 104 | +logs:  | 
 | 105 | +  - type: docker  | 
 | 106 | +    source: krakend  | 
 | 107 | +    service: <SERVICE>  | 
 | 108 | +```  | 
 | 109 | +
  | 
 | 110 | +Alternatively, in containerized environments, you can use Autodiscovery (for example, see [Docker][11] or [Kubernetes][12]) to add the logs configuration through annotations to the container or node where KrakenD is running.  | 
29 | 111 | ### Validation  | 
30 | 112 | 
  | 
31 |  | -[Run the Agent's status subcommand][6] and look for `krakend` under the Checks section.  | 
 | 113 | +[Run the Agent's status subcommand][13] and look for `krakend` under the Checks section.  | 
32 | 114 | 
 
  | 
33 | 115 | ## Data Collected  | 
34 | 116 | 
 
  | 
35 | 117 | ### Metrics  | 
36 | 118 | 
 
  | 
37 |  | -See [metadata.csv][7] for a list of metrics provided by this integration.  | 
 | 119 | +See [metadata.csv][14] for a list of metrics provided by this integration.  | 
38 | 120 | 
 
  | 
39 | 121 | ### Events  | 
40 | 122 | 
 
  | 
41 | 123 | The KrakenD integration does not include any events.  | 
42 | 124 | 
 
  | 
43 | 125 | ### Service Checks  | 
44 | 126 | 
 
  | 
45 |  | -The KrakenD integration does not include any service checks.  | 
46 |  | - | 
47 |  | -See [service_checks.json][8] for a list of service checks provided by this integration.  | 
 | 127 | +See [service_checks.json][15] for a list of service checks provided by this integration.  | 
48 | 128 | 
 
  | 
49 | 129 | ## Troubleshooting  | 
50 | 130 | 
 
  | 
51 |  | -Need help? Contact [Datadog support][9].  | 
52 |  | - | 
53 |  | - | 
54 |  | -[1]: **LINK_TO_INTEGRATION_SITE**  | 
55 |  | -[2]: https://app.datadoghq.com/account/settings/agent/latest  | 
56 |  | -[3]: https://docs.datadoghq.com/agent/kubernetes/integrations/  | 
57 |  | -[4]: https://github.com/DataDog/integrations-core/blob/master/krakend/datadog_checks/krakend/data/conf.yaml.example  | 
58 |  | -[5]: https://docs.datadoghq.com/agent/guide/agent-commands/#start-stop-and-restart-the-agent  | 
59 |  | -[6]: https://docs.datadoghq.com/agent/guide/agent-commands/#agent-status-and-information  | 
60 |  | -[7]: https://github.com/DataDog/integrations-core/blob/master/krakend/metadata.csv  | 
61 |  | -[8]: https://github.com/DataDog/integrations-core/blob/master/krakend/assets/service_checks.json  | 
62 |  | -[9]: https://docs.datadoghq.com/help/  | 
 | 131 | +Need help? Contact [Datadog support][16].  | 
 | 132 | + | 
 | 133 | + | 
 | 134 | +[1]: https://www.krakend.io/  | 
 | 135 | +[2]: https://www.krakend.io/docs/telemetry/prometheus/  | 
 | 136 | +[3]: https://docs.datadoghq.com/logs/log_collection/  | 
 | 137 | +[4]: https://www.krakend.io/docs/telemetry/opentelemetry-layers-metrics/  | 
 | 138 | +[5]: https://docs.datadoghq.com/agent/kubernetes/integrations/  | 
 | 139 | +[6]: https://app.datadoghq.com/account/settings/agent/latest  | 
 | 140 | +[7]: https://www.krakend.io/docs/telemetry/opentelemetry/  | 
 | 141 | +[8]: https://www.krakend.io/docs/telemetry/opentelemetry-layers-metrics/  | 
 | 142 | +[9]: https://github.com/DataDog/integrations-core/blob/master/krakend/datadog_checks/krakend/data/conf.yaml.example  | 
 | 143 | +[10]: https://docs.datadoghq.com/agent/guide/agent-commands/#start-stop-and-restart-the-agent  | 
 | 144 | +[11]: https://docs.datadoghq.com/containers/docker/log  | 
 | 145 | +[12]: https://docs.datadoghq.com/containers/kubernetes/log/  | 
 | 146 | +[13]: https://docs.datadoghq.com/agent/guide/agent-commands/#agent-status-and-information  | 
 | 147 | +[14]: https://github.com/DataDog/integrations-core/blob/master/krakend/metadata.csv  | 
 | 148 | +[15]: https://github.com/DataDog/integrations-core/blob/master/krakend/assets/service_checks.json  | 
 | 149 | +[16]: https://docs.datadoghq.com/help/  | 
0 commit comments