I have 2 items in my config (detailed below). I just want ntpd to start after openvpn_server has started. What is happening is that monit is trying starting ntpd every time throught the check
[BST May 23 12:42:39] debug : Monitoring enabled -- service openvpn_server
[BST May 23 12:42:39] debug : monit: pidfile '/var/run/ntpd.pid' does not exist [BST May 23 12:42:39] info : 'ntpd' start: /etc/init.d/ntpd [BST May 23 12:42:39] debug : monit: pidfile '/var/run/ntpd.pid' does not exist
[BST May 23 12:42:39] debug : monit: pidfile '/var/run/ntpd.pid' does not exist [BST May 23 12:42:40] debug : Monitoring enabled -- service ntpd [BST May 23 12:42:40] info : 'named' start: /etc/init.d/named
[BST May 23 12:42:41] debug : Monitoring enabled -- service named [BST May 23 12:42:41] debug : 'ntpd' check skipped -- service already handled in a dependency chain
address@hidden monit.d]# cat ntpd.monit
############################################################################## ## THIS FILE IS VERSION CONTROLLED USING SVN. DO NOT HAND EDIT THESE FIELDS ## ----------------------------------------------------------------------------
## $HeadURL: https://62.254.209.241/svn/projects/unb/releases/lugworm_2.8.x/trunk/core/linux/packages/ntpd/cs_ntpd.monit $
## $Revision: 16248 $ ## $Author: nu $ ## $Date: 2011-05-11 14:50:43 +0100 (Wed, 11 May 2011) $ ## ---------------------------------------------------------------------------- ################################################################################
# check ntpd is running and alert if not # check process ntpd with pidfile "/var/run/ntpd.pid" start program = "/etc/init.d/ntpd start" stop program = "/etc/init.d/ntpd stop"
depends on openvpn_server
group system address@hidden monit.d]# cat openvpn_server.monit #!/bin/bash # ############################################################################ # Copyright (c) 2007 Plextek Limited, Great Chesterford, England.
# All Rights Reserved # # Project Rings # # ############################################################################ # THIS FILE IS VERSION CONTROLLED USING SVN. DO NOT HAND EDIT THESE FIELDS # ----------------------------------------------------------------------------
# $HeadURL: https://62.254.209.241/svn/projects/unb/releases/lugworm_2.8.x/trunk/sl/linux/packages/openvpn/cs_openvpn.monit $
# $Revision:: 15967 $ # $Author:: nu $ # $Date:: 2011-04-02 09:54:24 +0100 (Sat, 02 Apr 2011) $
# ############################################################################ # # File Description (User Field) # ================ # # CS OpenVPN Monit configuration # # ############################################################################
# Server instance 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"
if failed host localhost port 1194 type udp then restart group system group network group primary