This topic describes how to add a Log Service data source in DataV. Log Service (formerly known as SLS) is an end-to-end service for real-time data management.

  1. Log on to the DataV console.
  2. Click the Data Sources tab and then Add Source.
  3. Select Log Service from the Type drop-down list.
  4. Enter Log Service information.
    Add a Log Service data source
    Parameter Description
    Name The name that you want to display for the data source.
    AppKey The AccessKey ID of the account that has permissions to access the target Log Service instance.
    AppSecret The AccessKey secret of the account that has permissions to access the target Log Service instance.
    EndPoint Enter the endpoint of Log Service. You can enter an endpoint based on the network type and region of the target Log Service instance. For more information, see Service endpoint.

    If your Log Service instance is deployed in a VPC in the China (Shanghai) region, enter https://cn-shanghai-intranet.log.aliyuncs.com in EndPoint.

  5. After you enter the Log Service information, click OK.

    The added data source is displayed in the data source list.

Use the Log Service data source

  1. Log on to the DataV console.
  2. On the Projects tab, move the pointer over the project that you want to edit and click Edit.
  3. On the edit page of the canvas, click a widget.

    If no widget is added to the canvas, add a widget first. For more information, see Add a widget.

  4. In the right-side configuration pane, click the Data tab and then Set.
    Set Data Source
  5. In the Set Data Source pane, select Log Service from the Data Source Type drop-down list.
  6. In the Select Data Source section, select the configured Log Service data source.
  7. Enter query parameters in the edit box under Query.
    Query parameters can be configured as JSON objects. The following example shows the supported query parameters:
    {
    "projectName": "test",
    "logStoreName": "access-log",
    "topic": "test",
    "from": 1509897600,
    "to": 1509984000,
    "query": "" ,
    "line": 100,
    "offset": 0
    }
    Note For more information about the query syntax, see Query syntax.
  8. Click Preview Data Response to view the returned data.