0

Is something like this possible with monit:

check process foo with bar
check process foo2 with bar2
  start program = "baz start"
  stop program = "baz stop"

Basically I'm looking for an "OR" condition.

mahemoff
  • 197
  • 11

1 Answers1

0

It's not exactly OR condition you asked for but take a look at check process <name> matching <regex> syntax.

CHECK PROCESS <unique name> MATCHING <regex>

<regex> is alternative process specification using pattern matching
to process name (command line) from process table instead of pidfile.

Example:

check process foo_foo2 matching "foo_name|foo2_name"
  start program = "baz start"
  stop program  = "baz stop"
kupson
  • 3,388
  • 18
  • 18
  • Thanks, ideally I'd want to match the pidfile though, but "pidfile matching" doesn't seem to be valid. – mahemoff Mar 14 '12 at 15:37