monit-general
[Top][All Lists]
Advanced

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

Re: non-existing program test


From: Roland Giesler
Subject: Re: non-existing program test
Date: Thu, 25 Mar 2021 12:43:09 +0200

Use the test to check for the file existence, instead of this.



On Thu, 25 Mar 2021 at 12:31, Gerrit Kuehn <gerrit.kuehn@aei.mpg.de> wrote:
Hello,

I have a program like like this:

---
check program mx_status with path "/opt/scripts/mx_auto.sh"
---


This works as expected of the program exists, but fails on monit
startup if it doesn't:

---
# monit -t
/etc/monit.d/mx_auto.conf:3: Program does not exist:
'/opt/scripts/mytypo.sh'
/etc/monit.d/mx_auto.conf:3: Program does not exist:
'/opt/scripts/mytypo.sh'
AssertException: File ''/opt/scripts/mytypo.sh'' does not exist
 raised in Command_new at src/system/Command.c:357
---


My feeling is that this reaction is rather harsh. If the program to
test does not exist, I'd rather expect the single test to fail. Is
there a reason why monit even refuses to start up in this case?


cu
  Gerrit


reply via email to

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