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.
pakyas check doctor <SLUG> [FLAGS]Arguments
Section titled “Arguments”| Argument | Description |
|---|---|
SLUG | Check slug or ID (required) |
| Flag | Description |
|---|---|
--deep | Perform 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 |
Exit Codes
Section titled “Exit Codes”| Code | Meaning |
|---|---|
| 0 | No issues found (or findings below --fail-on threshold) |
| 78 | Issues found at or above --fail-on threshold |
What It Shows
Section titled “What It Shows”The doctor command reports:
- Overall status:
healthy,attention_needed, orcritical - Findings: Issues discovered with severity levels (error, warning, info)
- Suggested actions: Specific recommendations to resolve each finding
- Evidence: Details and context supporting each finding
Status Levels
Section titled “Status Levels”| Status | Meaning |
|---|---|
healthy | No issues detected |
attention_needed | Warnings present that should be addressed |
critical | Errors requiring immediate attention |
Examples
Section titled “Examples”Basic Diagnostic
Section titled “Basic Diagnostic”pakyas check doctor my-backup-jobDeep Analysis
Section titled “Deep Analysis”Perform a more comprehensive analysis that examines additional metrics and historical patterns:
pakyas check doctor my-backup-job --deepCI/CD Integration
Section titled “CI/CD Integration”Fail the pipeline if any warnings or errors are found:
# In your CI/CD scriptpakyas check doctor my-backup-job --fail-on warningif [ $? -eq 78 ]; then echo "Check health issues detected!" exit 1fiOr simply let the non-zero exit code fail the build:
pakyas check doctor my-backup-job --fail-on warningJSON Output for Scripting
Section titled “JSON Output for Scripting”Get structured output for processing with other tools:
pakyas check doctor my-backup-job --format json | jq '.findings[] | select(.severity == "error")'Combine Options
Section titled “Combine Options”Deep analysis with JSON output and strict threshold:
pakyas check doctor my-backup-job --deep --fail-on info --format jsonSee Also
Section titled “See Also”- check inspect Command - View check configuration and current state
- check tail Command - Stream real-time events from a check