[Top][All Lists]

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

Re: Exec missing part of output

From: Martin Pala
Subject: Re: Exec missing part of output
Date: Thu, 12 Feb 2015 11:44:39 +0100


if you're running monit 5.10 or newer, please run monit in debug mode and check 
output (monit will log program's output):

        monit -vI

you can modify also modify the exec action to log the output including errors:

        if failed ... then exec "/bin/bash -c '/usr/local/bin/ >> 
/tmp/myscript.log 2>&1'"


> On 11 Feb 2015, at 06:19, Francisco Reyes <address@hidden> wrote:
> I have a bash script I call from exec when a condition is met:
> #!/usr/local/bin/bash
> Log=/var/log/mysql-proc-list.log
> date >> $Log
> /usr/local/bin/mysql -e "show processlist;" >> $Log
> if I run that script manually I get the expected result. First date a line 
> then followed by output of the command. However, when I run the above from 
> monit from a triggered condition only the date line shows.
> Any ideas or suggestions?
> --
> To unsubscribe:

reply via email to

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