Skip to content

Latest commit

 

History

History
64 lines (42 loc) · 3 KB

File metadata and controls

64 lines (42 loc) · 3 KB

Bash Examples

Shell scripts for monitoring cron jobs with DeadManPing on Linux/Unix systems.

Quick Start

  1. Replace YOUR_MONITOR_ID in each script with your actual monitor ID from deadmanping.com
  2. Make script executable: chmod +x script.sh
  3. Add to crontab: 0 3 * * * /path/to/script.sh

Examples

Basic Monitoring

Error Detection

Silent Failures

Backup Monitoring

API Response Validation

Output Validation

Advanced

Best Practices

  1. Always use set -e - Exit immediately on error
  2. Use set -o pipefail - Catch failures in pipes
  3. Ping inside script - Not in cron line, so you have access to variables
  4. Check results - Don't just trust exit codes, verify actual results
  5. Use traps - Ensure ping is sent even on unexpected exit

Documentation

See deadmanping.com for detailed documentation on each problem and solution.