monit-general
[Top][All Lists]
Advanced

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

Re: Problems with external script execution


From: Martin Pala
Subject: Re: Problems with external script execution
Date: Tue, 12 Jul 2016 14:03:35 +0300

Hello,

your script will be executed only if the port connection failed ... if you 
simulate the error condition for example by stopping redis, it won't trigger 
the script, as monit will detect that redis is not running at all and will try 
to restart it.  The port connection test is not performer if the process is not 
running.

Please check monit log for details.

Regards,
Martin

12. 7. 2016 v 12:41, Andrea Gagliardi <address@hidden>:

> Hallo.
> 
> Each time i try to execute external scripts I get nothing (script is not 
> executed)
> 
> Using monit -Ivv for debug I get:
> 
> -------------------------------------------------------------------------------
>    monit() [0x41b6b3]
>    monit() [0x41be0f]
>    monit() [0x416a25]
>    monit() [0x42cf6d]
>    monit() [0x42b40a]
>    monit() [0x412598]
>    monit() [0x4132fd]
>    /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf0) [0x7f737535b830]
>    monit() [0x404d2a]
> 
> And no execution of script will happen (even a simple touch of a file)
> 
> Tried monit 5.16 (from ubuntu) and 5.18 (from official tar.gz 64bit)
> 
> Configuration is:
> 
> check process redis with pidfile /run/redis/redis-server.pid
>    if failed host 127.0.0.1 port 6379 then exec "/home/pushover/test.sh"
> 
> or
> 
> check process redis with pidfile /run/redis/redis-server.pid
>    if failed host 127.0.0.1 port 6379 then exec "/bin/bash -c 
> '/home/pushover/test.sh'"
> 
> OS is Ubuntu 16.04
> 
> Thanks
> 
> andrea :: netlite.it
> 




reply via email to

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