JCKalt / General-Work

Modeling database
0 stars 0 forks source link

Scripts to notify on errors (cron job failures, etc...) #175

Open JCKalt opened 3 months ago

JCKalt commented 3 months ago

Detect:

JCKalt commented 3 months ago

Here's a grep that looks at all the currently schedule job's log output for the token 'error'

grep -i error /tmp/cron-eyedro-import.log /tmp/cron-weather-update1.log /tmp/sync_purify1.log /home/chris/scripts/backup_route53.log /home/chris/scripts/create_performance_snapshot.log /home/chris/scripts/create_performance_snapshot.log /home/chris/scripts/run_all_xfer_netsuite_jobs.log /tmp/sync_purify1.log:psycopg2.errors.UndefinedTable: relation "missing_uid_mappping" does not exist /tmp/sync_purify1.log:psycopg2.errors.UndefinedTable: relation "missing_uid_mappping" does not exist /tmp/sync_purify1.log:psycopg2.errors.UndefinedTable: relation "missing_uid_mappping" does not exist /tmp/sync_purify1.log:psycopg2.errors.UndefinedTable: relation "missing_uid_mappping" does not exist /home/chris/scripts/create_performance_snapshot.log:ERROR: table "performance_day_temp" does not exist /home/chris/scripts/create_performance_snapshot.log:ERROR: table "performance_day_temp" does not exist