All Products
Search
Document Center

Simple Log Service:Configure a world map

Last Updated:Jun 04, 2026

Display geographic information on a world map using the ip_to_country function.

Prerequisites

Step 1: Query and analyze data

  1. Log on to the Simple Log Service console. In the Projects section, click the project you want.

    image

  2. In the navigation pane on the left, click Log Storage. In the Logstores list, click the target Logstore.

  3. Enter the following query and click Search & Analyze.

    The ip_to_country function converts IP addresses to country names. Pass ip_to_country(source_field, 'en') to return English names.

    * | select ip_to_country(remote_addr, 'en') as address, count(1) as count group by address order by count desc limit 10

Step 2: Configure a world map

  1. In the navigation pane on the left, go to Dashboard > Dashboards. In the Dashboard list, click the target dashboard. In the upper-right corner of the dashboard, click Edit, and then click Add > Add Chart.

  2. On the Edit Chart page, choose General Configurations > Chart Type > World Map in the right-side pane. In the left-side pane, set the time range, Logstore, and query. Configure the General Configurations settings, then click Apply to preview the chart.

    • General Configurations > Query and Analysis Configurations > Data Type: Display data by area.

    • General Configurations > Query and Analysis Configurations > Area/Area Code: The field containing area data. Select address for this example. Values are country names such as Chinese mainland.

    • General Configurations > Query and Analysis Configurations > Data Column: The metric to display. Select count to show the log count per country.