I use PM2 to start my application in cluster mode. But as I know, in that case PM2 does not allow to run my code in master process, but I need to collect metrics (CPU usage, memory etc.).
Is it possible to aggregate metrics or get metrics for whole app (PM2 cluster mode) in child workers and, for example, show these metrics on /metrics
route?
Unfortunately, I cannot to find any open source libs for that :(
I found pm2 web + pmx
. It is solved my problem.