normbeat

Demo: catch cron jobs that exit 0 but load 0 rows

A nightly orders job loads 0 rows and still exits 0. normbeat compares each run's row count with the same weekday in recent weeks and alerts on zero, far too low or suspiciously high counts. Example data, not a real account. Watch on YouTube.

Try it free: 5 checks, no card

Transcript

Okay, so this is normbeat. It's a small tool for one annoying problem with scheduled data jobs.

Say you've got a job that loads orders into Postgres every night. Most nights it's around fifty thousand rows, and on weekends it's closer to ten thousand.

Now, if the API sends back an empty list one night, the job still exits with zero. Cron thinks it worked, and you usually find out from someone else, a few days later.

The usual fix is a fixed threshold. But then it either pages you every weekend, or it misses a bad Thursday.

With normbeat, you add one line at the end of the job that sends the row count. There's a small Python client, or you can just use curl.

Then it compares each run with the same weekday over the last few weeks. The light bands here are the normal range for each day, so the lower weekend runs are fine.

But this Friday, the job loaded zero rows. That gets flagged, and you get an alert by email, Slack or Telegram, with the range it expected. It also tells you when a job doesn't run at all, or runs late.

If a drop was expected, like a holiday, you can mark it as expected, or snooze the check for a few days.

It's free for five checks, no card needed. The link's in the description.