Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question

1 Answer 1

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"
share|improve this answer
    
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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.