monit-general
[Top][All Lists]
Advanced

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

depend fails


From: Nick Upson
Subject: depend fails
Date: Fri, 13 May 2011 14:18:51 +0100

Hi,

I'm trying to make the startup of a process depend upon the contents of a file but it doesn't seems to work.
as the file doesn't exist the check should fail, so why does the process try and start? the same happens if the file
exists but doesn't contain "PRIMARY"

### config file
check process openvpn_server with pidfile "/var/run/openvpn_server.pid"
start program = "/etc/init.d/openvpn_server start" with timeout 5 seconds
stop  program = "/etc/init.d/openvpn_server stop"
depends on primary

check file primary with path /tmp/primary
    if match "PRIMARY" then exec "/bin/echo ok >> /tmp/ptest.log"

### monit logfile
[BST May 13 14:12:43] info     : Starting monit daemon with http interface at [*:2812]
[BST May 13 14:12:43] info     : Starting monit HTTP server at [*:2812]
[BST May 13 14:12:43] info     : monit HTTP server started
[BST May 13 14:12:43] info     : 'sl_cs' Monit started
[BST May 13 14:12:43] error    : 'primary' file doesn't exist
[BST May 13 14:12:43] info     : 'primary' trying to restart
[BST May 13 14:12:43] info     : 'openvpn_server' stop: /etc/init.d/openvpn_server
[BST May 13 14:12:44] info     : 'openvpn_server' start: /etc/init.d/openvpn_server


--
Nick Upson (01799 533252)


reply via email to

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