It would be great if the syntax of a control file would allow for variable expansion. This could make configuration less error prone and more elegant. For example:
check process slowLogger-1 with pidfile /monit/demo/monit/var/slowLogger-1.pid start program = "/monit/demo/svcs/slowLogger.sh start /monit/demo/monit/var/slowLogger-1.pid 1" stop program = "/monit/demo/svcs/slowLogger.sh stop /monit/demo/monit/var/slowLogger-1.pid"
This could be rewritten like this:
check process slowLogger-1 with pidfile $SL1_PID start program = "$SL_CTL start $SL1_PID 1" stop program = "$SL_CTL stop $SL1_PID"
Assuming that SL1_PID and SL_CTL are defined either in the control file or picked up from the environment as a fallback.
This would eliminate duplication and allow for more elegant syntax.
Do you see an issue or a risk associated with it?