Simple Log Service enables the use of the ip_to_province function to represent regional data on the map of China. This topic outlines the steps to configure the map of China.
Prerequisites
Data is collected. For more information, see Collect text logs from servers.
Indexes are created. For more information, see Create indexes.
A dashboard is created. For more information, see Create a dashboard.
Step 1: Query and analyze data
Log on to the Simple Log Service console. In the Projects section, click the project you want.
In the left-side navigation pane, click Log Storage. In the Logstores list, click the logstore you want.

On the page that appears, enter a query statement and click Search & Analyze to view the logs.
Simple Log Service allows you to display region information collected by the ip_to_country function on the map of China. When you use the ip_to_country function, you must specify
ip_to_country(xx,'en').* | select ip_to_province(http_x_forwarded_for) as province, count(1) as c group by province order by c desc limit 100000
Step 2: Configure the map of China
In the left-side navigation pane, choose . In the Dashboard list, click the dashboard that you want to manage. In the upper-right corner of the dashboard page, click Edit. In edit mode, choose .

On the right-hand side of the Edit Chart page, choose . On the left-hand side of the Edit Chart page, you can configure the query time range, logstore, and query statement for the world map. After you complete the configuration, click Apply in the upper part of the Edit Chart page to view the configuration effects.
: Select Region to display the map by region.
: Select Province.
: Select c to display the number of logs in each region.
: Select National to display all the regions of China.
