Edge Triggered One-shot Alerts

One of the data sources I plan to use redash to monitor is a mongoDB database with a collection of structured log messages in it which applications write to. I would like to use redash alerts and notifications to send messages to Google Chat whenever an error log message is received.

Ideally

  • the notification should be sent out as soon as possible after the error log message is inserted into the DB
  • the notification should contain some details from the log message
  • it should be impossible to miss a log message or notify twice for the same log message

From what I can tell, redash is not necessarily designed to suit this use case, but I would be very interested to hear if anyone has any suggestions on how to use redash to approach this.

Correct. I’d recommend PagerDuty or similar.

But…if you chose to do it in Redash here’s how:

the notification should be sent out as soon as possible after the error log message is inserted into the DB

Then set up a query schedule that runs once-per-minute.

the notification should contain some details from the log message

Then use the customer alert body templating added in V8.

it should be impossible to miss a log message or notify twice for the same log message

That’s a steep requirement. But this will mostly come down to how you write your query. Turn on scheduled query failure reports so you’ll know if something goes wrong.

1 Like