Shell¶
The shell
health check allows you to run a command and validate the response code is expected. This check method can be used to run your own custom scripted health checks easily.
Configuration Keys¶
The following configuration options apply to the file health check method:
Key | Type | Default |
---|---|---|
command |
String | undef |
environment |
Optional Dict | undef |
Command¶
The command
needs to be set to the command that should be executed.
Environment¶
The environment
parameter can be used to set custom environment variables used by the script/command that needs to be executed. The variables should be specified as key/values.
Examples¶
Some examples of shell health checks:
A basic configuration:
An example of running a script with environment variables: