Failover Notifications via Amazon SNS
Receive Amazon SNS notifications when a failover group changes state, with field and state reference.
Failover Notifications via Amazon SNS
See Health Notifications via Amazon SNS for additional information.
Publish failover events through the following workflow:
-
Data Push:
- Our service pushes data to Amazon SNS whenever we fail over to another Live Slicer
-
Data Broadcast:
- Amazon SNS broadcasts data to one or more destinations (e.g., mobile device, web server, or Slack)
- Get started with Amazon SNS for free through its SNS free tier. Learn more
-
Data Formatting:
- Our service formats data using JSON. This data may then be filtered via custom code.
- This article explains how to strip out additional data generated by Amazon SNS via a custom function in Amazon Lambda
Get Started with Failover Notifications
Perform the following steps to set up notifications:
-
Set Up an Amazon SNS Topic:
- Our service pushes Live Slicer health and failover notifications to the same Amazon SNS topic
- You may skip this step if you have already created an Amazon SNS topic for Live Slicer health notifications
-
Configure Communication with Amazon SNS:
- Our service pushes Live Slicer health and failover notifications to the same Amazon SNS topic
- Updating the SNS topic for either Live Slicer health or failover notifications will affect both types of notifications
-
Navigate to the Failover Page:
- From the main menu, navigate to Slicers and then select Failover from the side navigation bar
-
Update SNS Topic:
- Select Update SNS Topic from the right-hand pane
- Set the Update your SNS Topic ARN option to the ARN for the topic created above
- Select Save Topic ARN
-
Configure Amazon SNS to Broadcast Notifications:
- Learn how to set up Amazon SNS and Lambda to broadcast notifications to a Slack channel
Failover Notification Fields
Our service sends information that describes a failover event in JSON format. Key parameters in this notification are described below.
| Field | Description |
|---|---|
| Subject | Returns Slicer Failover |
| Message | Provides detailed information about the Failover event. Key parameters are described below. |
| Service | Returns failover. |
| Sender | Returns failover. |
| Account | Indicates the user name (e.g., email address) associated with the account for which this failover event occurred. |
| OID | Indicates the system-defined ID of the account for which this failover event occurred. |
| FO_Group_Name | Indicates a failover group's name. |
| FO_Group_ID | Indicates a failover group's system-defined ID. |
| Channels | Contains an array of the live channels associated with the failover group defined by the FO_Group_Name property. |
| Date_Time | Indicates when the notification was triggered. This timestamp is reported as Unix time in milliseconds. |
| Original_Slicer | Indicates the slicerID of the Live Slicer that was the source of the live stream prior to the failover event. |
| Slicer | Indicates the slicerID of the Live Slicer that was the source of the live stream after the failover event. |
| Reason | Provides additional information about this failover event. For example, this parameter may indicate the reason for failover. |
| Slicers_In_Group | Contains a key-value pair for each Live Slicer associated with the failover group defined by the FO_Group_Name property. |
Each key-value pair identifies the name of a Live Slicer and its failover status. Valid failover states are described below.
Valid Failover States
- Active: Indicates that our service is using this Live Slicer's feed to generate the live stream for all live channels associated with this failover group.
- Hot: Indicates that the Live Slicer is encoding and storing content within our system. Our service can quickly fail over to a Live Slicer in this state.
- Warm: Indicates that the Live Slicer is currently slicing content but not uploading it to our system. Failing over to a Live Slicer in this state may cause a few seconds of slate.
- Unhealthy: Indicates that the Live Slicer is considered unhealthy due to at least one metric falling below a custom threshold for a given duration.
- Disabled: Indicates that the failover capability for this Live Slicer has been manually disabled.
Key-Value Pair Syntax: {Live Slicer}: {Failover Status}
Example
{
"Service": "failover",
"Sender": "failover",
"Account": "[email protected]",
"OID": "1ab0812e54f44b029bcae08685f025cc",
"FO_Group_Name": "My failover group",
"FO_Group_ID": "f18b0d3f6393428f9aca3815a17f663e",
"Channels": ["Basketball", "News"],
"Date_Time": 1667834461149,
"Original_Slicer": "bball_slicer_1",
"Slicer": "bball_slicer_2",
"Reason": "added to denylist: Not seen since 2022-11-07 15:21:06",
"Slicers_In_Group": {
"bball_slicer_1": "Active",
"bball_slicer_2": "Hot"
}
}Updated about 2 hours ago