Torch Log Service
Parameter | Type | Required | Example value | Description |
Parameter | Type | Required | Example value | Description |
TaskId | String | Yes | 4a9bd4bd-53f1-43ff-b88a-64ee1be5**** | Scheduled SQL analysis task ID. |
TaskName | String | No | schedule-sql-task-name | |
Description | String | No | This is a test schedule sql task | A brief description of the scheduled SQL analysis task
|
DestRegion | String | No | cn-north-1 | Region where the target log topic is located |
DestTopicID | String | No | 2a9bd4bd-53f1-43ff-b88a-64ee1be5**** | Target log topic ID used to store SQL analysis result data. |
Status | Integer | No | 0 | Start the scheduled SQL analysis task immediately after configuring the task. Optional values:
|
ProcessSqlDelay | Integer | No | 60 | Delay for each scheduling cycle. Valid range: 0–120 seconds. |
ProcessTimeWindow | String | No | @m-15m,@m | SQL time window. The time range for query and analysis of logs during scheduled SQL analysis tasks, using the left-closed, right-open format. For example, if a scheduled SQL analysis task starts at 10:00 on August 14, 2023, runs every 1 hour, with the SQL time window set as [@h-1h,@h) and a 10-second execution delay: after starting the task, TLS will create an instance at 10:00:00, start executing the instance at 10:00:10, and analyze log data from [09:00:00~10:00:00). At 11:00:00, a second instance will be created, execution begins at 11:00:10, and logs from [10:00:00~11:00:00) will be analyzed. tip The maximum SQL time window is 24 hours, and the minimum is 1 minute If the SQL time window is set to more than 24 hours, the execution may fail or the calculation may be inaccurate due to excessive data volume For the SQL time window syntax, see SQL time window syntax |
Query | String | No | * | select * | The scheduled SQL analysis task regularly executes query and analysis statements. These statements should follow the TLS query and analysis syntax. For detailed grammar instructions, see Query Overview and Analysis Overview. |
RequestCycle | No | {"Type":"Period","Time":1} | Scheduling cycle of the scheduled SQL analysis task The scheduling cycle determines the scheduling time for each instance
tip It is recommended that the scheduling interval is not shorter than the SQL time window to prevent scheduling delays and incorrect query results. For example, if the scheduling interval is set to every 10 minutes, the maximum SQL time window length is 10 minutes. |
Parameter | Type | Required | Example value | Description |
Parameter | Type | Required | Example value | Description |
Time | Integer | Yes | 10 | The schedule interval or the specific time for regular execution (minutes from 00:00), ranging from 1 to 1440; unit: minute. |
Type | String | Yes | Period | Scheduling interval type. Optional values:
|
CronTab | String | No | 0 18 * * * | Cron expression. TLS uses Cron expressions to schedule alert tasks. The minimum granularity for Cron expressions is minute, using the 24-hour format For example, 0 18 * * * means the alert task runs once every day at 18:00 |
CronTimeZone | String | No | GMT+0800 | When you set Type to Cron, you also need to set the time zone. For common time zones, see Select Time Zone. |
HTTP status code | Error Code | Error message | Description |
HTTP status code | Error Code | Error message | Description |
400 | InvalidArgument | Invalid argument key %s, value %s, please check argument. | Invalid parameter. |
404 | ScheduleSqlTaskNotExist | Task %s does not exist. | Scheduled SQL analysis task does not exist. |
500 | InternalServerError | We encountered an unexpected server error . Please try again later. | Internal server error. |