pragmatic_programmer
pragmatic_programmer

Reputation: 3746

Monit: how to alert when there is more than a process that matches?

I want to receive an alert when monit detects that there is more than a process running with the same comand (because of this How to detect orphaned sidekiq process after capistrano deploy?).

It is possible?

Upvotes: 0

Views: 39

Answers (1)

TheCodeKiller
TheCodeKiller

Reputation: 1965

Create a custom script to return a specific code when orphan are detected then use the check program to trigger action

 check orphan-sidekick myscript with path /usr/local/bin/myscript.sh
   if status != 0 then alert

Upvotes: 1

Related Questions