Synchronous monit CLI actions
Issue #319
new
Currently there is no way to reliably use monit in something like a bash script. For instance, if I do the following:
#/bin/bash
monit unmonitor all
#
# some script
#
monit monitor all
The above code may or may not produce "another action is already in progress" error.
Comments (2)
-
repo owner -
repo owner - changed title to Synchronous monit CLI actions
- Log in to comment
We plan to modify the CLI commands synchronous and wait till the requested action finished (or timed out), so it will be possible to use it in scripts like this. The implementation will include also commands like 'monit reload', which will initiate monit reload and return when it finished. The commands will be limited by timeout, so the client doesn't hang forever.
The workaround for current asynchronous actions is to use 'monit summary' or 'monit status' to check the service state and wait till all services are unmonitored.
The synchronous CLI will be part of monit 6.x