All Products
Search
Document Center

Simple Log Service:Configure a world map

Last Updated:Jul 17, 2026

Visualize the geographic distribution of access requests on a world map by converting IP addresses to country names with 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 country names in English.

    * | 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: Displays data by geographic area.

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

    • General Configurations > Query and Analysis Configurations > Data Column: The numeric metric to visualize on the map. Select count to display the number of log entries per country.