Skip to content

Commit dabc5f8

Browse files
committed
Explainer for using K8s with Dynatrace
1 parent a26a3ca commit dabc5f8

File tree

2 files changed

+227
-1
lines changed

2 files changed

+227
-1
lines changed

dynatrace/README.adoc

Lines changed: 114 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,127 @@ To collect metrics in Dynatrace from Redis Enterprise Software or Redis Cloud, u
1616

1717
== Installation
1818

19-
The Dyntrace v2.0 Extensions support Prometheus metrics, and as such we have created the necessary extension file and dashboards so that this option is available. At this time Dynatrace are still testing their signing mechanism so that this extension is not available directly from them, but will have to be built and signed according to their instructions. They have indicated that they will sign 3rd party extensions starting in Q1 2024, at which point this process will no longer be necessary.
19+
The Dynatrace v2.0 Extensions support Prometheus metrics, and as such we have created the necessary extension file and dashboards so that this option is available. At this time Dynatrace are still testing their signing mechanism so that this extension is not available directly from them, but will have to be built and signed according to their instructions. They have indicated that they will sign 3rd party extensions starting in Q1 2024, at which point this process will no longer be necessary.
2020

2121
Clone the repository and cd into its root folder ('redis-enterprise-dynatrace-observability'). The contents are already in the required format; a 'src' directory containing a .yml file and a folder containing .json dashboard files.
2222

2323
Follow the instructions here:
2424

2525
https://www.dynatrace.com/support/help/extend-dynatrace/extensions20/sign-extension
2626

27+
=== Kubernetes Deployments
28+
29+
**Important:** The Dynatrace Kubernetes operator is not compatible with the Extensions V2 framework. If you're running Redis Enterprise in Kubernetes, you have two alternative options:
30+
31+
==== Option 1: Kubernetes Service with Dynatrace Annotations
32+
33+
This approach creates a new service within your Kubernetes cluster with Dynatrace annotations for Prometheus scraping.
34+
35+
===== Prerequisites
36+
* Dynatrace Kubernetes operator installed in your cluster
37+
* Prometheus scraping enabled in Dynatrace Kubernetes settings
38+
39+
===== Steps
40+
41+
1. **Install Dynatrace Operator**
42+
+
43+
Follow the official Dynatrace operator installation guide:
44+
+
45+
[source,bash]
46+
----
47+
# Install Dynatrace operator according to Dynatrace documentation
48+
kubectl apply -f https://github.com/Dynatrace/dynatrace-operator/releases/latest/download/kubernetes.yaml
49+
----
50+
51+
2. **Enable Prometheus Scraping in Dynatrace**
52+
+
53+
Configure Prometheus metric ingestion in your Dynatrace Kubernetes settings according to the official documentation:
54+
https://docs.dynatrace.com/docs/observe/infrastructure-monitoring/container-platform-monitoring/kubernetes-monitoring/monitor-prometheus-metrics
55+
56+
3. **Create Annotated Service for Redis Metrics**
57+
+
58+
Apply the following service configuration:
59+
+
60+
[source,yaml]
61+
----
62+
apiVersion: v1
63+
kind: Service
64+
metadata:
65+
name: redis-metrics
66+
namespace: redis-enterprise
67+
annotations:
68+
metrics.dynatrace.com/scrape: "true"
69+
metrics.dynatrace.com/port: "8070"
70+
metrics.dynatrace.com/path: "/metrics"
71+
metrics.dynatrace.com/secure: "true"
72+
metrics.dynatrace.com/insecure_skip_verify: "true"
73+
spec:
74+
type: ClusterIP
75+
selector:
76+
app: redis-enterprise
77+
redis.io/role-master: "1" # Point only at master node
78+
ports:
79+
- name: metrics
80+
port: 8070
81+
targetPort: 8070
82+
----
83+
84+
4. **Verify Metrics Collection**
85+
+
86+
Check that Dynatrace is successfully scraping metrics from your Redis Enterprise deployment through the Kubernetes operator.
87+
88+
==== Option 2: External VM with ActiveGate
89+
90+
This approach involves deploying ActiveGate on a VM outside your Kubernetes cluster and exposing the Redis Enterprise metrics endpoint.
91+
92+
===== Prerequisites
93+
* A VM outside your Kubernetes cluster with network access to the cluster
94+
* ActiveGate installed on the VM
95+
* Network connectivity between the ActiveGate VM and your Kubernetes cluster
96+
97+
===== Steps
98+
99+
1. **Deploy ActiveGate on External VM**
100+
+
101+
Follow the standard ActiveGate installation process on your VM:
102+
+
103+
[source,bash]
104+
----
105+
# Download and install ActiveGate according to Dynatrace documentation
106+
# https://docs.dynatrace.com/docs/ingest-from/dynatrace-activegate/installation
107+
----
108+
109+
2. **Expose Redis Enterprise Metrics Service**
110+
+
111+
Create a NodePort service to expose the redis-enterprise-cluster-prom service:
112+
+
113+
[source,yaml]
114+
----
115+
apiVersion: v1
116+
kind: Service
117+
metadata:
118+
name: redis-metrics-external
119+
namespace: redis-enterprise
120+
spec:
121+
type: NodePort
122+
selector:
123+
app: redis-enterprise
124+
redis.io/role-master: "1"
125+
ports:
126+
- name: metrics
127+
port: 8070
128+
targetPort: 8070
129+
nodePort: 30070 # Choose an available port in the NodePort range
130+
----
131+
132+
3. **Configure ActiveGate**
133+
+
134+
Configure your ActiveGate to scrape metrics from the exposed NodePort service using the external IP of your Kubernetes nodes and the NodePort (e.g., `https://KUBERNETES_NODE_IP:30070/metrics`).
135+
136+
4. **Setup Extension**
137+
+
138+
Follow the standard extension setup process using the External VM's ActiveGate.
139+
27140
== Dashboards
28141

