Skip to content

check doctor Command

The check doctor command analyzes your check’s configuration and recent activity to identify potential issues. It reports findings with severity levels and provides actionable recommendations to resolve problems before they cause missed alerts.

Terminal window
pakyas check doctor <SLUG> [FLAGS]
ArgumentDescription
SLUGCheck slug or ID (required)
FlagDescription
--deepPerform deep analysis (slower but more comprehensive)
--fail-on <SEVERITY>Exit with error if findings meet threshold: error (default), warning, info
--format <FORMAT>Output format: human (default), json
CodeMeaning
0No issues found (or findings below --fail-on threshold)
78Issues found at or above --fail-on threshold

The doctor command reports:

  • Overall status: healthy, attention_needed, or critical
  • Findings: Issues discovered with severity levels (error, warning, info)
  • Suggested actions: Specific recommendations to resolve each finding
  • Evidence: Details and context supporting each finding
StatusMeaning
healthyNo issues detected
attention_neededWarnings present that should be addressed
criticalErrors requiring immediate attention
Terminal window
pakyas check doctor my-backup-job

Perform a more comprehensive analysis that examines additional metrics and historical patterns:

Terminal window
pakyas check doctor my-backup-job --deep

Fail the pipeline if any warnings or errors are found:

Terminal window
# In your CI/CD script
pakyas check doctor my-backup-job --fail-on warning
if [ $? -eq 78 ]; then
echo "Check health issues detected!"
exit 1
fi

Or simply let the non-zero exit code fail the build:

Terminal window
pakyas check doctor my-backup-job --fail-on warning

Get structured output for processing with other tools:

Terminal window
pakyas check doctor my-backup-job --format json | jq '.findings[] | select(.severity == "error")'

Deep analysis with JSON output and strict threshold:

Terminal window
pakyas check doctor my-backup-job --deep --fail-on info --format json