monit-general
[Top][All Lists]
Advanced

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

Re: Test output of a script


From: Socki
Subject: Re: Test output of a script
Date: Fri, 21 Sep 2012 16:43:20 +0200
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:15.0) Gecko/20120907 Thunderbird/15.0.1

Hi Andrew,

it THINK this is not possible yet, since the "check program" routine has been added in 5.3 and i couldn't find any clue according analyzing the stdout in the changelogs since 5.3.
I might be wrong, but i think, that you still have to use the exit stati of your script.

Greetings
Socke


On 18 Sep 2012, at 10:10, Andrew Holt wrote:
[...]

It would be more useful if I could do something like:

check program testscript with path "/root/Scripts/tst.sh" with timeout 100 seconds
    if atoi(stdout) < 0 then alert
    if stdout) > 22 then exec '/usr/local/bin/hot.sh'
    if stdout < 17 then exec '/usr/local/bin/cold.sh'

Of course you may have a better way . . . .



reply via email to

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