Native Django alerting package - Responses

Series: Django Query Alerting

  1. Native Django alerting package
  2. Native Django alerting package - Responses

So after posting my idea from yesterday, I had a few responses on Mastodon which I thought would be worth sharing today.

First up is Tim sharing Dead Man's Snitch which solves the alerting part of the of the idea, but isn't Django native. Next is Dan suggesting a possible API of how it could work. Bruno suggests a similar setup of a Model to store the query, then a management command combined with either celery or cron to run the queries. He also highlighted the possible security risks with running arbitary SQL.

Bruno also suggested the excellent Metabase which works as a separate hosted or self-hosted solution but is completely independent of Django and it's ORM and any code you might have added on top. Finally, this post inspired Anders to write up his system for dealing with this. It tickes all the boxes except storing the query in a model, opting for having it stored in code, which in all honesty is safer for multiple obvious reasons.

There is the makings of a package here. Probably starting with Ander's post and stripping out the specific packages used to be plain Django.

Thanks to Tim, Dan, Bruno & Anders for the responses!