Hi,

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/myscript.sh >> 
/tmp/myscript.log 2>&1'"


Regards,
Martin



> On 11 Feb 2015, at 06:19, Francisco Reyes <[email protected]> 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:
> https://lists.nongnu.org/mailman/listinfo/monit-general


--
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general

Reply via email to