Hi,

Monit < 5.7 supported only path to script - not arguments.

Monit 5.7+ has support for inlined arguments in check program. Monit 5.7 
changelog excerpt:

--8<--
New: Arguments added to 'check program'. Arguments are whitespace
separated strings. For instance:

  check program list-files with path "/bin/ls -l -r -t /tmp"
        if status != 0 then alert
--8<--

Regards,
Martin



> On 01 Dec 2014, at 11:09, Ben Soot <[email protected]> wrote:
> 
> Hi there
> 
> Using monit 5.4 on debian wheezy:
> 
> I have the following line in my monitrc file, to alert when a error log is 
> present:
> 
> 
> check program err_file_exists with path "/bin/ls /home/foo/err.log"
>    if status = 0 then alert
> 
> This gives me a warning:
> 
> 
> ~$ sudo monit -t /etc/monit/monitrc
> /etc/monit/monitrc:80: Warning: Program does not exist: '"/bin/ls 
> /home/foo/err.log"'
> 
> And also it does not alert me when the file is present so basically does not 
> work.
> 
> I cannot figure out what is wrong in the syntax? I am using monit 5.4.
> 
> 
> 
> Thanks Ben
> 
> 
> --
> To unsubscribe:
> https://lists.nongnu.org/mailman/listinfo/monit-general


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

Reply via email to