Skip to main content

Exec

Exec Check executes a command or script file on the target host. The type of scripts executed include:

  • Bash scripts
  • Powershell scripts
apiVersion: canaries.flanksource.com/v1
kind: Canary
metadata:
name: exec-check
spec:
interval: 30
exec:
- description: "exec dummy check"
script: |
echo "hello"
name: exec-pass-check
test:
expr: 'results.Stdout == "hello"'
FieldDescriptionSchemeRequired
descriptionDescription for the checkstring
displayTemplate to display server response in text (overrides default bar format for UI)Template
iconIcon for overwriting default icon on the dashboardstring
labelsLabels for the checkLabels
nameName of the checkstringYes
scriptScript can be a inline script or a path to a script that needs to be executed. On windows executed via powershell and in darwin and linux executed using bash.stringYes
testTemplate to test the resultTemplate
transformTemplate to transform results by excluding or including certain fields in resultTemplate