Email notifications of problems

From Open Broadcaster
Jump to: navigation, search

There is no interface for configuring it (as long as the cron is being run). You have to add some rows to the 'notices' table (phpMyAdmin would make this pretty straightforward). Add rows as follows:

ID: (this is automatic, leave blank) event: device_last_connect_schedule_warning, device_last_connect_playlog_warning, or device_last_connect_emergency_warning.

These are three different event types - the system will look for a failure to connect in the last hour based on these three different requests (schedule, playlog, or emergency data). So you will probably want one row for each.

device_id: the ID of the device you want email notifications for email: the email address where the notifications should be sent to toggled: set to 0; this is what prevents multiple warnings from going out. As soon as there is a failure, this gets set to '1' and an email is sent out. as soon as the system looks to be backup and running, this gets set back to '0' automatically.

The idea here is that there is one email going out per failure.

EXAMPLE

  • INSERT INTO notices (event, device_id, email, toggled) VALUES ('device_last_connect_schedule_warning', 1, 'admin1@dom.com', 0);
  • INSERT INTO notices (event, device_id, email, toggled) VALUES ('device_last_connect_playlog_warning', 1, 'admin1@dom.com', 0);
  • INSERT INTO notices (event, device_id, email, toggled) VALUES ('device_last_connect_emergency_warning', 1, 'admin1@dom.com', 0);
  • INSERT INTO notices (event, device_id, email, toggled) VALUES ('device_last_connect_emergency_warning', 1, 'admin2@dom.com', 0);