how many "m"s can you find in:
q: staging and production versions of same monit job i have monit configured to monitor a job for the production version of my application:
# in /etc/monitrc:
include /etc/monit/delayed_job.my_app.production.monitrc

# in /etc/monit/delayed_job.my_app.production.monitrc
check process delayed_job with pidfile /var/www/apps/myapp_production/shared/pids/delayed_job.pid
start program = "/var/www/apps/myapp_production/current/script/delayed_job -e production start"
stop program = "/var/www/apps/myapp_production/current/script/delayed_job -e production stop"

i'd like to also monitor the staging version on the same box, but i can't quite figure out whether what i want to do is allowed. my first guess was just to do a gsub/production/staging:
# in /etc/monitrc:
include /etc/monit/delayed_job.my_app.staging.monitrc

# in /etc/monit/delayed_job.my_app.staging.monitrc:
check process delayed_job with pidfile /var/www/apps/myapp_staging/shared/pids/delayed_job.pid
start program = "/var/www/apps/myapp_staging/current/script/delayed_job -e staging start"
stop program = "/var/www/apps/myapp_staging/current/script/delayed_job -e staging stop"

but now i have two processes named "delayed_job." how can i tell monit which one to start and stop?  i want to be able to do something like
monit start delayed_job.production

but i think that process name has to be the actual name of the process, which is determined by the script name.

a: i don't know monit (never used it in fact). maybe i'm a little bit naive but if you are already passing the process pid in a file, there is no reason for it to use your process name.
that would lead to a declaration as simple as:
check process delayed_job.production with pidfile ...
did you already give it a try?

user
In that passage, there are 45 occurrences of the letter "m."
assistant