PM2 Datadog integration enables seamless monitoring of Node.js applications managed by PM2 through Datadog's comprehensive observability platform. This integration automatically collects and forwards application metrics, logs, and performance data to Datadog for real-time monitoring and analysis.
- Automatic Metrics Collection: Captures essential application metrics including CPU usage, memory consumption, event loop latency, and request throughput without manual instrumentation.
- Process Monitoring: Tracks the status and health of all PM2-managed processes, including restart counts, uptime, and error rates.
- Custom Metrics Support: Allows developers to define and send custom application-specific metrics to Datadog for deeper insights.
- Log Forwarding: Streams application logs directly to Datadog for centralized log management and correlation with metrics.
- Easy Configuration: Provides straightforward setup through PM2 ecosystem configuration with minimal code changes required.
Installation and Setup
- Install the PM2 Datadog module: Run
pm2 install pm2-datadogto add the integration to your PM2 instance.
- Configure Datadog API key: Set your Datadog API key using
pm2 set pm2-datadog:api_key YOUR_API_KEYto authenticate the connection.
- Customize metric collection: Optionally configure specific metrics, tags, and reporting intervals through PM2 configuration options.
- Verify integration: Check your Datadog dashboard to confirm that metrics are being received and displayed correctly.

Seonglae Cho