Collect Prometheus-format metrics from Node Exporter, Kafka Exporter, and application endpoints using the Logtail plugin.
Prerequisites
You have created a Project and a MetricStore. For more information, see Manage a Project and Create a MetricStore.
Limitations
Logtail 0.16.66 or later on Linux is required. Upgrade earlier versions from Install Logtail (Linux system).
Procedure
Each Logtail plugin supports only one Prometheus scrape configuration. If you define multiple, Logtail applies one at random.
Log on to the Simple Log Service console.
-
In the Import Data section, on the Monitoring Data tab, click Prometheus Metric Scrape.
-
Select the destination project and Metricstore, and then click Next.

-
On the Create Machine Group tab:
-
If a machine group is available, click Use Existing Machine Groups.

-
If no machine groups are available, perform the following steps to create a machine group. In this example, an Elastic Compute Service (ECS) instance is used.
-
On the ECS Instance tab, under Manually Select Instances, select the target ECS instance, and then click Create.
For more information, see Install Logtail on ECS instances.
ImportantIf you want to collect logs from an ECS instance that belongs to a different Alibaba Cloud account than Simple Log Service, a server in a data center, or a server of a third-party cloud service provider, you must manually install Logtail. For more information, see Install Logtail on a Linux server. After you manually install Logtail, you must configure a user identifier for the server. For more information, see Configure a user identifier.
-
After Logtail is installed, click Complete Installation.
-
On the Create Machine Group page, enter a Name and click Next.
You can use Simple Log Service to create IP address-based machine groups and custom identifier-based machine groups. For more information, see Create a machine group.
-
-
-
Confirm that the machine group is displayed in the Applied Server Groups section and click Next.
ImportantIf you apply a machine group immediately after you create the machine group, the heartbeat status of the machine group may be FAIL. This issue occurs because the machine group is not connected to Simple Log Service. To resolve this issue, you can click Automatic Retry. If the issue persists, see What do I do if no heartbeat connections are detected on Logtail?
-
In the Configure Data Source wizard, set Configuration Name and Plug-in Configuration, and then click Next.
The Plug-in Configuration includes
inputsandprocessors. Log Service provides aninputstemplate withglobalandscrape_configsnodes.-
inputsis required and specifies the data source.Important-
The scrape configuration follows native Prometheus rules. Only
globalandscrape_configsare supported. Prometheus scrape configuration rules. -
Only one data source type is allowed per
inputsblock.
-
-
processorsis optional and specifies processing rules. Append fields.To append the Logtail host IP, hostname, or custom fields to collected data, enable Use Advanced Edit Mode and add a
processorsconfiguration that uses the field appender processor. For example:{ "processors":[ { "type":"processor_appender", "detail": { "Key": "__labels__", "Value": "|host#$#{{__host__}}|ip#$#{{__ip__}}", "SortLabels": true } } ] }
-
Next steps
-
Query and analyze data
Query and analyze collected data in your MetricStore. Query and analyze time series data.
-
Visualize data in Log Service
Log Service creates a host monitoring dashboard in your Project for viewing results and configuring alerts. Dashboards.
-
Visualize data in Grafana
Visualize time series data in Grafana. Integrate time series data with Grafana.