How can Monit be used to monitor a simple script that creates no PID file and is running in the background within a detached screen session?
Asked
Active
Viewed 117 times
1 Answers
0
See Documentation regarding CHECK PROCESS. It's as simple as
CHECK PROCESS myProcName MATCHING "my_detached_script.sh"
It checks for Processes containing "my_detached_script.sh" (note: It's a regex. So it also matches "my_detached_script-sh" and so on). It can be any valid regex. You might want to check your regex with monit procmatch '<YourRegexHere>'
to match your needs.
![](../../users/profiles/497861.webp)
boppy
- 476
- 2
- 5