pm2 datadog

Creator
Creator
Seonglae ChoSeonglae Cho
Created
Created
2020 Sep 27 13:19
Editor
Edited
Edited
2025 Dec 3 15:27
Refs
Refs
DataDog
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

  1. Install the PM2 Datadog module: Run pm2 install pm2-datadog to add the integration to your PM2 instance.
  1. Configure Datadog API key: Set your Datadog API key using pm2 set pm2-datadog:api_key YOUR_API_KEY to authenticate the connection.
  1. Customize metric collection: Optionally configure specific metrics, tags, and reporting intervals through PM2 configuration options.
  1. Verify integration: Check your Datadog dashboard to confirm that metrics are being received and displayed correctly.
 
 
 
 
 
 
 

Recommendations