[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Very simple monit of a perl file - how to do it?

From: Bruce B
Subject: Very simple monit of a perl file - how to do it?
Date: Mon, 27 Dec 2010 21:57:11 -0500

Hi Everyone,

I am very new to monit. I have a perl program ( which should be running 24/7 and should re-spawn if it goes dead. Of course monit is the right tool for it but I have no clue how to use it.

Here is what I do to start the program each time:

nohup perl /usr/src/ >> /dev/null

The program actually creates a file with PID in it in /var/log/

I have the following so far in my /etc/monit.conf    ( I am running CentOS) and it doesn't seem to work. 

check process holdreport with pidfile /var/log/
   start program = "/usr/src/holdReport/"
   if 5 restarts within 5 cycles then timeout

And includes:
nohup perl /usr/src/ >> /dev/null

I would love to receive alerts to my gmail if program shuts down. Please enlighten me on that too.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]