I didn't have luck calling 'monit reload' from within monit.  It didn't
trigger a reload of the configuration files.  However, sending a SIGHUP did
work.  I didn't dig in to determine why though.

It sounds like the best option for us is going to be a wrapper of some
kind, or to modify the organization of our design somewhat.  Thank you for
the discussion.

Best,
Eric

On Tue, May 19, 2020 at 3:22 PM Lutz Mader <[email protected]> wrote:

> Hello Eric,
> I use "monit -t" or "monit -t -c file.cfg" followed by a "monit reload"
> if "$?" is "0" to reload the configuration.
> I've never use "kill -HUP pid" to send singnals to monit, but "kill
> -HUP" works like reload and "kill -TERM" like quit.
>
> With regards,
> Lutz
>
>
> Am 19.05.20 um 05:32 schrieb Eric Montellese:
> >  I may have some availability to contribute if watching a directory for
> any
> > file changes is desired.
> >
> > This can be accomplished with inotify.
> > http://man7.org/linux/man-pages/man7/inotify.7.html
> >
> > Could you also please confirm that it is reasonable to send a SIGHUP to
> > monit from monit itself?
> >
> > Also, thank you for monit -- it's a terrific tool.
> >
> > Best,
> > Eric
> >
> >
> >
> > On Mon, May 18, 2020 at 5:53 PM Lutz Mader <[email protected]>
> wrote:
> >
> >> Hell Eric,
> >> yes, file updates can not monitored by the folder timestamp.
> >> But you can add and delete an additional dummy file to change the folder
> >> timestamp.
> >> I have no idea how to implement your requirements, sorry.
> >>
> >> I add and delete configuration files into the config folder, only. This
> >> fits to my requiremts of a dynamic configuration for monit.
> >>
> >> With regard,
> >> Lutz
> >>
> >>
> >> Am 18.05.20 um 06:30 schrieb Eric Montellese:
> >>> Unfortunately, the timestamp of a directory is not updated when a file
> is
> >>> modified within a directory.  'inotify' can be used to watch a
> directory
> >>> for all changes to all files, but inotify functionality would need to
> be
> >>> added to monit.  I suppose the timestampe issue could be worked around
> by
> >>> always deleting a file and re-adding it (rather than modifying in
> place),
> >>> but we'd like to avoid any requirements or "things to remember".
> >>>
> >>> Best,
> >>> Eric
> >>>
> >>>
> >>>
> >>>
> >>> Eric Montellese
> >>> EME, Inc.
> >>> 434-987-6124
> >>> emeforward.com
> >>>
> >>>
> >>> On Sun, May 17, 2020 at 10:56 AM Lutz Mader <[email protected]>
> >> wrote:
> >>>
> >>>> Hello Eric,
> >>>> you can use monit to monitor the config folder.
> >>>>
> >>>>> One option that we've tested is to have a separate process (or
> wrapper)
> >>>>> that runs inotify on the configuration files, and sends SIGHUP to
> monit
> >>>> if
> >>>>> a change is detected.  This works, but it seems a shame to add a
> >> separate
> >>>>> monitor for monit.
> >>>>
> >>>> All the time a config file will added or removed the timestamp of the
> >>>> folder will change. If you find out the folder was changed you can
> check
> >>>> the config and if the test was passed you can reload the config.
> >>>>
> >>>> Monit is used to monitor monit, but this is an easy way to reload the
> >>>> config after some changes. From my point of view.
> >>>>
> >>>> With regards,
> >>>> Lutz
> >>>>
> >>>>
> >>>
> >>
> >>
> >>
> >
>
>
>

Reply via email to