All Products
Search
Document Center

DataV:Add a Simple Log Service (SLS) data source

Last Updated:Mar 10, 2025

This document explains how to add a Simple Log Service (SLS) data source to DataV and details the related parameter configurations. Simple Log Service (SLS) offers a comprehensive solution for real-time data management.

Prerequisites

Ensure the Simple Log Service (SLS) data source is prepared for addition.

Limits

Supports only Enterprise Edition or higher.

Add a Simple Log Service (SLS) data source

  1. Access the DataV console.

  2. On the Workbench page, click Data Preparation > Data Source to access the Data Source page, and then click Create Data Source.

  3. From the Type dropdown, select Simple Log Service (SLS).

  4. Enter the required details for Simple Log Service (SLS).

    image

    Parameter

    Description

    Custom Data Source Name

    The display name of the data source. You can name it as needed.

    AppKey

    The AccessKey ID of the account that has access privileges to the target SLS.

    AppSecret

    The AccessKey Secret of the account that has access privileges to the target SLS.

    EndPoint

    Enter the endpoint of the SLS service. For more information, see the endpoint document. Fill in the endpoint based on the network type and region of your SLS service.

    For example, in the VPC network in the Shanghai region, the EndPoint is entered as https://cn-shanghai-intranet.log.aliyuncs.com.

  5. Once the information is entered, click OK to complete the addition of the data source.

    The new data source will be automatically listed in the data source directory.

Use a Simple Log Service (SLS) data source

  1. Access the DataV console.

  2. In the console pane, move the pointer over the dashboard that you want to edit and click Edit.

    Important

    If you have not created a dashboard on the console page, create a dashboard by referring to Using a template to create a PC dashboard.

  3. On the canvas editing page, click a widget on the canvas.

    If no widget exists on the canvas, add a widget first. For more information, see Canvas operations.

  4. On the right side of the canvas, click the Data Source tab.

    image

  5. In the Set Data Source section, choose Data Source Type as Simple Log Service (SLS).

  6. From the Select An Existing Data Source dropdown, pick the configured log service data source.

  7. Below, in the Query field, input the query parameters.

    You can use JSON objects as query parameters. The query parameters you may enter include the following:

    {
    "projectName": "test",
    "logStoreName": "access-log",
    "topic": "test",
    "from": 1509897600,
    "to": 1509984000,
    "query": "" ,
    "line": 100,
    "offset": 0
    }
    Note

    For more information on the query syntax of the query parameter, see query syntax and features.

  8. Click View Data Return Results to check the returned data.

What to do next

Once you have the raw data, you can consult datasource config for widget data adaptation.

FAQ

For additional questions, consult the FAQ about datasource config.