[{"data":1,"prerenderedAt":201},["ShallowReactive",2],{"seo-verification":3,"blog-migrating-from-datadog-to-prometheus-grafana-and-loki-en":6},{"google":4,"bing":5},"EycwPY2XMyTkVzas3n1ygeNJFGAH513qrMjfDljzsMQ","",{"key":7,"data":8},"blog-migrating-from-datadog-to-prometheus-grafana-and-loki-en",{"id":9,"slug":10,"slugs":11,"title":15,"excerpt":16,"readTime":17,"views":18,"isPinned":19,"publishedAt":20,"category":21,"categories":26,"featuredImage":28,"bgImage":29,"posterImage":30,"relatedSolution":28,"intro":31,"sections":32,"ctaTitle":127,"ctaBody":128,"ctaButton":129,"ctaUrl":130,"relatedPosts":131},337,"migrating-from-datadog-to-prometheus-grafana-and-loki",{"fr":12,"en":10,"ar":13,"es":14},"migrer-datadog-vers-stack-self-hosted-prometheus-grafana-loki","الانتقال-من-datadog-إلى-prometheus-وgrafana-وloki","migrar-de-datadog-a-prometheus-grafana-y-loki","Migrating from Datadog to Prometheus, Grafana and Loki","Replace Datadog after the 2026 repricing with Prometheus, Grafana and Loki on a VPS. Component-by-component migration, real costs and acknowledged trade-offs.",8,0,false,"2026-09-07T00:00:00+00:00",{"id":22,"name":23,"slug":24,"color":25,"icon":24},3,"Deployment","deploiement","bg-success\u002F10 text-success",[27],{"id":22,"name":23,"slug":24,"color":25,"icon":24},null,"\u002Fblog\u002Fcovers\u002Fbg.svg","\u002Fblog\u002Fcovers\u002Fmigrer-datadog-vers-stack-self-hosted-prometheus-grafana-loki-poster.svg","In 2026, several teams saw their Datadog bill cross a threshold that was hard to justify. Gabriel Anhaia's article published on dev.to in April 2026 popularised the case: $50,000 per year brought down to $0 in software costs — the only remaining cost being the VPS running the stack. This guide covers the migration component by component: metrics, logs, dashboards and alerts, with realistic VPS resource requirements and the trade-offs you accept when leaving Datadog.",[33,37,81,84,106,109,120,124],{"type":34,"title":35,"body":36},"h2","Why the Datadog bill changed in 2026","Datadog bills per host, per GB of ingested logs and per APM span. In 2026, renewals incorporated annual increases of 5 to 10% on each of these axes — and for teams that had enabled several modules (infrastructure, logs, APM, security), the cumulative effect produced effective increases of 30 to 50% from one renewal to the next, according to data published by several SaaS negotiation firms.\n\nThe most widely cited case is that of Gabriel Anhaia (dev.to, April 2026): a team whose Datadog bill crossed $50,000 annually, triggering the audit that led to the migration to Prometheus + Grafana + Loki. Net savings in software licences: 100%. Replacement cost: a VPS dedicated to the observability stack.",{"type":38,"title":39,"headers":40,"rows":44},"comparison","Datadog vs Prometheus \u002F Grafana \u002F Loki stack",[41,42,43],"Criterion","Datadog","Self-hosted stack",[45,49,53,57,61,65,69,73,77],[46,47,48],"Software cost","$15 to $150 \u002F host \u002F month depending on modules","$0 (open source licences)",[50,51,52],"Infrastructure cost","Included in billing","99 DH\u002Fmonth \u002F month (2 vCPU \u002F 4 GB VPS)",[54,55,56],"Metrics","Datadog Agent","Prometheus + Node Exporter",[58,59,60],"Logs","Datadog Logs (per GB)","Loki + Promtail (local storage)",[62,63,64],"Dashboards","Integrated Datadog UI","Grafana (thousands of templates)",[66,67,68],"Alerts","Datadog Monitors","Alertmanager + Grafana Alerting",[70,71,72],"APM \u002F traces","Datadog APM (native)","Tempo + OpenTelemetry (requires setup)",[74,75,76],"Log-metrics correlation","Automatic","Manual via Loki \u002F Prometheus labels",[78,79,80],"Ops maintenance","None (managed SaaS)","Your responsibility (updates, storage)",{"type":34,"title":82,"body":83},"Replacement components","The stack covers the three pillars of observability: metrics (Prometheus), logs (Loki), and visualisation + alerts (Grafana + Alertmanager). For traces, Tempo completes the picture via OpenTelemetry — but that is a fourth component, covered in the dedicated article `opentelemetry-grafana-tempo-vps`.\n\n**Prometheus** collects metrics by HTTP scraping: exporters expose `\u002Fmetrics` endpoints, Prometheus polls them at regular intervals and stores the time series. **Node Exporter** replaces the Datadog agent for system metrics (CPU, RAM, disk, network). **Loki** stores logs with a minimal index (labels only, no full text) — that is what allows it to run on little RAM. **Promtail** collects log files and sends them to Loki, just as the Datadog Logs agent does. **Grafana** visualises both Prometheus metrics and Loki logs in the same dashboards, and drives alerts. **Alertmanager** receives alerts from Prometheus and routes them to your notification channels (email, Slack, PagerDuty).",{"type":85,"title":86,"steps":87},"steps","Migration in 6 steps",[88,91,94,97,100,103],{"title":89,"body":90},"Install Prometheus and Node Exporter","Start with system metrics: this is the most direct replacement for the Datadog agent. Deploy Prometheus and Node Exporter via Docker Compose. The article `installer-prometheus-vps` covers this step in detail. Verify that Prometheus is scraping Node Exporter before continuing: open `http:\u002F\u002Fyour-ip:9090\u002Ftargets` and confirm the state is `UP`. Run both systems in parallel for at least one week before cutting Datadog — compare CPU and RAM values between the two sources to validate consistency.",{"title":92,"body":93},"Deploy Loki and Promtail","Loki receives logs, Promtail collects them from your server's log files. Add both services to your `docker-compose.yml`. Configure Promtail to point to your log files (`\u002Fvar\u002Flog\u002Fsyslog`, application logs). Verify ingestion in Grafana (Explorer section, Loki source) before disabling log collection in the Datadog agent. The article `loki-grafana-logs-centralises-vps` details the Promtail configuration and processing pipelines.",{"title":95,"body":96},"Configure Grafana","Grafana is the hub of the stack: it connects Prometheus (metrics) and Loki (logs) as data sources. Once both sources are added, import community dashboards from grafana.com\u002Fgrafana\u002Fdashboards — the Node Exporter Full dashboard (ID 1860) is the reference for system metrics. Recreate in Grafana the Datadog dashboards your team consults daily: this is the longest step if your Datadog dashboards are numerous and specific.",{"title":98,"body":99},"Migrate alerts to Alertmanager","Export the list of your Datadog monitors (via the Datadog API or interface). Recreate critical alerts in Prometheus (‎`PrometheusRule` rules) or in Grafana Alerting. Alertmanager handles routing to your notification channels: configure receivers (email, Slack, PagerDuty) in `alertmanager.yml`. Composite alerts with multiple conditions and suppression windows are harder to port — allow extra time for complex cases.",{"title":101,"body":102},"Validate in parallel over two weeks","Do not cut Datadog until you have two weeks of data in your self-hosted stack. Compare key metrics between the two sources. Manually trigger a few test alerts in Alertmanager. Verify that Loki is correctly receiving production logs and that LogQL queries return what you expect. Identify Datadog monitors that do not yet have an equivalent in the new stack.",{"title":104,"body":105},"Cut Datadog and reclaim the bill","Once validation is complete, disable the Datadog agent on each host, then cancel Datadog modules in reverse order of criticality (start with accessory modules, finish with infrastructure). Keep historical Datadog data accessible for 30 days after cancellation (standard contractual delay) — export critical dashboards and reports before that deadline. Note the effective cut-off date for your accounting.",{"type":34,"title":107,"body":108},"Prerequisites and VPS resources","The complete stack (Prometheus + Node Exporter + Loki + Promtail + Grafana + Alertmanager) runs on a **2 vCPU \u002F 4 GB RAM** VPS to monitor one to five hosts with 15 days of metrics retention. That is the minimum recommended configuration: below that, Prometheus starts paging under Grafana query load.\n\nFor longer retention (30 to 90 days) or high log volume (more than 10 GB per day), plan for 4 vCPU \u002F 8 GB and an additional SSD storage volume. Loki compresses logs efficiently, but unfiltered production log volume can grow quickly.\n\nSoftware required: Docker and Docker Compose (recent version), a reverse proxy (Nginx or Caddy) to expose Grafana over HTTPS, and a domain or subdomain for Grafana. Open only the HTTPS port to the outside — Prometheus, Loki and Alertmanager must not be publicly exposed.",{"type":110,"title":111,"items":112},"ul","Checklist before starting",[113,114,115,116,117,118,119],"VPS with at least 2 vCPU \u002F 4 GB RAM, with Docker and Docker Compose installed.","Additional storage volume sized for the desired retention (minimum 15 GB for 30 days of metrics + moderate logs).","Full list of active Datadog monitors, exported before any cut-off.","List of Datadog dashboards used by the team, with reference screenshots.","Notification channels (Slack webhook, email addresses, PagerDuty key) available for configuring Alertmanager.","Write access to application log files on each monitored host (for Promtail).","Two-week migration window planned with the team — the self-hosted stack runs in parallel with Datadog during this period.",{"type":121,"title":122,"body":123},"tip","What the self-hosted stack does not do","Three trade-offs to accept before migrating.\n\n**No native APM correlation.** Datadog automatically correlates a slow trace with the host metrics and associated logs. With the open source stack, this correlation is done manually via shared labels (trace ID in logs, same host label) — it is achievable, but requires configuration work. Tempo + OpenTelemetry cover APM, but add a fourth component to operate.\n\n**Maintenance is your responsibility.** Updates to Prometheus, Loki and Grafana, storage management as Loki grows, alerts on the stack itself (who alerts you if Prometheus is down?). Budget two to four hours per month of routine operations for a stable stack.\n\n**Less integrated interface.** Datadog is a single product with a unified UX. The open source stack is an assembly: Grafana for visualisation, Alertmanager for routing alerts, separate interfaces for each component. For a team used to Datadog, onboarding takes a few days.",{"type":34,"title":125,"body":126},"Troubleshooting common issues","**Prometheus is not scraping Node Exporter.** Verify that the Docker network between the two containers is correct (same Docker Compose network) and that port 9100 is not blocked by `ufw`. Open `http:\u002F\u002Fnode-exporter:9100\u002Fmetrics` from inside the Prometheus container to confirm accessibility.\n\n**Loki receives logs but Grafana shows nothing.** Loki exploration in Grafana requires a minimum label filter — a `{}` query with no label returns a quota error. Use `{job=\"varlogs\"}` as a starting point, then refine.\n\n**Grafana is slow on long time ranges.** Prometheus stores time series in memory before writing to disk (`--storage.tsdb.retention.time`). On a 2 GB RAM VPS, limit retention to 15 days and reduce resolution on long-range queries with the `step` parameter in Grafana panels.\n\n**Alertmanager is not sending notifications.** Prometheus alerts must reach the `firing` state before being routed to Alertmanager. Check the `Alerts` tab in the Prometheus UI (`http:\u002F\u002Fprometheus:9090\u002Falerts`) and confirm that alert rules are loaded (`http:\u002F\u002Fprometheus:9090\u002Frules`).","Deploy your observability stack on a VPS","A VPS Start VPS at 99 DH\u002Fmonth is the recommended base for the complete Prometheus + Grafana + Loki stack. Root access, dedicated IPv4, SSD storage — everything you need to run your own observability infrastructure.","View Cloud VPS plans","\u002Fvps-cloud",[132,154,170,186],{"id":133,"slug":134,"slugs":135,"title":139,"excerpt":140,"readTime":141,"views":18,"isPinned":19,"publishedAt":142,"category":143,"categories":148,"featuredImage":28,"bgImage":29,"posterImage":150,"relatedSolution":151},106,"vps-monitoring-with-grafana-and-prometheus",{"fr":136,"en":134,"ar":137,"es":138},"monitoring-vps-grafana-prometheus","مراقبة-الخادم-الافتراضي-vps-باستخدام-grafana-و-prometheus","monitorizacion-vps-grafana-prometheus","VPS Monitoring with Grafana and Prometheus","Set up a Grafana + Prometheus stack on your VPS to collect, store and visualize your system and application metrics.",4,"2026-03-06T00:00:00+00:00",{"id":17,"name":144,"slug":145,"color":146,"icon":147},"Security & Monitoring","securite-monitoring","bg-rose-500\u002F10 text-rose-400","security",[149],{"id":17,"name":144,"slug":145,"color":146,"icon":147},"\u002Fblog\u002Fcovers\u002Fmonitoring-vps-grafana-prometheus-poster.svg",{"categorySlug":152,"appSlug":153},"monitoring-observability","grafana",{"id":155,"slug":156,"slugs":157,"title":161,"excerpt":162,"readTime":22,"views":18,"isPinned":19,"publishedAt":163,"category":164,"categories":165,"featuredImage":28,"bgImage":29,"posterImage":167,"relatedSolution":168},147,"prometheus-on-a-vps-clear-durable-monitoring",{"fr":158,"en":156,"ar":159,"es":160},"installer-prometheus-vps","prometheus-على-vps-مراقبة-واضحة-ومستدامة","instalar-prometheus-en-un-vps","Prometheus on a VPS: clear, durable monitoring","Install Prometheus on a VPS to collect metrics, export the state of your services and prepare reliable alerts.","2026-01-29T00:00:00+00:00",{"id":17,"name":144,"slug":145,"color":146,"icon":147},[166],{"id":17,"name":144,"slug":145,"color":146,"icon":147},"\u002Fblog\u002Fcovers\u002Finstaller-prometheus-vps-poster.svg",{"categorySlug":152,"appSlug":169},"prometheus",{"id":171,"slug":172,"slugs":173,"title":177,"excerpt":178,"readTime":179,"views":18,"isPinned":19,"publishedAt":180,"category":181,"categories":182,"featuredImage":28,"bgImage":29,"posterImage":184,"relatedSolution":185},243,"centralize-docker-logs-on-your-vps-with-loki-and-grafana",{"fr":174,"en":172,"ar":175,"es":176},"loki-grafana-logs-centralises-vps","مركزة-سجلات-docker-على-vps-باستخدام-loki-وgrafana","centralizar-logs-docker-en-vps-con-loki-y-grafana","Centralize Docker logs on your VPS with Loki and Grafana","Aggregate logs from all your Docker containers into a single Grafana dashboard using Loki and Promtail on your VPS. No Datadog, no quota.",11,"2026-08-10T00:00:00+00:00",{"id":17,"name":144,"slug":145,"color":146,"icon":147},[183],{"id":17,"name":144,"slug":145,"color":146,"icon":147},"\u002Fblog\u002Fcovers\u002Floki-grafana-logs-centralises-vps-poster.svg",{"categorySlug":152,"appSlug":153},{"id":187,"slug":188,"slugs":189,"title":193,"excerpt":194,"readTime":141,"views":18,"isPinned":19,"publishedAt":195,"category":196,"categories":197,"featuredImage":28,"bgImage":29,"posterImage":199,"relatedSolution":200},220,"grafana-tempo-and-opentelemetry-distributed-tracing-on-vps",{"fr":190,"en":188,"ar":191,"es":192},"opentelemetry-grafana-tempo-vps","grafana-tempo-وopentelemetry-التتبع-الموزع-على-خادم-vps","grafana-tempo-opentelemetry-trazado-distribuido-vps","Grafana Tempo and OpenTelemetry: distributed tracing on VPS","Deploy a full distributed tracing stack on your VPS with OpenTelemetry and Grafana Tempo, free from vendor lock-in and APM costs.","2026-08-04T00:00:00+00:00",{"id":17,"name":144,"slug":145,"color":146,"icon":147},[198],{"id":17,"name":144,"slug":145,"color":146,"icon":147},"\u002Fblog\u002Fcovers\u002Fopentelemetry-grafana-tempo-vps-poster.svg",{"categorySlug":152,"appSlug":153},1789046171231]