Simple Log Service provides the time series forecasting feature to automatically and intelligently forecast future time series data. You can use the forecasted data to identify trends and check the status of key system or business metrics in advance. This topic describes how to create a time series forecasting job.
Prerequisites
Data is collected to a Logstore or Metricstore. For more information, see Data collection overview.
Indexes are configured for the source Logstore. Make sure that this prerequisite is met if data is collected to a Logstore. For more information, see Create indexes.
An Intelligent Anomaly Analysis instance is created. For more information, see Create an instance.
Procedure
Log on to the Simple Log Service console.
Go to the Create Time Series Forecasting Job page.
In the Log Application section, click Intelligent Anomaly Analysis.
In the list of instances, click the instance that you want to manage.
In the left-side navigation pane, click Time Series Forecasting.
In the Time Series Forecasting Job section, click Create Now.
In the Basic Information step of the Create Time Series Forecasting Job wizard, configure the parameters and click Next. The following table describes the parameters.
Parameter
Description
Job Name
The name of the time series forecasting job.
Project
The project to which the source Logstore or Metricstore belongs.
Region
The region where the project resides.
Logstore Type
The storage unit in which your data is stored.
If your data is stored in a Logstore, select Logstores.
If your data is stored in a Metricstore, select Metricstores.
Source Logstore
If you set the Logstore Type parameter to Logstores, you must set the Source Logstore parameter to the Logstore in which your source data is stored.
Metricstores
If you set the Logstore Type parameter to Metricstores, you must set the Metricstores parameter to the Metricstore in which your source data is stored.
Role
The Alibaba Cloud Resource Name (ARN) of AliyunLogETLRole. If you have completed authorization when you create the instance, the ARN is automatically displayed.
Target Store
The destination Logstore. The value is fixed as internal-ml-log.
In the Data Feature Settings step of the Create Time Series Forecasting Job wizard, enter a query statement and configure the parameters. The following table describes the parameters.
The following example shows a query statement that is used to obtain time series data. For more information, see Log search overview and Log analysis overview.
* | select (__time__ - __time__%60) as time, 'entity' as entity, count(1) as metric from log group by time, entity order by time
Parameter
Description
Time
The field that specifies time in source data. We recommend that you aggregate data at a minimum resolution of one minute.
Entity
The field that specifies an entity in source data. The time series forecasting job aggregates data to generate time series for the entity. After you configure the Entity parameter, the specified entities are listed below the parameter.
If you select an entity, the system forecasts the time series for the entity. If you do not select entities, the system forecasts the time series for all entities.
Feature
The field that specifies data features in source data. The time series forecasting job forecasts the time series for each entity based on each data feature. If m entities and n data features are specified, the time series forecasting job forecasts m × n time series.
A time series forecasting job can forecast up to five time series at a time. If the number of specified time series exceeds this limit, the job randomly forecasts five time series.
In the Algorithm Configurations step of the Create Time Series Forecasting Job wizard, configure the parameters and click Complete. The following table describes the parameters.
Parameter
Description
Time Series Forecasting Seasonality
Seasonality Configuration
Configure the seasonality of time series. The seasonality is measured in days. You can enter a decimal. Example: 2.4.
By default, a time series forecasting job considers the impacts of daily seasonality, weekly seasonality, and yearly seasonality on the trends of time series. You do not need to manually configure the daily, weekly, or yearly seasonality.
Holiday Configuration
Country
Select the country where the time series data is generated. A time series forecasting job considers the impact of holidays in a country on the trends of time series.
Other Holidays
Specify the holidays that affect the trends of time series. You can specify uncommon holidays or the dates of activities that affect the trends.
You need to specify both the holidays that are involved in the time series to forecast and the holidays that are involved in existing time series and are used for forecasting.
Forecasting Configuration
Time Series Length
Specify the length of the time series to forecast.
The time unit that you specify affects the number of data points in the forecasted time series. For example, if you set Time Series Length to 2 Hours, the forecasted time series contains two data points, with each data point representing an hour. If you set Time Series Length to 120 Minutes, the forecasted time series contains 120 data points, with each data point representing a minute.
Confidence Level
Specify the confidence level. Valid values: 0.5 to 0.99. The confidence level affects the confidence interval of forecasting results. The higher the confidence level, the more likely the data in the confidence interval appears in the forecasting results.
Samples
Specify the number of samples. Valid values: 0 to 100. The number of samples affects the accuracy of the confidence interval of forecasting results. The higher the number of samples, the more accurate the confidence interval.
Forecast Frequency
Specify the frequency at which a forecasting operation is made. A time series forecasting job runs continuously in the background. The frequency specifies how often a forecasting operation is made.
Observation Period
Specify the period for observation. The period specifies the time range of existing time series data that is used for each forecasting operation.
Scheduling Settings
Time Range
Specify the start time of the time series forecasting job.
In the Preview section, view the algorithm's effect under the current configuration, and then click Complete.
Set the time range to determine the start and end times of the time series to be forecasted. Click Data Query to process the data within the specified time range using the query statement in the Data Feature Settings, generating the time series data.
Select the entity information to determine the entity sequence to be forecasted. Click Preview to invoke the forecasting algorithm, which processes the specified entity sequence and displays the forecast results below. Click Display Parameters to display the current algorithm configuration.
The forecast results include the upper and lower bounds of the sequence after fitting the historical series. Any data points exceeding these bounds may be anomalies. By adjusting the anomaly threshold, you can display anomaly points with scores exceeding the threshold.
Forecasting results
After you create the time series forecasting job, you can click the job in the job list to view details. You can also filter time series by forecasting ID, entity ID, metric, and time.
Parameter | Description |
Time | You can select a time range to view the results of the time series forecasting job within the time range. |
Forecasting ID | A time series forecasting job runs continuously in the background. Each forecasting operation is identified by a unique ID, which is referred as a forecasting ID. A forecasting ID is in the |
Entity ID | You can select an entity ID to view the time series for the entity. |
Metric | You can select a metric to view the time series for the metric. |
In the following figure, the curves on the left side of the red vertical bar indicate existing time series. The curves on the right side of the red vertical bar indicate the forecasted data, which is forecasted based on the existing time series.
You can click View Exception Events to view the errors that are reported during time series forecasting.
What to do next
After you create the time series forecasting job, you can delete or modify the job on the Time Series Forecasting page.
After you delete a time series forecasting job, the job cannot be restored. Proceed with caution.