Simple Log Service allows you to use Logtail to collect performance data that is reported by the Pyroscope SDK from Go programs to the Full-stack Observability application for visualized performance monitoring and analysis.
Prerequisites
A Full-stack Observability instance is created. For more information, see Create an instance.
Limits
Only Linux Logtail V1.7 or later is supported.
Step 1: Create a Logtail configuration
Log on to the Simple Log Service console.
In the Log Application section, click the Intelligent O&M tab. Then, click Full-stack Observability.
On the Simple Log Service Full-stack Observability page, click the instance that you want to manage.
In the left-side navigation pane, click Performance Monitoring.
Click Enable if this is your first time to use Performance Monitoring in the instance.
In the left-side navigation tree, click Data Import. On the Data Access Configurations page, find Common Push Import.
If this is your first time to create a Logtail configuration for this type of performance data, turn on the switch to go to the configuration page. If you already created a Logtail configuration, click the icon to go to the configuration page.
Create a machine group.
If a machine group is available, click Use Existing Machine Groups.
If no machine groups are available, perform the following steps:
Check your server type.
If you use an Elastic Compute Service (ECS) instance that belongs to the same Alibaba Cloud account as Simple Log Service, click the ECS Instances tab, select Manually Select Instances and your ECS instance, and then click Create.
For more information, see Install Logtail on ECS instances.
If you use an ECS instance that belongs to a different Alibaba Cloud account from Simple Log Service, a server from a third-party cloud service provider, or a server in a data center, manually install Linux Logtail V1.7 or later on the server. For more information, see Install Logtail on a Linux server.
ImportantAfter you manually install Logtail, you must configure a user identifier for the server. For more information, see Configure a user identifier.
If you use a Kubernetes cluster, perform the following steps:
Click the Kubernetes Monitoring tab. Then, configure the parameters, including the Cluster Name and Access Method parameters.
Download the installation script to your Kubernetes cluster.
wget https://logtail-release-cn-beijing.oss-cn-beijing.aliyuncs.com/kubernetes/sls-monitoring.sh -O sls-monitoring.sh
Copy the installation command on the Kubernetes Monitoring tab and run the command in your Kubernetes cluster.
After Logtail is installed, click Complete Installation.
In the Create Machine Group step, configure the Name parameter and click Next.
Simple Log Service allows you to create IP address-based machine groups and custom identifier-based machine groups. For more information, see Create an IP address-based machine group and Create a custom identifier-based machine group.
ImportantIf you install Logtail in a Kubernetes cluster, a machine group named in the {instanceId}-{clusterId}-k8s-cluster format is automatically generated. You can skip this step.
In the Machine Group Settings step, select the machine group that you create in the Source Server Groups section and move the machine group to the Applied Server Groups section. Then, click Next.
ImportantIf you enable 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 a Logtail machine group has no heartbeats?
In the Specify Data Source step, configure the following parameters and click Complete.
Parameter
Description
Config Name
The name of the Logtail configuration. You can enter a custom name.
Cluster
The name of the cluster. You can enter a custom name.
After you configure this parameter, Simple Log Service adds a
cluster=Cluster name
tag to the performance data that is collected by using the Logtail configuration.ImportantMake sure that the cluster name is unique. Otherwise, data conflicts may occur.
Address
The address for data collection. The default value is
http://:4040
, where 4040 is the default port of Pyroscope. If you retain the default value, the HTTP server uses the local address.If you use an ECS instance, specify the value in the following format:
IP address of the ECS instance:4040
.If you use a server that resides in a Kubernetes cluster, set the value to
logtail-kubernetes-metrics.sls-monitoring:4040
.If you use a server that is from a third-party cloud service provider or a data center, specify the value in the following format:
IP address of the server:4040
.
Endpoint
The default endpoint of Pyroscope. Default value:
/ingest
.Read Timeout Period
The timeout period for data read operations. Default value: 10. Unit: seconds.
Maximum Body Size
The maximum size of data that can be collected.
After you complete the configuration, Simple Log Service automatically creates assets such as Metricstores. For more information, see Assets.
Step 2: Integrate the Pyroscope SDK to collect performance data
Configure the Pyroscope SDK to send performance data to Simple Log Service based on the sample code that is provided at Golang Example. Configure the address of the data source based on the following description:
If you use an ECS instance, specify the value in the following format:
IP address of the ECS instance:4040
.If you use a server that resides in a Kubernetes cluster, set the value to
logtail-kubernetes-metrics.sls-monitoring:4040
.If you use a server that is from a third-party cloud service provider or a data center, specify the value in the following format:
IP address of the server:4040
.
What to do next
After you collect the performance data to Full-stack Observability, you can query and compare the data. For more information, see Data query and Data comparison.