All Products
Search
Document Center

Simple Log Service:Collect monitoring data from hosts

Last Updated:Nov 10, 2023

You can collect the configuration data and metric data of hosts to the Full-stack Observability application. This way, you can monitor and analyze the data in a visualized manner. The configuration data includes CPU models and memory sizes. The metric data includes CPU utilization and memory usage.

Prerequisites

A Full-stack Observability instance is created. For more information, see Create an instance.

Procedure

  1. Log on to the Simple Log Service console.

  2. In the Log Application section, click the Intelligent O&M tab. Then, click Full-stack Observability.

  3. On the Simple Log Service Full Stack Observability page, click the instance that you want to manage.

  4. In the left-side navigation pane, click Full-stack Monitoring.

    The first time you use Full-stack Monitoring in the instance, click Enable.

  5. In the left-side navigation tree, click Data Import. On the Data Access Configurations page, turn on Host in the Basic Monitoring section.

    The first time you create a Logtail configuration for host monitoring data, turn on the switch to go to the configuration page. If you created a Logtail configuration, click the 创建 icon to go to the configuration page.

  6. 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 to create a machine group. In this example, an Elastic Compute Service (ECS) instance is used.

      1. On the ECS Instances tab, select Manually Select Instances. Then, select the ECS instance that you want to use and click Create.

        For more information, see Install Logtail on ECS instances.

        Important

        If 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 Linux Logtail V0.16.40 or later. 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.

      2. After Logtail is installed, click Complete Installation.

      3. 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.

  7. Select the new machine group from Source Server Groups and move the machine group to Applied Server Groups. Then, click Next.
    Important If 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 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?
  8. In the Specify Data Source step, configure the parameters and click Complete. The following table describes the parameters.

    Simple Log Service provides the following collection plug-ins for host monitoring data:

    • metric_system_v2: used to collect the metric data of hosts. The data includes CPU utilization and memory usage. The collected data is stored in a Metricstore named {instance}-node-metrics.

    • metric_meta_host: used to collect the configuration data of hosts. The data includes CPU models and memory sizes. The collected data is stored in a Logstore named {instance}-metas.

    {instance} specifies the ID of the Full-stack Observability instance that you create.

    Parameter

    Description

    Example

    Config Name

    The name of the Logtail configuration.

    host-szytbsxv

    node-metrics

    The configurations of the metric_system_v2 plug-in that is used to collect the metric data of hosts. The data includes CPU utilization and memory usage.

    • IntervalMs: the interval between requests. Unit: ms. The value must be greater than or equal to 5000. We recommend that you set the value to 30000.

    • cluster: the name of the cluster. The name must meet the following requirements:

      • The name can contain lowercase letters, digits, hyphens (-), and underscores (_).

      • The name must start and end with a lowercase letter or a digit.

      • The name must be 3 to 63 characters in length.

      After you configure this parameter, Simple Log Service adds a cluster=Cluster name tag to the host monitoring data that is collected by using the Logtail configuration.

    • type: the type of the data source. Set the value to metric_system_v2.

    {
      "inputs": [
        {
          "detail": {
            "IntervalMs": 30000,
            "Labels": {
              "cluster": "my-cluster"
            }
          },
          "type": "metric_system_v2"
        }
      ]
    }

    node-metas

    The configurations of the metric_meta_host plug-in that is used to collect the configuration data of hosts. The data includes CPU models and memory sizes.

    • IntervalMs: the interval between requests. Unit: ms. The value must be greater than or equal to 5000. We recommend that you set the value to 30000.

    • cluster: the name of the cluster. The name must meet the following requirements:

      • The name can contain lowercase letters, digits, hyphens (-), and underscores (_).

      • The name must start and end with a lowercase letter or a digit.

      • The name must be 3 to 63 characters in length.

      After you configure this parameter, Simple Log Service adds a cluster=Cluster name tag to the host monitoring data that is collected by using the Logtail configuration.

    • type: the type of the data source. Set the value to metric_meta_host.

    {
      "inputs": [
        {
          "detail": {
            "IntervalMs": 30000,
            "Labels": {
              "cluster": "my-cluster"
            }
          },
          "type": "metric_meta_host"
        }
      ]
    }

    After you complete the configurations, Simple Log Service automatically creates assets such as Metricstores. For more information, see Assets.

What to do next

After host monitoring data is collected to the Full-stack Observability application, the application automatically creates dedicated dashboards for the monitoring data. You can use the dashboards to analyze the monitoring data. For more information, see View dashboards.