on 04 May 2023 11:35 AM - edited on 11 Apr 2024 01:58 PM by doweinberger
You can integrate your Prometheus exporter to Dynatrace and make them available for charting, alerting, and analysis.
If you completed the integration but still cannot find the relevant metrics on the Dynatrace metrics UI, then run the following steps for troubleshooting:
API=<enter external k8s api>
NAMESPACE=<enter pod namespace here e.g. openshift-node>
POD=<enter pod name here e.g. node-exporter-1234>
PORT=<enter port here e.g. 9100>
PATH=<enter path here e.g. /metrics>
TOKEN=<enter bearer token here>
curl https://$API/api/v1/namespaces/$NAMESPACE/pods/$POD:$PORT/proxy$PATH \
--connect-timeout 20 -v -k -H "Authorization: Bearer $TOKEN"
b) ActiveGate is running inside (containerized) the Kubernetes/OpenShift cluster
POD_OR_NODE_IP=<enter pod or node ip here>
METRICS_PORT=<enter port here e.g. 9100>
METRICS_PATH=<enter path here e.g. /metrics>
kubectl run -n dynatrace curl --image=curlimages/curl --restart=Never -it --rm \
-- http://$POD_OR_NODE_IP:$METRICS_PORT$METRICS_PATH \
--connect-timeout 20 -k -v
c) ActiveGate is running inside (containerized) the Kubernetes/OpenShift cluster and metrics endpoint requires RBAC authentication
POD_OR_NODE_IP=<enter pod or node ip here>
METRICS_PORT=<enter port here e.g. 9100>
METRICS_PATH=<enter path here e.g. /metrics>
TOKEN=<enter bearer token of dynatrace-kubernetes-monitoring service account here>
kubectl run -n dynatrace curl --image=curlimages/curl --restart=Never -it --rm \
-- http://$POD_OR_NODE_IP:$METRICS_PORT$METRICS_PATH \
--connect-timeout 20 -k -v -H "Authorization: Bearer $TOKEN"
Thank you for sharing this! I'm sure it will help out many community members. Always check your AG Version if you have issues lol