Hello, I need monit to execute and check the result of a script on a remote host via ssh. What works for me right now is something like this:
check program mycheck with path "/usr/bin/ssh [email protected] '/home/myuser/myscripts/mycheck.sh -a 4.5 myserver'" However, now I need to add another option for the script: -T. Unfortunately, this requires multiple strings separated by space. On the commandline this would be something like /usr/bin/ssh [email protected] '/home/myuser/myscripts/arc_check.sh -T "opta optb" -a 4.5 myserver' However, I cannot figure out how to the the additional quotes around "opta optb" into the monit config line. Everything I tried so far fails either parsing on the monit side, or on the remote shell side, or simply does create the intended commandline on the remote side? Is there a solution for this? I know the recommended solution would probably be to come up with a custom script for monit to call. However, I need this kind of test very often with varying options, and setting up a separate script for each test is not really a good solution, either. cu Gerrit
smime.p7s
Description: S/MIME cryptographic signature
