Skip to content

Commit 82c4055

Browse files
steveny91janine-c
andauthored
Sy/keda readme (#19510)
* readme * csv WIP * metadata entries * metadata * metadata units * Update keda/README.md Co-authored-by: Janine Chan <64388808+janine-c@users.noreply.github.com> * Update keda/README.md Co-authored-by: Janine Chan <64388808+janine-c@users.noreply.github.com> --------- Co-authored-by: Janine Chan <64388808+janine-c@users.noreply.github.com>
1 parent dfff594 commit 82c4055

File tree

2 files changed

+227
-143
lines changed

2 files changed

+227
-143
lines changed

keda/README.md

Lines changed: 94 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,27 +2,107 @@
22

33
## Overview
44

5-
This check monitors [Keda][1] through the Datadog Agent.
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?
5+
This check monitors [Keda][1] through the Datadog Agent. For more information, see [Keda monitoring][10].
116

127
## Setup
138

149
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.
1510

1611
### Installation
1712

18-
The Keda check is included in the [Datadog Agent][2] package.
19-
No additional installation is needed on your server.
13+
Starting from Agent release 7.62.0, the Keda check is included in the [Datadog Agent][2] package. No additional installation is needed in your environment.
2014

2115
### Configuration
2216

23-
1. Edit the `keda.d/conf.yaml` file, in the `conf.d/` folder at the root of your Agent's configuration directory to start collecting your keda performance data. See the [sample keda.d/conf.yaml][4] for all available configuration options.
24-
25-
2. [Restart the Agent][5].
17+
Keda consists of multiple components, including the Admissions Controller, Metrics API Server, and the Operator. Each of these components can be scraped for metrics. Prometheus-formatted metrics are available at /metrics on port 8080 for each component.
18+
19+
To expose these metrics, ensure that Prometheus scraping is enabled for each component. For example, in Helm, you need to enable the following Helm configuration options:
20+
- prometheus.metricServer.enabled
21+
- prometheus.operator.enabled
22+
- prometheus.webhooks.enabled
23+
24+
Alternatively, you can achieve this by providing the following configuration in a values.yaml file used during the Helm installation of Keda:
25+
26+
```yaml
27+
prometheus:
28+
metricServer:
29+
enabled: true
30+
operator:
31+
enabled: true
32+
webhooks:
33+
enabled: true
34+
```
35+
36+
For the Agent to start collecting metrics, the Keda controller pods need to be annotated. For more information about annotations, refer to the [Autodiscovery Integration Templates][3] for guidance. You can find additional configuration options by reviewing the [sample keda.d/conf.yaml][4].
37+
38+
**Note**: The listed metrics can only be collected if they are available. Some metrics are generated only when certain actions are performed. For example, the `keda.scaler.detail_errors.count` metric is exposed only after a scaler encountered an error.
39+
40+
The only parameter required for configuring the Keda check is:
41+
- `openmetrics_endpoint`: This parameter should be set to the location where the Prometheus-formatted metrics are exposed. The default port is `8080`. In containerized environments, `%%host%%` should be used for [host autodetection][3].
42+
43+
```yaml
44+
apiVersion: v1
45+
kind: Pod
46+
# (...)
47+
metadata:
48+
name: '<POD_NAME>'
49+
annotations:
50+
ad.datadoghq.com/<CONTAINER_NAME>.checks: | # <CONTAINER_NAME> Needs to match the container name at the bottom. 'keda-operator-metrics-apiserver' in this example.
51+
{
52+
"keda": {
53+
"init_config": {},
54+
"instances": [
55+
{
56+
"openmetrics_endpoint": "http://%%host%%:8080/metrics"
57+
}
58+
]
59+
}
60+
}
61+
# (...)
62+
spec:
63+
containers:
64+
- name: <CONTAINER_NAME> # e.g. 'keda-operator-metrics-apiserver' in the Metrics API Server
65+
# (...)
66+
```
67+
68+
To collect metrics from each Keda component, the above pod annotations need to be applied to each Keda component pod. Example pod annotations for the Operator pod:
69+
70+
```yaml
71+
# Pod manifest from a basic Helm chart deployment
72+
apiVersion: v1
73+
kind: Pod
74+
# (...)
75+
metadata:
76+
name: 'keda-operator'
77+
annotations:
78+
ad.datadoghq.com/<CONTAINER_NAME>.checks: |
79+
{
80+
"keda": {
81+
"init_config": {},
82+
"instances": [
83+
{
84+
"openmetrics_endpoint": "http://%%host%%:8000/metrics"
85+
}
86+
]
87+
}
88+
}
89+
# (...)
90+
spec:
91+
containers:
92+
- name: keda-operator
93+
# (...)
94+
```
95+
#### Log collection
96+
97+
_Available for Agent versions >6.0_
98+
99+
Kyverno logs can be collected from the different Keda pods through Kubernetes. Collecting logs is disabled by default in the Datadog Agent. To enable it, see [Kubernetes Log Collection][10].
100+
101+
See the [Autodiscovery Integration Templates][3] for guidance on applying the parameters below.
102+
103+
| Parameter | Value |
104+
| -------------- | ------------------------------------------------------- |
105+
| `<LOG_CONFIG>` | `{"source": "keda", "service": "<SERVICE_NAME>"}` |
26106

27107
### Validation
28108

@@ -49,7 +129,7 @@ See [service_checks.json][8] for a list of service checks provided by this integ
49129
Need help? Contact [Datadog support][9].
50130

51131

52-
[1]: **LINK_TO_INTEGRATION_SITE**
132+
[1]: https://keda.sh/
53133
[2]: https://app.datadoghq.com/account/settings/agent/latest
54134
[3]: https://docs.datadoghq.com/agent/kubernetes/integrations/
55135
[4]: https://github.com/DataDog/integrations-core/blob/master/keda/datadog_checks/keda/data/conf.yaml.example
@@ -58,3 +138,5 @@ Need help? Contact [Datadog support][9].
58138
[7]: https://github.com/DataDog/integrations-core/blob/master/keda/metadata.csv
59139
[8]: https://github.com/DataDog/integrations-core/blob/master/keda/assets/service_checks.json
60140
[9]: https://docs.datadoghq.com/help/
141+
[10]: https://keda.sh/docs/2.16/integrations/prometheus/
142+
[11]: https://github.com/kedacore/charts/blob/main/keda/README.md#operations

0 commit comments

Comments
 (0)