16
20.7 Legacy Series / Re: Monit configuration "stuck" needing apply
« on: January 06, 2021, 08:25:03 pm »
OK. I took a look at the network tracing and I saw that there was a syntax error. Interestingly, monit seems happy with the result as "Control file syntax OK" is also reported.
It looks like the problem is that the monit UI's service test doesn't accept anything other than a single file value for PATH. for an "Execute" action type, even though monit itself is quite happy to accept any quoted string as the action to execute. Looks like it's a missing enhancement request.
https://mmonit.com/monit/documentation/monit.html#SERVICE-TESTS
Anyway, a small shell script later, and learning monit env variables has fixed the problem. Thanks!
Also, got dpinger restart nicely configured in monit..
It looks like the problem is that the monit UI's service test doesn't accept anything other than a single file value for PATH. for an "Execute" action type, even though monit itself is quite happy to accept any quoted string as the action to execute. Looks like it's a missing enhancement request.
https://mmonit.com/monit/documentation/monit.html#SERVICE-TESTS
Quote
EXEC can be used to execute an arbitrary program and send an alert. If you choose this action you must state the program to be executed and if the program requires arguments you must enclose the program and its arguments in a quoted string. You may optionally specify the uid and gid the executed program should switch to upon start. The program is executed only once if the test fails.
Anyway, a small shell script later, and learning monit env variables has fixed the problem. Thanks!
Also, got dpinger restart nicely configured in monit..