Integrate ECS

更新时间:
复制 MD 格式

Integrate Elastic Compute Service (ECS) instances with Cloud Monitor to collect metrics, logs, and events.

Prerequisites

Billing

Integration steps

  1. Log on to the Cloud Monitor console. Select a workspace, then click Integration Center > Elastic Compute Service (ECS).

  2. Create or select a policy, set the entity scope, and click Determine.

  3. Select the data to collect and click Determine:

    Observability data

    Description

    Policy name

    Optional. Name for this integration.

    ECS Monitoring Metrics

    Collects metrics for ECS instances.

    • Notes:

      • This feature collects agentless metrics for ECS from Cloud Monitor. You can also install exporters, such as Node-Exporter, Process-Exporter, or Windows-Exporter, to collect host agent metrics.

      • Installing an agent on a host in a production environment is considered a production change. Submit a change request according to your organization's standards.

      • If cross-region access is enabled, you cannot use an agent to collect node, process, or Windows metrics.

      • Exporter installation is not currently supported on LifseaOS. Instances that run LifseaOS are skipped automatically.

      • Resource usage: The agent runs as a systemd service with GOMAXPROCS=1, a CPU limit of 30%, and a memory limit of 256 MB. Resource usage is low under normal conditions. The collection overhead increases with the number of processes on the host.

      • Risk warning: Enabling the Collect Process PSS Memory Metrics feature reads the smaps file for each process and briefly holds the mmap_lock. This can introduce latency glitches for processes that use large amounts of memory or perform frequent mmap operations. If you do not need Proportional Set Size (PSS) metrics, disable this feature.

    • Tag Key: Tag key for ECS instances. Tags matching o11y.aliyun.dev/* are automatically extracted and injected as key-value pairs into Prometheus metrics.

    • Collect Cloud Service Metrics: Collects ECS agent-free metrics from Cloud Monitor.

    • Collect Node Metrics (Linux): Installs node-exporter on Linux hosts to collect node metrics (agent-based).

    • Node-Exporter Service Port: Port used by node-exporter.

    • Collect TextFile: Collects Prometheus-formatted metrics from a specified file.

    • Collect Process Metrics (Linux): Installs process-exporter on Linux hosts to collect process metrics (agent-based).

    • Process-Exporter Service Port: Port used by process-exporter.

    • Collect Process PSS Memory Metrics: When enabled, reads each process's smaps file to collect PSS (Proportional Set Size) and other memory metrics.

    • Collect Windows Metrics (Windows): Installs windows-exporter on Windows hosts to collect node metrics (agent-based).

    • Windows Service Port: Port used by windows-exporter.

    • Automatically Configure Security Group: Automatically adds a security group rule if existing rules block the integration.

    • Metric Collection Interval (seconds): Collection interval in seconds. Default: 30.

    Alibaba Cloud ECS Audit Logs

    Collects audit logs from the host.

    • Enable System Log Collection: Enables system log collection from the host.

    • System Log Logstore Name: Logstore name. Default: acs-ecs-system (modifiable). The associated project is auto-created as ws-<WorkspaceName>.

    • Data Retention Period: Days to retain data. Valid values: 1 to 3650 (3650 = permanent). Logs are deleted after expiry.

    • Shard Count: Each shard supports 5 MB/s write and 10 MB/s read. Split shards when traffic exceeds capacity; merge shards when traffic is low to reduce costs.

    Alibaba Cloud ECS Runtime Security Logs

    Collects runtime logs using eBPF to capture file access and process activities. Does not support multiple collection configurations.

    • Enable Host Runtime Log Collection: Enables runtime log collection.

    • Collect Runtime - Process: Enables process runtime log collection.

    • Collect Runtime - File: Enables file access runtime log collection.

    • Runtime Log Logstore Name: Logstore name. Default: acs-ecs-runtime (modifiable). The associated project is auto-created as ws-<WorkspaceName>.

    • Data Retention Period: Days to retain data. Valid values: 1 to 3650 (3650 = permanent). Logs are deleted after expiry.

    • Shard Count: Each shard supports 5 MB/s write and 10 MB/s read. Split shards when traffic exceeds capacity; merge shards when traffic is low to reduce costs.

    Alibaba Cloud ECS Event

    Integrates ECS system events.

    • Enable ECS System Events: Enables ECS system event integration. When enabled, events appear on the CloudLens for ECS page. Otherwise, this page displays no data.

  4. After integration, go to All Features > CloudLens for ECS to view data:

    • Instance monitoring: Click Resource Center > Instance List, then click an instance ID to view its dashboard.

    • Built-in dashboards: Click CloudLens to view built-in dashboards.

Data storage policies

After integration, CloudMonitor creates SLS logstores and a Prometheus instance to store observability data.

Type

Default storage location

Notes

Events

Project: cms-alert-center-{{userId}}-{{regionId}}

logstore: cms-event-store-{{WorkspaceName}}

None

Metrics

Prometheus instance: RegionShare:{{WorkspaceName}}:{{regionId}}

None

Logs

  • runtime logs

    • Project: aliyun-product-data-{{userId}}-{{regionId}}

    • logstore: acs-ecs-runtime

  • audit logs

    • Project: aliyun-product-data-{{userId}}-{{regionId}}

    • logstore: acs-ecs-system

None

Manage integration policies

To modify or delete an integration policy, go to Integration Management in the Integration Center. Find the target policy and click Edit or Delete.