ping Command
The ping command sends pings to checks manually.
pakyas ping <slug> [flags]Examples
Section titled “Examples”# Send success pingpakyas ping backup-db
# Send start pingpakyas ping backup-db --start
# Send fail pingpakyas ping backup-db --fail
# Send with specific exit codepakyas ping backup-db --exit-code 1| Flag | Description |
|---|---|
--start | Send a start signal |
--fail | Send a fail signal |
--exit-code <code> | Send with specific exit code (0 = success) |
--run <id> | Run identifier for START/END pairing (for accurate duration tracking with overlapping runs) |
--duration-ms <ms> | Duration in milliseconds (for scripted pings with accurate timing) |
--no-external | Disable external monitors |
--external-timeout-ms | Timeout for external requests |
Use Cases
Section titled “Use Cases”Manual Testing
Section titled “Manual Testing”# Test that a check is configured correctlypakyas ping test-check --startsleep 5pakyas ping test-checkScripted Pings
Section titled “Scripted Pings”When monitor doesn’t fit your workflow:
#!/bin/bashpakyas ping my-job --start
# Your complex logic hereif some_condition; then do_something pakyas ping my-jobelse pakyas ping my-job --failfiScripted Pings with Accurate Duration
Section titled “Scripted Pings with Accurate Duration”For accurate duration tracking in scripts, measure and send the duration:
#!/bin/bashpakyas ping my-job --startSTART_TIME=$(date +%s%3N) # milliseconds since epoch
# Your job here./my-complex-job.sh
END_TIME=$(date +%s%3N)DURATION=$((END_TIME - START_TIME))
pakyas ping my-job --duration-ms $DURATIONSee Also
Section titled “See Also”- monitor Command - Automatic ping wrapper
- API Ping Endpoint - Direct HTTP pings