Creates a monitoring session.
Operation description
Call this operation to create a monitoring session. Ensure that the required parameters are configured.
QPS limit
The queries per second (QPS) limit for a single user is 10 calls per second. If you exceed the limit, your API calls are throttled. This may affect your business. Plan your API calls accordingly.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
live:CreateLiveStreamMonitor |
create |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
No |
The region ID. |
cn-shanghai |
| MonitorName |
string |
Yes |
The name of the monitoring session. |
liveMonitor**** |
| OutputTemplate |
string |
Yes |
The output template for the monitoring session. Valid values:
|
lp_ud |
| Domain |
string |
Yes |
The domain name to monitor. |
demo.aliyundoc.com |
| App |
string |
No |
The application name for the output stream of the monitoring session. You can specify a custom name. If you do not specify this parameter, monitor is used as the application name. |
monitor**** |
| Stream |
string |
No |
The name of the output stream for the monitoring session. If you do not specify this parameter, the system generates a random name. |
monitorStream**** |
| InputList |
string |
Yes |
The list of input streams to monitor. For more information, see the InputConfig table below. |
InputConfig |
| MonitorConfig |
string |
No |
The alert threshold settings for monitoring. The value must be a JSON string. For more information, see the MonitorConfig table below. |
"{\"fpsLowThres\": 0.6,\"brLowThres\": 1.1,\"eofDurationThresSec\": 10}" |
| CallbackUrl |
string |
No |
The webhook address. HTTP and HTTPS are supported. |
http://guide.aliyundoc.com/notify |
| DingTalkWebHookUrl |
string |
No |
The webhook URL of the DingTalk chatbot. To receive alert notifications, configure a DingTalk chatbot and enter its webhook URL, which can be in HTTP or HTTPS format. For more information, see Custom robot access. Note
Set the custom keyword for the DingTalk chatbot to "Alerting". Otherwise, you cannot receive messages. |
https://oapi.dingtalk.com/robot/send?access_token=7a7d404056eee1f2fd944ace9bcfc361dc6448583e1d3d3baa**** |
InputConfig
Name | Type | Description | Example value |
Index | Integer | The index. This parameter is used by the frontend. | 1 |
LayoutId | Integer | The layout ID. The value must start from 1. | 1 |
StreamName | String | The display name of the monitored stream. | monitorStream**** |
InputUrl | String | The URL of the input stream. | demo.aliyundoc.com |
LayoutConfig | LayoutConfig | The layout settings. | See the LayoutConfig table below. |
PlayConfig | PlayConfig | The playback configuration. | See the PlayConfig table below. |
LayoutConfig
Name | Type | Description | Example value |
FillMode | String | The fill mode. Set this parameter to `none` for the frontend. | none |
PositionRefer | String | The reference point for the element's position. Valid values: `topLeft` (top-left), `topRight` (top-right), `bottomLeft` (bottom-left), and `bottomRight` (bottom-right). | topLeft |
PositionNormalized | Float | The normalized position of the layer's padding area, in the `[x,y]` format. | [0.1, 0.1] |
SizeNormalized | Float | The normalized size of the layer, in the `[w,h]` format. | [0.2, 0.3] |
PlayConfig
Name | Type | Description | Example value |
VolumeRate | Float | The volume. The value can be from 0 to 1, accurate to two decimal places. | 0.50 |
MonitorConfig
Name | Type | Description | Example value |
fpsLowThres | Float | The alert threshold for the video frame rate. This threshold is a coefficient. The value can be from (0.0, 1.0]. The default value is 0.7. An alert is triggered if the video frame rate of the monitored stream is less than (the alert threshold × the original frame rate of the live stream). | 0.7 |
brHighThres | Float | The alert threshold for the audio and video bitrate. This threshold is a coefficient. The value can be from (0.0, 100]. The default value is 1.0. An alert is triggered if the audio and video bitrate of the monitored stream is greater than (the alert threshold × the original bitrate of the live stream). | 1.0 |
eofDurationThresSec | Float | The threshold for the duration of a stream interruption before an alert is triggered. Unit: seconds. The value can be from (0, 65535]. The default value is 0. - After a stream is interrupted, the connection remains active. The system uses an internal packet-receiving timeout of 5 seconds to detect the interruption. If you set this parameter to a value less than or equal to 5 seconds, the actual detection time is 5 seconds. If you set this parameter to a value greater than 5 seconds, the actual detection time is the value you set. The first 5 seconds of this period are for the internal timeout, and the rest is the time the system waits for the stream to recover. - If the stream recovers before the timeout period ends, no alert is triggered. If you change the monitoring address before the stream times out, the system stops detecting timeouts and triggering alerts for the previous stream. | 10 |
Response parameters
|
Parameter |
Type |
Description |
Example |
|
object |
|||
| MonitorId |
string |
The ID of the monitoring session. |
445409ec-7eaa-461d-8f29-4bec2eb9**** |
| RequestId |
string |
The request ID. |
5c6a2a0d-f228-4a64-af62-20e91b96**** |
Examples
Success response
JSON format
{
"MonitorId": "445409ec-7eaa-461d-8f29-4bec2eb9****",
"RequestId": "5c6a2a0d-f228-4a64-af62-20e91b96****"
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | InvalidParameter.Malformed | %s | |
| 400 | InvalidUserId.Malformed | %s | |
| 400 | MissingParameter | %s | |
| 400 | StreamMonitorExist | %s | |
| 401 | IllegalOperation | %s | |
| 500 | InternalError | %s | |
| 404 | InvalidDomainName.NotFound | %s |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.