This topic describes how to import metric data from CloudMonitor to Log Service. After the data is imported, you can perform multiple operations on the metric data in Log Service. For example, you can query, analyze, and transform the metric data.
PrerequisitesA project and a Metricstore are created. For more information, see Create a project and Create a Metricstore.
Create a data import configuration
- Log on to the Log Service console.
- In the Import Data section, click the Monitoring Data tab. Then, click CloudMonitor Data.
- Select the project and Metricstore and click Next.
- Configure the data import settings and click Next.
Parameter Description Configuration Name The name of the data import configuration. Import All Select Yes to import all metric data from CloudMonitor to Log Service. For more information, see Predefined metrics. NameSpace If you select No for the Import All parameter, select the metrics that you want to import from the NameSpace drop-down list. AccessKey ID The AccessKey ID of your Alibaba Cloud account.
We recommend that you use the AccessKey pair of a Resource Access Management (RAM) user that is granted the AliyunCloudMonitorReadOnlyAccess permission.
AccesssKey Secret The AccessKey secret of your Alibaba Cloud account. Use Hybrid Cloud Monitoring API Log Service uses only Hybrid Cloud Monitoring API to pull data from CloudMonitor.
Hybrid Cloud Monitoring allows you to pull the latest data in real time and supports higher queries per second (QPS). You are charged traffic fees when you use Hybrid Cloud Monitoring. For more information, see Hybrid Cloud Monitoring.
View the data import configuration
After you create a data import configuration, you can view the configuration and related reports in the Log Service console.
- In the Projects section, click the project that you want to view.
- Choose . On the Metricstore tab, click the Metricstore that you want to manage and choose .
- Click the name of the data import configuration.
- On the Import Configuration Overview page, view the basic information and reports of the data import configuration.
What to do next
On the Import Configuration Overview page, you can perform the following operations:
- Modify the configuration
In the upper-right corner, click Modify Settings to modify the data import configuration. For more information, see Create a data import configuration.
- Delete the configuration Click Delete Configuration to delete the data import configuration.Important After you delete the data import configuration, you cannot restore the configuration. Proceed with caution.
- Stop a job
Click Stop to stop the data import job.
What to do next
- Query and analyze data
After the data is imported to Log Service, you can query and analyze the data on the query and analysis page of the Metricstore. For more information, see Query and analyze metric data.
- Visualization on Log Service
Log Service automatically creates a host monitoring dashboard in the project. In the dashboard, you can view query and analysis results, configure alerts, and perform other operations. For more information, see Overview of visualization.
- Visualization on Grafana
Log Service allows you to send metric data to Grafana for visualization. For more information, see Send time series data from Log Service to Grafana.