4‐Datadog Setup on EKS - harishgorla5/HINTechnologies_datadog GitHub Wiki
This guide walks you through the step-by-step setup of Datadog monitoring on an Amazon EKS cluster using the Datadog Helm chart.
Before you begin, make sure you have:
- ✅ An EKS Cluster running (1+ master & worker nodes)
- ✅
kubectl
configured to access your EKS cluster - ✅ Helm v3+ installed
- ✅ A Datadog API Key
- ✅ Access to create namespaces and install charts in your cluster
helm repo add datadog https://helm.datadoghq.com
helm repo update
kubectl create namespace <datadog>
kubectl create secret generic datadog-secret \
--from-literal api-key=<YOUR_DATADOG_API_KEY> \
--namespace default
Replace <YOUR_DATADOG_API_KEY>
with your real Datadog API key.
- ✅ The Datadog Agent is a lightweight daemon that runs on each node in your cluster. Its main job is to collect and report metrics, logs, traces, and other telemetry data to Datadog.
- ✅ Without the Datadog Agent, your EKS cluster and apps remain invisible to Datadog — no metrics, no logs, no APM, no monitoring.
- ✅ Read More About Datadog Agent
helm install datadog-agent datadog/datadog -f https://raw.githubusercontent.com/harishgorla5/datadog/refs/heads/main/datadog-default.yaml --namespace default
- Deploy Project 4 for Monitoring
kubectl apply -f https://raw.githubusercontent.com/harishgorla5/Project04/refs/heads/project4/project04.yaml
kubectl get pods -n default
You should see pods like:
kubectl logs
kubectl exec -it <datadog-agent-pod> -- agent status
-
Go to Datadog UI
-
Navigate to:
- Infrastructure → Containers
- Kubernetes → Cluster Explorer
- APM → Services
- Logs → Live Tail
-
Host Level
-
Container Level
- Go back to Monitors → New Monitor → Logs.
- Define the Search Query
service:project4 source:nginx status:404
- Set Alert Conditions
- Alert type: Log alert
- Trigger: When count is above 5 over the last 5 minutes (or your preference)
- Evaluation window: 5 minutes
- Set Notification Message
🚨 [NGINX 404 Error] Alert: {{value}} 404 errors detected in project4!
Service: project4
Source: nginx
Host: {{host.name}}
Timestamp: {{timestamp}}
@[email protected]
@[email protected]
@slack-yourchannel
- Save the Monitor
- Give it a name like: NGINX 404 Error Monitor - project4
- Set priority and tags (e.g., project4, nginx, log-alerts)
- Below are the references
helm uninstall datadog-agent -n datadog
kubectl delete namespace datadog