29142
This respository includes sample Dynatrace dashboards for monitoring your Redis deplyoment. See the link:/dynatrace/dashboards[dashboards] folder for the available set of dashboards.

dynatrace_v2/README.adoc

Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,119 @@ sudo systemctl restart dynatracegateway
9898

9999
If you have an Active-Active Redis Enterprise deployment in GCP, you can use our Terraform scripts to automate the entire process. See the `terraform/gcp` directory for configuration details.
100100

101+
=== Kubernetes Deployments
102+
103+
**Important:** The Dynatrace Kubernetes operator is not compatible with the Extensions V2 framework. If you're running Redis Enterprise in Kubernetes, you have two alternative options:
104+
105+
==== Option 1: Kubernetes Service with Dynatrace Annotations
106+
107+
This approach creates a new service within your Kubernetes cluster with Dynatrace annotations for Prometheus scraping.
108+
109+
===== Prerequisites
110+
* Dynatrace Kubernetes operator installed in your cluster
111+
* Prometheus scraping enabled in Dynatrace Kubernetes settings
112+
113+
===== Steps
114+
115+
1. **Install Dynatrace Operator**
116+
+
117+
Follow the official Dynatrace operator installation guide:
118+
+
119+
[source,bash]
120+
----
121+
# Install Dynatrace operator according to Dynatrace documentation
122+
kubectl apply -f https://github.com/Dynatrace/dynatrace-operator/releases/latest/download/kubernetes.yaml
123+
----
124+
125+
2. **Enable Prometheus Scraping in Dynatrace**
126+
+
127+
Configure Prometheus metric ingestion in your Dynatrace Kubernetes settings according to the official documentation:
128+
https://docs.dynatrace.com/docs/observe/infrastructure-monitoring/container-platform-monitoring/kubernetes-monitoring/monitor-prometheus-metrics
129+
130+
3. **Create Annotated Service for Redis Metrics**
131+
+
132+
Apply the following service configuration:
133+
+
134+
[source,yaml]
135+
----
136+
apiVersion: v1
137+
kind: Service
138+
metadata:
139+
name: redis-metrics
140+
namespace: redis-enterprise
141+
annotations:
142+
metrics.dynatrace.com/scrape: "true"
143+
metrics.dynatrace.com/port: "8070"
144+
metrics.dynatrace.com/path: "/v2"
145+
metrics.dynatrace.com/secure: "true"
146+
metrics.dynatrace.com/insecure_skip_verify: "true"
147+
spec:
148+
type: ClusterIP
149+
selector:
150+
app: redis-enterprise
151+
redis.io/role-master: "1" # Point only at master node
152+
ports:
153+
- name: metrics
154+
port: 8070
155+
targetPort: 8070
156+
----
157+
158+
4. **Verify Metrics Collection**
159+
+
160+
Check that Dynatrace is successfully scraping metrics from your Redis Enterprise deployment through the Kubernetes operator.
161+
162+
==== Option 2: External VM with ActiveGate
163+
164+
This approach involves deploying ActiveGate on a VM outside your Kubernetes cluster and exposing the Redis Enterprise metrics endpoint.
165+
166+
===== Prerequisites
167+
* A VM outside your Kubernetes cluster with network access to the cluster
168+
* ActiveGate installed on the VM
169+
* Network connectivity between the ActiveGate VM and your Kubernetes cluster
170+
171+
===== Steps
172+
173+
1. **Deploy ActiveGate on External VM**
174+
+
175+
Follow the standard ActiveGate installation process on your VM:
176+
+
177+
[source,bash]
178+
----
179+
# Download and install ActiveGate according to Dynatrace documentation
180+
# https://docs.dynatrace.com/docs/ingest-from/dynatrace-activegate/installation
181+
----
182+
183+
2. **Expose Redis Enterprise Metrics Service**
184+
+
185+
Create a NodePort service to expose the redis-enterprise-cluster-prom service:
186+
+
187+
[source,yaml]
188+
----
189+
apiVersion: v1
190+
kind: Service
191+
metadata:
192+
name: redis-metrics-external
193+
namespace: redis-enterprise
194+
spec:
195+
type: NodePort
196+
selector:
197+
app: redis-enterprise
198+
redis.io/role-master: "1"
199+
ports:
200+
- name: metrics
201+
port: 8070
202+
targetPort: 8070
203+
nodePort: 30070 # Choose an available port in the NodePort range
204+
----
205+
206+
3. **Configure ActiveGate**
207+
+
208+
Configure your ActiveGate to scrape metrics from the exposed NodePort service using the external IP of your Kubernetes nodes and the NodePort (e.g., `https://KUBERNETES_NODE_IP:30070/v2`).
209+
210+
4. **Setup Extension**
211+
+
212+
Follow the standard extension setup process using the External VM's ActiveGate.
213+
101214
== Dashboards
102215

103216
This repository includes sample Dynatrace dashboards for monitoring your Redis deployment. See the

0 commit comments

Comments
 (0)