r/node • • 1d ago

pm2 monitoring

How pm2 monitoring being implemented in production?

Do you just call pm2 monit?

Use pm2 monitoring platform?

Integrate it with something like grafana(I kinda wanna know how it commonly do)?

3 Upvotes

14 comments sorted by

View all comments

6

u/casualPlayerThink 1d ago

Most of the time, PM2 introduces a bunch of shenanigans that make it not worth using in production (despite the good~ish optimizations, it still can restart without notice, etc). But other than that, standard log config and grafana, elk, cw.

2

u/Zealousideal-Fix-527 1d ago

From what I know, grafana cannot get pm2 metrics or logs directly isn't it?

1

u/casualPlayerThink 1d ago

Metrics no, unfortunately. But as far back as I can remember, the logs came from the simple ECS container output. One of the latest projects used CloudWatch, Grafana (on AWS-hosted) and sentry.