Cross-Platform Monitoring Metrics Mapping

infoCross-Platform

Understanding how NGINX metrics map across different monitoring platforms (Datadog, Prometheus, CloudWatch) and what each platform provides.

Prompt: I'm migrating from Datadog to Prometheus for NGINX monitoring. How do the metrics map between platforms and what's the equivalent of Datadog's nginx.net.connections in Prometheus? Do I need to enable different NGINX modules for each platform?

Agent Playbook

When an agent encounters this scenario, Schema provides these diagnostic steps automatically.

When migrating NGINX monitoring from Datadog to Prometheus, start by mapping the core connection state metrics, then verify module requirements and understand the semantic differences in how each platform exposes metrics (aggregated vs. labeled, rates vs. counters). The key is recognizing that Prometheus uses cumulative counters with labels while Datadog often provides pre-aggregated rates.

1Map connection state metrics from Datadog to Prometheus
Datadog's `nginx.net.connections` aggregates multiple connection states into one metric. In Prometheus, this maps to separate metrics: `nginx-net-reading`, `nginx-net-writing`, and `nginx-net-waiting`. These three metrics represent connections reading requests, writing responses, and idle keep-alive connections respectively. The total active connections would be the sum of these three states, which you'd query in Prometheus as `nginx_connections_active{state="reading"}` + `writing` + `waiting`.
2Understand counter vs. rate metric semantics
Datadog metrics like `nginx-net-backend-opened-per-s` and `nginx-net-request-per-s` are pre-calculated rates. Prometheus exposes cumulative counters instead (e.g., `nginx_connections_accepted_total`, `nginx_http_requests_total`), which you convert to rates using `rate()` or `irate()` functions in PromQL. This means `nginx-backend-accepted` and `nginx-backend-handled` are counters you'll query as `rate(nginx_connections_accepted[5m])` to get per-second rates equivalent to Datadog's automatic rate calculations.
3Verify NGINX module requirements for both platforms
Both Datadog and Prometheus can use the stub_status module (open source NGINX) for basic metrics like `nginx-requested`, `nginx-backend-accepted`, and connection states. However, metrics like `nginx-server-zone-responses-5xx` and `nginx-upstream-peers-response-time` require NGINX Plus with the API module enabled. For Prometheus, you'll need to deploy nginx-prometheus-exporter to scrape the stub_status endpoint, or use nginx-module-vts for more detailed metrics comparable to NGINX Plus. The module requirements are the same; only the exporter differs.
4Map status code metrics and understand label-based aggregation
Datadog exposes separate metrics for status codes (`nginx-server-zone-responses-5xx-datadog`, `nginx-server-zone-responses-2xx`), while Prometheus uses a single metric with labels like `nginx_server_zone_responses_total{code="5xx"}` or `{code="2xx"}`. This means you'll need to rewrite your alert rules and dashboards to use label selectors. If you're filtering by specific server zones or upstreams, Prometheus will have additional labels that increase cardinality but provide more granular filtering capabilities than Datadog's tag-based approach.
5Test metric parity by running both exporters in parallel
Before cutting over, run both Datadog and Prometheus exporters simultaneously and compare the values. Use `nginx-requested` (total requests) and `nginx-backend-current` (current connections) as baseline checks—these should match exactly between platforms. If you see discrepancies in rate metrics like `nginx-net-request-per-s`, verify your Prometheus time windows in `rate()` functions match Datadog's aggregation intervals. Run this parallel setup for at least 24 hours to catch any edge cases in metric collection during traffic spikes or upstream failures.
6Assess gaps in upstream performance metrics
If you're monitoring upstream response times with `nginx-upstream-peers-response-time` in Datadog, verify this metric is available in your Prometheus setup. This metric requires NGINX Plus or the VTS module; it's not available from basic stub_status. If you're on open source NGINX and need this visibility, you'll either need to add the VTS module or instrument your upstreams separately. This is the most common gap when migrating from Datadog NGINX Plus integration to Prometheus with basic stub_status.

Technologies

Relevant Metrics

Monitoring Interfaces

NGINX Datadog
NGINX OpenTelemetry