In Data Lab, you can use simulated data or existing datasets to explore Log Service.
Prerequisites
-
Log Service is activated.
When you log on to the Log Service console for the first time, activate Log Service as prompted.
-
You are authorized to access cloud resources.
When you use Data Lab for the first time, go to the Overview page and click Authorize to grant the necessary permissions.
On the cloud resource access authorization page, select the AliyunLogArchiveRole role and click Agree to Authorization.
Billing and limitations
Data Lab offers three scenarios free of charge: Website Access Logs, Database Audit Logs, and COVID-19 Pandemic Datasets.
In Data Lab, the Logstore only stores simulated data. The data is retained for seven days, and the Logstore has one shard. You cannot write data or edit an index.
Scenarios
Data in Data Lab is categorized into simulated data and datasets.
-
Simulated data: Data generated by a simulation task based on your specified settings, such as field values and the time range.
-
Dataset: Real log data from various scenarios. Currently, the COVID-19 Pandemic Datasets scenario is available.
Procedure
This section uses the Database Audit Logs scenario as an example.
-
Log on to the Log Service console.
-
In the Log Application section, click Start in the Data Lab card.
-
On the Overview page of Data Lab, click Initialize for Database Audit Logs to generate the scenario, which includes simulated logs, queries, and built-in reports.
-
You can adjust settings such as log field values, ranges, and frequencies, or use the default settings.
-
On the Field tab, you can view field names and data types. You can also adjust the value range and weight for each field as needed.
-
On the Range and Frequency tab, configure the following parameters.
Parameter
Description
Time Range
The start and end time for generating simulated data. If you leave the end time unspecified, the task generates data continuously.
Distribution Model
Specifies the distribution model for the data volume. Valid values: Random, Periodic, and Linear. You can customize the change period, minimum value, maximum value, and random factor.
-
Change Period: The cycle of the data volume distribution. Valid units: seconds, minutes, hours, days, and weeks.
-
Minimum Value: The minimum data volume per second.
-
Maximum Value: The maximum data volume per second.
-
Random Factor: For example, if you set Random Factor to 0.1 and the model data volume is
count, the final data volume is a random value within the range of [0.9*count, 1.1*count].
Point Anomaly
The system injects random data volume anomalies based on the Distribution Model settings. You can specify the probability and magnitude of these anomalies. While you can configure multiple anomaly options, a maximum of one occurs per data period, and options are prioritized by their order in the list.
-
-
-
Click Start Import. Data Lab automatically creates a project, a Logstore, a data simulation task, and a data scenario, and then starts to simulate data.
NoteThe data simulation task takes about 1 minute to complete.
-
After the data is imported, click Start Using to go to the Report Center page.
On the Overview page of Data Lab, in the Database Audit Logs section, you can use Search & Analysis, Report Center, Data Configuration, and Delete.
-
Click Search & Analysis to go to the Search & Analysis page.
Here, you can query and analyze data. For more information, see Search & Analysis.
-
Click Report Center to go to the Report Center page.
By default, reports for RDS Audit Center, RDS Audit Performance Center, and RDS Audit Security Center are available. Click View Report for the corresponding report to view its details page, where you can interact with the dashboard. For more information, see Visualization overview.
-
Click Data Configuration to go to the Data Configuration page.
You can adjust settings such as log field values and the time range, and then re-import the data.
-
Click Delete to delete the scenario.
When you delete a scenario, you can choose whether to also delete the associated Logstore and reports. Deleting a scenario also stops the data simulation task.
-
What to do next
You can follow the same procedure as for Database Audit Logs to initialize the Website Access Logs and COVID-19 Pandemic Datasets scenarios.