In Flashduty On-call
You can get the integration push URL in either of the following ways.Use a dedicated integration
- In the Flashduty console, select Channel and open a channel
- Select Configuration → Integrations → Private integration, then click Add integration
- Select Tencent Cloud Live and click Save
- Open the generated integration card and copy the Push URL
Use a shared integration
- In the Flashduty console, go to Integration Center → Alert Events
- Select Tencent Cloud Live and enter an integration name
- Configure the default route and select a channel. You can add more rules under Routing after creation
- Click Save and copy the generated Push URL
Configure Tencent Cloud Live
Callbacks are configured in a callback template. The template takes effect only after it is bound to a push domain.1
Create a callback template in Tencent Cloud Live
Where: CSS console › 功能配置 (Feature Configuration) › 直播回调 (Live Callback) › 创建模板 (Create Template)
Notes:
- Before you click 保存 (Save), make sure both callback URLs are filled in
- You can leave 回调密钥 (Callback Key) empty or keep an existing value. Flashduty identifies the integration by the
integration_keyin the push URL and does not verify thesignfield in callbacks - Fill in both the stream push and stream interruption callbacks: with only the interruption callback, alerts do not close when the push resumes
If the push domain already has a callback template bound (for example, for recording callbacks), you can enter the Flashduty push URL in that template’s stream push and stream interruption callbacks instead. If those two fields already point to your own system, have that system forward the callbacks to Flashduty.
2
Bind the template to a push domain in Tencent Cloud Live
Where: CSS console › 功能配置 (Feature Configuration) › 直播回调 (Live Callback) › template list › 绑定域名 (Bind Domain)
- Click 去绑定域名 (Go to Bind Domain) in the prompt shown after the template is created, or click 绑定域名 (Bind Domain) in the template list
- Select the callback template from the previous step and the push domains you want alerts for
- Click 确定 (OK)
3
Push a test stream to verify the alert lifecycle
Where: A streaming tool such as OBS (use a push domain the template is bound to)CSS has no “send test callback” button. Push a test stream to the push domain with a tool such as OBS:
- Start pushing: Flashduty receives a stream push callback. There is no alert to close, so nothing is created
- Disconnect the pushing machine’s network while it is pushing: Flashduty receives a stream interruption callback and triggers an alert
- Restore the network and push again: the alert closes automatically
- Click stop streaming in the pushing tool: this is a normal stop and creates no alert
Alert key
Flashduty computes the Alert Key from the account APPIDappid, the push domain app, the push path appname, and the stream name stream_id. Stream push and stream interruption callbacks for the same stream carry the same four fields, so they land on the same alert.
Changes to the error code, error message, push node, pusher IP, push duration, or sequence do not change the Alert Key. sequence identifies one push session and changes when the stream is pushed again, so it is not part of the Alert Key.
Flashduty rejects a callback with an error if it has no event_type, or if a stream push or interruption callback lacks appid, app, appname, or stream_id. CSS then retries it according to its callback retry rules.
Alert lifecycle
CSS itself does not distinguish alerts from recoveries. It only reports that a push started or was interrupted. The table above is how Flashduty interprets these two notifications: an abnormal interruption is a failure, and a new push of the same stream is its recovery.
Status and severity
Callbacks have no severity field. Every alert triggered by an abnormal interruption is Critical.errcode gives the reason for the interruption and is written to the labels and description. For its meaning, see the error code table in the CSS documentation.
Alert content
- Title: for an abnormal interruption,
Live stream interrupted: <push domain>/<push path>/<stream name> - Description: the error message
errmsg, followed by the error code, push node IP, pusher IP, and push duration (milliseconds) - Labels:
resource(<push domain>/<push path>/<stream name>),appid,app,appname,stream_id,event_type,errcode,errmsg,node,user_ip,sequence,push_duration
stream_param (push URL parameters, which may include the push authentication txSecret), sign, and t are not written to labels.
Troubleshooting
- Flashduty receives no callbacks: make sure the callback template is bound to the domain you actually push to, and that 5 to 10 minutes have passed since binding. Make sure the stream push and stream interruption callbacks contain the full push URL, including
integration_key - An alert was created when the broadcaster stopped:
errcodeis1only when the pusher stops pushing on purpose. When the pusher is ended forcibly (for example, the process exits or the network drops), the interruption callback usually carries anerrcodeother than1, and Flashduty triggers an alert for an abnormal interruption. The alert’serrcodeanderrmsglabels show the reason CSS reported - The alert does not close automatically: make sure the template has a stream push callback. Make sure the push domain, push path, and stream name are the same before and after the interruption
- CSS sends the same callback repeatedly: when Flashduty does not return HTTP 200, CSS retries every minute, up to 12 times. Check that the push URL is correct and that the integration has not been deleted