Auto-reload of configuration files

Next Topic
 
classic Classic list List threaded Threaded
18 messages Options
Reply | Threaded
Open this post in threaded view
|

Auto-reload of configuration files

Eric Montellese
Greetings Monit Community!

I'm working on a project that would like the ability to re-load the monit configuration automatically when it changes.

In the simplest case, this result can be produced with a monit rule that sends SIGHUP to the monit process whenever the main monit configuration file changes, for example:

check file monit_config with path /path/to/monitrc

     if changed checksum then exec "/usr/bin/killall -s SIGHUP monit"


1.  As a preliminary question -- can you see an issue with this pattern?

It does seem to be working as expected.  However, the intended design is to have the main monit configuration file call

include /path/to/monit.d/*

and to allow third parties to add or change files in this directory.

2.  Is there an existing way to check for changes (and additions and deletions) to any file within a directory (it does not appear to be baked in).  If not, is there a standard way that this has been accomplished by others?  I can see a number of possible solutions.  (A script to generate a checksum of all files, a separate application that uses inotify and sets a flag, etc)

3.  Would there be interest by the community in taking a patch that allows the option to automatically re-load the configuration files if they change.  Somethilng like a "set autoreload" in the config file which would trigger monit to monitor it's own configuration?

4.  Would there be interest by the community in a patch that allows watching a given directory for any changes?

Best Regards,
Eric
Reply | Threaded
Open this post in threaded view
|

Re: Auto-reload of configuration files

Rory Toma-3

If you’re going to have it automatically reload, you’ll want to make sure that the syntax is ok first. I don’t know what happens if you SIGHUP monit and it has an invalid config file.

 

From: monit-general <monit-general-bounces+rory=[hidden email]> on behalf of Eric Montellese <[hidden email]>
Reply-To: This is the general mailing list for monit <[hidden email]>
Date: Friday, May 15, 2020 at 8:25 PM
To: <[hidden email]>
Subject: Auto-reload of configuration files

 

Greetings Monit Community!

 

I'm working on a project that would like the ability to re-load the monit configuration automatically when it changes.

 

In the simplest case, this result can be produced with a monit rule that sends SIGHUP to the monit process whenever the main monit configuration file changes, for example:

 

check file monit_config with path /path/to/monitrc

     if changed checksum then exec "/usr/bin/killall -s SIGHUP monit"

 

1.  As a preliminary question -- can you see an issue with this pattern?

 

It does seem to be working as expected.  However, the intended design is to have the main monit configuration file call

 

include /path/to/monit.d/*

 

and to allow third parties to add or change files in this directory.

 

2.  Is there an existing way to check for changes (and additions and deletions) to any file within a directory (it does not appear to be baked in).  If not, is there a standard way that this has been accomplished by others?  I can see a number of possible solutions.  (A script to generate a checksum of all files, a separate application that uses inotify and sets a flag, etc)

 

3.  Would there be interest by the community in taking a patch that allows the option to automatically re-load the configuration files if they change.  Somethilng like a "set autoreload" in the config file which would trigger monit to monitor it's own configuration?

 

4.  Would there be interest by the community in a patch that allows watching a given directory for any changes?

 

Best Regards,

Eric

Reply | Threaded
Open this post in threaded view
|

Re: Auto-reload of configuration files

Eric Montellese
Indeed that's true -- monit will stop if an invalid configuration file is added (and automatically reloaded).

For the purposes of this project, we can consider these configuration files to be pre-verified.


On Fri, May 15, 2020 at 11:31 PM Rory Toma <[hidden email]> wrote:

If you’re going to have it automatically reload, you’ll want to make sure that the syntax is ok first. I don’t know what happens if you SIGHUP monit and it has an invalid config file.

 

From: monit-general <monit-general-bounces+rory=[hidden email]> on behalf of Eric Montellese <[hidden email]>
Reply-To: This is the general mailing list for monit <[hidden email]>
Date: Friday, May 15, 2020 at 8:25 PM
To: <[hidden email]>
Subject: Auto-reload of configuration files

 

Greetings Monit Community!

 

I'm working on a project that would like the ability to re-load the monit configuration automatically when it changes.

 

In the simplest case, this result can be produced with a monit rule that sends SIGHUP to the monit process whenever the main monit configuration file changes, for example:

 

check file monit_config with path /path/to/monitrc

     if changed checksum then exec "/usr/bin/killall -s SIGHUP monit"

 

1.  As a preliminary question -- can you see an issue with this pattern?

 

It does seem to be working as expected.  However, the intended design is to have the main monit configuration file call

 

include /path/to/monit.d/*

 

and to allow third parties to add or change files in this directory.

 

2.  Is there an existing way to check for changes (and additions and deletions) to any file within a directory (it does not appear to be baked in).  If not, is there a standard way that this has been accomplished by others?  I can see a number of possible solutions.  (A script to generate a checksum of all files, a separate application that uses inotify and sets a flag, etc)

 

3.  Would there be interest by the community in taking a patch that allows the option to automatically re-load the configuration files if they change.  Somethilng like a "set autoreload" in the config file which would trigger monit to monitor it's own configuration?

 

4.  Would there be interest by the community in a patch that allows watching a given directory for any changes?

 

Best Regards,

Eric

Reply | Threaded
Open this post in threaded view
|

Re: Auto-reload of configuration files

PhilTee
In reply to this post by Eric Montellese
Have a look at incrond

It monitors for file system events, and performs configured actions when it detects a new file, or a file write being closed.

Best,
Phil


On Sat, 16 May 2020, 1:25 am Eric Montellese, <[hidden email]> wrote:
Greetings Monit Community!

I'm working on a project that would like the ability to re-load the monit configuration automatically when it changes.

In the simplest case, this result can be produced with a monit rule that sends SIGHUP to the monit process whenever the main monit configuration file changes, for example:

check file monit_config with path /path/to/monitrc

     if changed checksum then exec "/usr/bin/killall -s SIGHUP monit"


1.  As a preliminary question -- can you see an issue with this pattern?

It does seem to be working as expected.  However, the intended design is to have the main monit configuration file call

include /path/to/monit.d/*

and to allow third parties to add or change files in this directory.

2.  Is there an existing way to check for changes (and additions and deletions) to any file within a directory (it does not appear to be baked in).  If not, is there a standard way that this has been accomplished by others?  I can see a number of possible solutions.  (A script to generate a checksum of all files, a separate application that uses inotify and sets a flag, etc)

3.  Would there be interest by the community in taking a patch that allows the option to automatically re-load the configuration files if they change.  Somethilng like a "set autoreload" in the config file which would trigger monit to monitor it's own configuration?

4.  Would there be interest by the community in a patch that allows watching a given directory for any changes?

Best Regards,
Eric
Reply | Threaded
Open this post in threaded view
|

Re: Auto-reload of configuration files

Eric Montellese
incrond would definitely work in a normal case; however, to further complicate things, the project target is an embedded platform (OpenWrt-based), so adding additional tools is less-desirable.

We could certainly write a wrapper around monit -- but if auto-reload / inotify-based events are valuable to others, we'd rather incorporate it.

Best,
Eric






On Sat, May 16, 2020 at 12:53 PM Phil Townes <[hidden email]> wrote:
Have a look at incrond

It monitors for file system events, and performs configured actions when it detects a new file, or a file write being closed.

Best,
Phil


On Sat, 16 May 2020, 1:25 am Eric Montellese, <[hidden email]> wrote:
Greetings Monit Community!

I'm working on a project that would like the ability to re-load the monit configuration automatically when it changes.

In the simplest case, this result can be produced with a monit rule that sends SIGHUP to the monit process whenever the main monit configuration file changes, for example:

check file monit_config with path /path/to/monitrc

     if changed checksum then exec "/usr/bin/killall -s SIGHUP monit"


1.  As a preliminary question -- can you see an issue with this pattern?

It does seem to be working as expected.  However, the intended design is to have the main monit configuration file call

include /path/to/monit.d/*

and to allow third parties to add or change files in this directory.

2.  Is there an existing way to check for changes (and additions and deletions) to any file within a directory (it does not appear to be baked in).  If not, is there a standard way that this has been accomplished by others?  I can see a number of possible solutions.  (A script to generate a checksum of all files, a separate application that uses inotify and sets a flag, etc)

3.  Would there be interest by the community in taking a patch that allows the option to automatically re-load the configuration files if they change.  Somethilng like a "set autoreload" in the config file which would trigger monit to monitor it's own configuration?

4.  Would there be interest by the community in a patch that allows watching a given directory for any changes?

Best Regards,
Eric
Reply | Threaded
Open this post in threaded view
|

Re: Auto-reload of configuration files

Lutz Mader
In reply to this post by Eric Montellese
Hello Eric,
are you interresting in doing an config reload only.

> I'm working on a project that would like the ability to re-load the monit
> configuration automatically when it changes.

I do monitoring some application server folder to find new application
to be configured to monit and add the additional configuration based on
a template.
After I create a new config file based on the template I use the syntax
check to check the new config file. If the check will be passed, the new
config will be loaded by reinitializing monit.

This is my way, but I never monitor the monit config folder to find
changes and do an automatic reload.

With regards,
Lutz

Reply | Threaded
Open this post in threaded view
|

Re: Auto-reload of configuration files

Eric Montellese
Thanks for the input -

Yes, we're looking to automatically reload monit's configuration if a monit configuration file changes.  The idea being that various (pre-tested) applications with their own monit configurations can be added and removed automatically.

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.  

Best Regards,
Eric




On Sat, May 16, 2020 at 3:10 PM Lutz Mader <[hidden email]> wrote:
Hello Eric,
are you interresting in doing an config reload only.

> I'm working on a project that would like the ability to re-load the monit
> configuration automatically when it changes.

I do monitoring some application server folder to find new application
to be configured to monit and add the additional configuration based on
a template.
After I create a new config file based on the template I use the syntax
check to check the new config file. If the check will be passed, the new
config will be loaded by reinitializing monit.

This is my way, but I never monitor the monit config folder to find
changes and do an automatic reload.

With regards,
Lutz

Reply | Threaded
Open this post in threaded view
|

Re: Auto-reload of configuration files

Leif Gustafson
Could you use the "check program" functionality?  Have monit run a script which reads the monit control file and in a deterministic manner follows includes and generates a checksum.  If the final checksum differs from the previous cycle, run "monit -t" and conditionally send SIGHUP?  This seems like it would be more of a self-contained solution in the sense that it wouldn't require wrapping monit's initialization or external daemons, and wouldn't be dependent on inotify.

On May 16, 2020 1:07 PM, Eric Montellese <[hidden email]> wrote:
Thanks for the input -

Yes, we're looking to automatically reload monit's configuration if a monit configuration file changes.  The idea being that various (pre-tested) applications with their own monit configurations can be added and removed automatically.

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.  

Best Regards,
Eric




On Sat, May 16, 2020 at 3:10 PM Lutz Mader <[hidden email]> wrote:
Hello Eric,
are you interresting in doing an config reload only.

> I'm working on a project that would like the ability to re-load the monit
> configuration automatically when it changes.

I do monitoring some application server folder to find new application
to be configured to monit and add the additional configuration based on
a template.
After I create a new config file based on the template I use the syntax
check to check the new config file. If the check will be passed, the new
config will be loaded by reinitializing monit.

This is my way, but I never monitor the monit config folder to find
changes and do an automatic reload.

With regards,
Lutz


Reply | Threaded
Open this post in threaded view
|

Re: Auto-reload of configuration files

Lutz Mader
In reply to this post by Eric Montellese
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 | Threaded
Open this post in threaded view
|

Re: Auto-reload of configuration files

Lutz Mader
In reply to this post by Leif Gustafson
Hello Leif,
it is more easy to monitor the config folder, where the configuration is
stored.

> Could you use the "check program" functionality?

Or you monitor the monitrc file, if the whole config is in the monitrc file.

With regards,
Lutz



Reply | Threaded
Open this post in threaded view
|

Re: Auto-reload of configuration files

Eric Montellese
In reply to this post by Lutz Mader
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


On Sun, May 17, 2020 at 10:56 AM Lutz Mader <[hidden email]> 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 | Threaded
Open this post in threaded view
|

Re: Auto-reload of configuration files

Leif Gustafson
In reply to this post by Lutz Mader
The reasoning for suggesting the approach of recursively following includes was to support multiple configuration directories, and to detect changes in arbitrarily included config files without any other configuration elements within monit itself or external daemons.  It does push the complexity to the script of course.

On May 17, 2020 6:58 AM, Lutz Mader <[hidden email]> wrote:

Hello Leif,
it is more easy to monitor the config folder, where the configuration is
stored.

> Could you use the "check program" functionality?

Or you monitor the monitrc file, if the whole config is in the monitrc file.

With regards,
Lutz




Reply | Threaded
Open this post in threaded view
|

Re: Auto-reload of configuration files

Lutz Mader
In reply to this post by Eric Montellese
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 <[hidden email]> 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 | Threaded
Open this post in threaded view
|

Re: Auto-reload of configuration files

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.

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 <[hidden email]> 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 <[hidden email]> 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 | Threaded
Open this post in threaded view
|

Re: Auto-reload of configuration files

Lutz Mader
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 <[hidden email]> 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 <[hidden email]>
>> 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 | Threaded
Open this post in threaded view
|

Re: Auto-reload of configuration files

Eric Montellese
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 <[hidden email]> 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 <[hidden email]> 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 <[hidden email]>
>> 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 | Threaded
Open this post in threaded view
|

Re: Auto-reload of configuration files

Lutz Mader
Hello Eric,
are you using the command to reload in the same user context you used to
start monit.

> I didn't have luck calling 'monit reload' from within monit.

All the time I try to reload the configuration from a different user, I
get an error message (I use MacOS).

Reinitializing monit daemon
Cannot signal the monit daemon process -- Operation not permitted

With regards,
Lutz

Reply | Threaded
Open this post in threaded view
|

Aw: Re: Auto-reload of configuration files

Robert Ehrenleitner
To add to @Lutz' response to make it somewhat more clear:
 
What user is the process running with? "monit reload" must be executed with the same user, usually root. So, it is necessary to do "sudo monit reload" if you are not already root.
 
Kind regards,
rexkogitans
 
Gesendet: Mittwoch, 27. Mai 2020 um 22:37 Uhr
Von: "Lutz Mader" <[hidden email]>
An: "This is the general mailing list for monit" <[hidden email]>
Betreff: Re: Auto-reload of configuration files
Hello Eric,
are you using the command to reload in the same user context you used to
start monit.

> I didn't have luck calling 'monit reload' from within monit.

All the time I try to reload the configuration from a different user, I
get an error message (I use MacOS).

Reinitializing monit daemon
Cannot signal the monit daemon process -- Operation not permitted

With regards,
Lutz