0

I created a daemon using the System_Daemon pear package. How do I use Monit to restart the daemon when it fails.

I have the following code that was going to place in the monit config gile:

check process merge with pidfile /var/www/merge/merge.pid
group 1000
start program = "/etc/init.d/merge start"
stop program = "/etc/init.d/merge stop"
if failed host IPADDRESS port 80
then restart
if 5 restarts within 5 cycles then timeout

Is that the right way to monitor a custom daemon?

Carlos
  • 4,949
  • 2
  • 20
  • 37
Chris Hansen
  • 7,813
  • 15
  • 81
  • 165

1 Answers1

0

I'd say it looks quite correct.

If you ask, I guess it is because you are facing issues. Can you elaborate?

brisssou
  • 499
  • 6
  • 12