Skip to main content

Description

The custom_check probe runs an approved executable and evaluates exit code, stdout content, or JSON output. This is the only probe that spawns a process — compiled separately with the vms_custom_check build tag.
Security requirements:
  • Executable must be an absolute path (no PATH lookup).
  • Probe refuses to run as root (uid 0) or Windows LocalSystem.
  • No shell — binary is invoked directly with argv.
  • Stdout capped at 1 MiB.

Config fields

FieldTypeRequiredDefaultDescription
typestringYesMust be "custom_check"
executablestringYesAbsolute path to the executable
argsstring[]NoArguments to pass
expectedExitCodeintNo0Expected exit code. Mismatch → down
expectedStdoutContainsstringNoString that must appear in stdout
parseJsonOutputboolNofalseParse stdout as JSON. Numeric/boolean fields become gauge metrics

Metrics

MetricTypeLabelsDescription
vms.custom_check.statusstatusup or down
vms.custom_check.valuegaugekeyPer-field values when parseJsonOutput = true

Example config

{
  "type": "custom_check",
  "executable": "/opt/vms/checks/check-core.sh",
  "args": ["--quick"],
  "expectedExitCode": 0
}

Notes

  • Build tag vms_custom_check — not included in the default agent package.
  • JSON parse only supports top-level object with numeric/boolean fields.