I'm having two PHP scripts acting as RabbitMQ Consumers and i want them to be started and monitored (+ automatically restarted) through monit.
My /etc/monitrc for the two processes looks like this:
check process php-magento-category
matching "openerp:category:consumer"
start program = "/usr/bin/php /home/dev/magento/base/magento2/bin/magento openerp:category:consumer"
as uid cehrig and gid cehrig
check process php-magento-product
matching "openerp:product:consumer"
start program = "/usr/bin/php /home/dev/magento/base/magento2/bin/magento openerp:product:consumer"
as uid cehrig and gid cehrig
In fact, monit only startes the first of both processes making ps fax look like this:
4622 ? Sl 0:00 monit
5036 ? Ss 0:00 \_ /usr/bin/php /home/dev/magento/base/magento2/bin/magento openerp:category:consumer
The second PHP process is never spawned. Monit Status looks like this
Process 'php-magento-category'
status Initializing
monitoring status Initializing
monitoring mode active
on reboot start
data collected Tue, 10 Jan 2017 10:50:58
Process 'php-magento-product'
status Execution failed | Does not exist
monitoring status Monitored
monitoring mode active
on reboot start
data collected Tue, 10 Jan 2017 10:51:28
Could somebody point me to the right direction of how to fix that? Thanks in advance.