monit-general
[Top][All Lists]
Advanced

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

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


From: Bruce B
Subject: Re: Very simple monit of a perl file - how to do it?
Date: Tue, 28 Dec 2010 18:22:40 -0500

Anything to this guys?

Thanks,

On Mon, Dec 27, 2010 at 9:57 PM, Bruce B <address@hidden> wrote:
Hi Everyone,

I am very new to monit. I have a perl program (test.pl) 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/test.pl >> /dev/null

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

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/test.pid
   start program = "/usr/src/holdReport/startTest.sh"
   if 5 restarts within 5 cycles then timeout

And startTest.sh includes:
nohup perl /usr/src/test.pl >> /dev/null


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

Thanks,
Bruce



reply via email to

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