Switch to a single key for command and command shell
This makes the configuration more similar to Minitor-py and docker-compose. If a string is passed, it will be executed in a shell. If an array is passed, it will be executed in as a command directly. This breaks compatiblity with previous versions of Minitor-go, but closer to compatiblity with Minitor-py.
This commit is contained in:
@@ -7,7 +7,7 @@ monitors:
|
||||
alert_down: ['log_command', 'log_shell']
|
||||
alert_every: 0
|
||||
- name: Shell
|
||||
command_shell: >
|
||||
command: >
|
||||
echo 'Some string with stuff';
|
||||
echo 'another line';
|
||||
echo $PATH;
|
||||
@@ -20,4 +20,4 @@ alerts:
|
||||
log_command:
|
||||
command: ['echo', 'regular', '"command!!!"', "{{.MonitorName}}"]
|
||||
log_shell:
|
||||
command_shell: echo "Failure on {{.MonitorName}} User is $USER"
|
||||
command: echo "Failure on {{.MonitorName}} User is $USER"
|
||||
|
||||
Reference in New Issue
Block a user