Unitech / Unitech/pm2

Can we determine the status of a process by customized command/script?

Open
#5,550 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
43.3k
Forks
2.7k
PR merge metrics
No merged PRs in 30d

Description

I need to monitor a java server application that may sometimes be running but not operating correctly.
Can pm2 monitor it by running some script to test the service status and restart if the script is returning non-zero?
Can we set the interval for script monitoring as well?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing PM2's existing process monitoring and restart behavior, then determine where a custom status script and its interval would fit. The issue describes a Java server, a script that returns non-zero when unhealthy, and automatic restart; done should include documented behavior for script execution, interval configuration, and restart handling.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, javascript, nodejs
Domain
cli, observability
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.