-
Notifications
You must be signed in to change notification settings - Fork 134
Setting Up Application Monitoring using Pm2 and grafana
Emmanuel Nwanochie edited this page Aug 24, 2024
·
4 revisions
This guide outlines the steps to set up application monitoring using PM2, Prometheus, and Grafana.
- Install PM2 globally
- Install PM2 metrics
- Configure Prometheus to scrape PM2 metrics
- Import Grafana dashboard for PM2 metrics
npm install -g pm2
pm2 install pm2-prometheus-exporter
scrape_configs:
- job_name: 'pm2'
static_configs:
- targets: ['localhost:9209']
Restart Prometheus to apply changes.
In Grafana, go to "Create" > "Import" Enter the dashboard ID for a PM2 dashboard (e.g., 14371) Select your Prometheus data source Click "Import"
For detailed instructions on setting up Prometheus and Grafana, please refer to: Server Monitoring And Alerts · hngprojects/hng_boilerplate_python_fastapi_web Wiki (github.com) This guide provides comprehensive information on configuring Prometheus and Grafana for server monitoring and alerts.
- Introduction
- Server Setup
- PostgreSQL Setup
- NGINX installation
- RabbitMQ
- Cloning of repo and creating of app directories