문제

I have 2 rails apps hosted on the same server and each one of them have its own configuration for thinking_sphinx /searchd with different ports configured. I managed to get this set up working and I have 2 instances of searchd running.

My problem is getting Monit to monitor these 2 instances. Even though these 2 instances of searchd have its own PID in separate directories, I was not able to define the configuration in the monitrc because the process names in this case are the same, namely searchd.

In my monitrc, i have 2 separate commands as follows:

check process searchd with pidfile /var/www/app1/shared/pids/production.sphinx.pid
start program=....
stop program=....
check process searchd with pidfile /var/www/app2/shared/pids/production.sphinx.pid
start program=...
stop program=...

Monit requires a unique process name. Is it possible to start up my second instance of searchd using a different process name? Thanks for the help.

도움이 되었습니까?

해결책

You can call the process whatever you wish in monit configuration files - it doesn't need to match the executable. So:

check process searchd_app1 with pidfile /var/www/app1/shared/pids/production.sphinx.pid
  start program=....
  stop program=....
check process searchd_app2 with pidfile /var/www/app2/shared/pids/production.sphinx.pid
  start program=...
  stop program=...
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top