Building a Comprehensive Metric System
This section describes how to build a metric system and a dashboard for all-round, multi-dimensional, and visualized monitoring of resources and applications.
Scenario
In the Internet era, user experience is the top priority. The page response speed, access latency, and access success rate often affect user experience. If such information cannot be obtained in a timely manner, a large number of users will be lost. O&M personnel of an online shopping mall used open-source software to collect metrics. However, these metrics are scattered and cannot be displayed centrally.
Solution
AOM provides one-stop, multi-dimensional O&M for cloud applications. In the access center, you can ingest the metrics, logs, and traces of businesses, components, self-built middleware, running environments, and cloud services, and those reported using open-source APIs and protocols. You can implement custom monitoring on dashboards and configure alarm rules through a unified entry for routine inspection and normal service running.
Step 1: Build a Metric System
- Connect businesses.
- Log in to the AOM 2.0 console.
- In the navigation pane on the left, choose Access Center > Access Center to go to the new access center.
If the old access center is displayed, click Try New Version in the upper right corner.
- Select the check box next to Businesses under Types to filter out business cards.
- Click Ingest Log (LTS) Details to check the documents related to log ingestion or click Ingest Trace (APM) to quickly ingest traces.
- Ingest Log (LTS) Details: AOM provides an entry for ingesting business logs to LTS. By clicking Ingest Log (LTS) Details, you can check the documents related to log ingestion. You can ingest logs according to the documents.
- Ingest Trace (APM): AOM provides an entry for ingesting business traces to APM. By clicking Ingest Trace (APM), you can quickly ingest business traces.
Table 1 Connecting businesses Card
Related Operation
Web & H5
Obtain metrics, traces, and logs for web & HTML5 apps.
Android
Obtain metrics, traces, and logs for Android apps.
iOS
Obtain metrics, traces, and logs of iOS apps.
WeChat
Obtain metrics, traces, and logs of WeChat.
Alipay
Obtain metrics, traces, and logs of Alipay.
DingTalk
Obtain metrics, traces, and logs of DingTalk.
Baidu
Obtain metrics, traces, and logs of Baidu.
Quick App
Obtain metrics, traces, and logs of quick apps.
- Connect components.
- Log in to the AOM 2.0 console.
- In the navigation pane on the left, choose Access Center > Access Center to go to the new access center.
If the old access center is displayed, click Try New Version in the upper right corner.
- Select the check box next to Components under Types to filter out component cards.
- Click Ingest Log (LTS) Details to check the documents related to log ingestion or click Ingest Trace (APM) to quickly ingest traces.
- Ingest Log (LTS) Details: AOM provides an entry for ingesting component logs to LTS. By clicking Ingest Log (LTS) Details, you can check the documents related to log ingestion. You can ingest logs according to the documents.
- Ingest Trace (APM): AOM provides an entry for ingesting component traces to APM. By clicking Ingest Trace (APM), you can quickly ingest component traces.
Table 2 Connecting components Card
Related Operation
Java Component
Obtain metrics, traces, and logs for Java applications. For details, see:
- Connect self-built middleware.
- Log in to the AOM 2.0 console.
- In the navigation pane on the left, choose Access Center > Access Center to go to the new access center.
If the old access center is displayed, click Try New Version in the upper right corner.
- Select Self-built middleware under Types to filter out your target middleware card.
- Click Ingest Metric (AOM) to quickly ingest middleware metrics to AOM or click Ingest Log (LTS) Details to check documents related to log ingestion.
- Ingest Metric (AOM): AOM enables quick installation and configuration for self-built middleware. By creating collection tasks and executing plug-in scripts, Prometheus monitoring can monitor reported middleware metrics. It works with AOM and open-source Grafana to provide one-stop, comprehensive monitoring, helping you quickly detect and locate faults and reduce their impact on services. For details about the metrics that can be monitored by AOM, see open-source Exporters.
- Ingest Log (LTS): AOM provides an entry for ingesting middleware logs to LTS. By clicking Ingest Log (LTS) Details, you can check the documents related to log ingestion. You can ingest logs according to the documents.
Table 3 Connecting self-built middleware Card
Related Operation
MySQL
A stable, efficient relational database for managing large data volumes. It is widely used in website and app development. For details, see:
Redis
An in-memory storage system for multiple data structure types. It is used as a database, cache, and message broker. For details, see:
Kafka
Distributed stream processing platform with high throughput and low latency. Used for real-time data processing and log aggregation. For details, see:
NGINX
A high-performance HTTP/reverse proxy server for 50,000 concurrent requests. Reduces memory consumption. For details, see:
MongoDB
High-performance, open-source NoSQL database for document storage and flexible data models. For details, see Ingesting MongoDB Metrics to AOM.
Consul
Open-source distributed service discovery and configuration management, supporting multiple data centers and strong consistency. For details, see Ingesting Consul Metrics to AOM.
HAProxy
High-performance TCP/HTTP reverse proxy load balancer with high concurrency and flexible configuration for high service availability. For details, see Ingesting HAProxy Metrics to AOM.
PostgreSQL
A powerful, open source object-relational database system for complex queries and customization. For details, see Ingesting PostgreSQL Metrics to AOM.
ElasticSearch
Distributed full-text search engine with PB-level data storage and real-time retrieval. Used for full-text search, analysis, and monitoring. For details, see:
RabbitMQ
Collect RabbitMQ monitoring data. For details, see Ingesting RabbitMQ Metrics to AOM.
ZooKeeper
Distributed coordination service with leader election, configuration management, and distributed locks to ensure data consistency. For details, see Ingesting ZooKeeper Logs to LTS.
IIS
Internet Information Services (IIS) is a part of Windows Server and provides web applications and services such as HTML, ASP.NET, and PHP for clients on networks. It supports protocols such as HTTP and provides high performance, stability, and scalability. For details, see Ingesting IIS Logs to LTS.
DNS
Translates domain names into IP addresses and supports load balancing to speed up network access. For details, see Ingesting DNS Logs to LTS.
Flink
Distributed real-time compute engine with bounded and unbounded data streams processing, efficient memory performance, and exactly-once semantics. For details, see Ingesting Flink Logs to LTS.
- Connect running environments.
- Log in to the AOM 2.0 console.
- In the navigation pane on the left, choose Access Center > Access Center to go to the new access center.
If the old access center is displayed, click Try New Version in the upper right corner.
- Select the check box next to Running environments under Types to filter out the running environment cards.
- Click Ingest Metric (AOM) to quickly ingest metrics or click Ingest Log (LTS) Details to check documents related to log ingestion.
- Ingest Metric (AOM): AOM supports metric ingestion for running environments. By clicking Ingest Metric (AOM), you can quickly ingest metrics of running environments.
- Ingest Log (LTS) Details: AOM provides an entry for ingesting logs of running environments to LTS.
- By clicking Details on Ingest Log (LTS) Details, you can check the documents related to log ingestion. You can ingest logs according to the documents.
- By clicking Ingest Log (LTS) on Ingest Log (LTS) Details, you can quickly ingest logs of running environments.
Table 4 Connecting runtime environments Card
Related Operation
Elastic Cloud Server (ECS)
ECS is a cloud server that allows on-demand allocation and elastic computing capability scaling. It helps you build a reliable, secure, flexible, and efficient application environment to ensure that your services can run stably and continuously, improving O&M efficiency. For details, see:
Bare Metal Server (BMS)
A high-performance, high-security physical server on the cloud. For details, see Ingesting BMS Text Logs to LTS.
Cloud Container Engine (CCE)
CCE is a high-performance, high-reliability service through which enterprises can manage containerized applications. CCE supports native Kubernetes applications and tools, allowing you to easily establish a container runtime environment on the cloud. For details, see:
- CCE metric ingestion to AOM: Click Ingest Metric (AOM) on the Cloud Container Engine (CCE) card. In the displayed dialog box, select the target CCE cluster and click OK. On the displayed Add-ons page, install the cloud native monitoring add-on for the cluster. For Data Storage Configuration, enable Report Monitoring Data to AOM. For details, see Cloud Native Cluster Monitoring.
- Ingesting CCE Application Logs to LTS
Cloud Container Instance (CCI)
CCI provides a serverless container engine that eliminates the need to manage clusters or servers. In only three steps, you can create a workload. CCI automatically reports metrics to AOM as ready-to-use data.
Self-Managed Kubernetes Cluster
Kubernetes is an open-source container orchestration system that automates the deployment, scaling, and management of containerized applications, enhancing application reliability and scalability. Ingesting Self-Built Kubernetes Application Logs to LTS
- Connect cloud services.
- Log in to the AOM 2.0 console.
- In the navigation pane on the left, choose Access Center > Access Center to go to the new access center.
If the old access center is displayed, click Try New Version in the upper right corner.
- Select the check box next to Cloud services under Types to filter out cloud service cards.
- Click Ingest Metric (AOM) to quickly ingest metrics or click Ingest Log (LTS) Details to ingest logs and check documents related to log ingestion.
- Ingest Metric (AOM): AOM supports ingestion of cloud service metrics. By clicking Ingest Metric (AOM), you can quickly ingest cloud service metrics. The cloud services that can be connected vary depending on regions. For details, see the console.
- Ingest Log (LTS) Details: AOM provides an entry for ingesting cloud service logs to LTS. By clicking Ingest Log (LTS) Details, you can check the documents related to log ingestion. You can ingest logs according to the documents.
- By clicking Details on Ingest Log (LTS) Details, you can check the documents related to log ingestion. You can ingest logs according to the documents.
- For some cloud services, you can quickly ingest their logs by clicking Ingest Log (LTS).
Table 5 Connecting cloud services to AOM Card
Data Source
Description
AS, APIG, APIG (Dedicated), BMS, CBH, CBR, CloudTable, CFW, CSS, DC, DCS, DDS, Anti-DDoS Service (AAD), DLI, DMS for Kafka, DRS, DWS, ECS, ELB, ER, EVS, FunctionGraph, GaussDB, GES, TaurusDB, GeminiDB, IoTDA, IEF, ModelArts, MRS, NAT, OBS, RDS for MySQL, RDS for PostgreSQL, RDS for SQLServer, ROMA Connect, Live, LakeFormation, SMN, SFS, SFS Turbo, VPC, VPN, WAF, CSG, DNS, GA, EG, DDM, OCR, CDM, HSS, DBSS, CPH, CC, DIS, ImageSearch, Image Recognition, NLP, SIS, CloudPond, AGT, and GEIP
Metrics
Ingest cloud service metrics, such as the CPU usage, memory usage, and health status.
- ModelArts automatically reports metrics to AOM as ready-to-use data. No manual configuration is required.
For details about ModelArts metrics, see Basic Metrics: ModelArts Metrics.
- IoTDA automatically reports metrics to AOM as ready-to-use data. No manual configuration is required.
For details about IoTDA metrics, see Basic Metrics: IoTDA Metrics.
- Intelligent EdgeFabric (IEF) automatically reports metrics to AOM as ready-to-use data. No manual configuration is required.
For details about IEF metrics, see Basic Metrics: IEF Metrics.
- For details about how to ingest the metrics of other services, see Ingesting Cloud Service Metrics into AOM. For details about cloud service metrics, see Cloud Service Metrics.
AOM, APIG, Huawei Cloud Astro Zero, BMS, CBH, CCE, CDN, CFW, CTS, DCS, DDS, AAD, DMS for Kafka, DRS, DWS, ECS, ELB, Enterprise Router, FunctionGraph, GaussDB, GES, TaurusDB, GeminiDB, GeminiDB Mongo, GeminiDB Cassandra, HiLens, IoTDA, ModelArts, MRS, OBS, RDS for MySQL, RDS for PostgreSQL, RDS for SQL Server, ROMA Connect, Live, SMN, SecMaster, ServiceStage-container application logs, ServiceStage-cloud host logs, VPC, and WAF
Logs
LTS collects log data of many cloud services, such as compute, storage, security, and database services. You can use LTS to search for cloud service logs by keyword, analyze operations data, and monitor the running status and alarms. For details, see Ingesting Cloud Service Logs to LTS.
- Ingest data using open-source APIs and protocols.
- Log in to the AOM 2.0 console.
- In the navigation pane on the left, choose Access Center > Access Center to go to the new access center.
If the old access center is displayed, click Try New Version in the upper right corner.
- Select the check box next to APIs/protocols... under Types to filter out target cards.
- Click Ingest Metric (AOM) or Ingest Trace (APM) to quickly ingest metrics or traces, or click Ingest Log (LTS) Details to ingest logs or check documents related to log ingestion.
- Ingest Metric (AOM): AOM supports metric ingestion using open-source APIs and protocols. By clicking Ingest Metric (AOM), you can quickly ingest metrics using open-source APIs and protocols.
- Ingest Trace (APM): AOM provides an entry for ingesting traces to APM using open-source APIs and protocols. By clicking Ingest Trace (AOM), you can quickly ingest traces using open-source APIs and protocols.
- Ingest Log (LTS) Details: AOM provides an entry for ingesting logs to LTS using open-source APIs and protocols.
- By clicking Details on Ingest Log (LTS) Details, you can check the documents related to log ingestion. You can ingest logs according to the documents.
- For some components, you can quickly ingest their logs by clicking Ingest Log (LTS). For example, the Cross-Account Ingestion - Log Stream Mapping card.
Table 6 Ingesting data to AOM using open-source APIs and protocols Card
Related Operation
AOM APIs
Use the open APIs of AOM to report metric data. For details, see Using APIs to Ingest Metrics to AOM.
LTS APIs
Use LTS open APIs to report log data. For details, see Using APIs to Ingest Logs to LTS.
APM APIs
Use the open APIs of APM to report application performance monitoring data. For details, see Using APIs to Ingest Traces to APM.
Common Prometheus Instance
Suitable for customers who have self-built Prometheus servers, but need Prometheus storage availability and scalability through remote write. For details, see Connecting a Common Prometheus Instance to AOM.
Kafka Protocol
TCP-based binary protocol used by Kafka (a high-throughput, distributed message system). For details, see Using Kafka to Report Logs to LTS.
OpenTelemetry
Report application performance monitoring data using the OpenTelemetry protocol. For details, see Using OpenTelemetry to Ingest Traces to APM.
SkyWalking
Report application performance monitoring data using the SkyWalking protocol. For details, see Using SkyWalking to Ingest Traces to APM.
Syslog Protocol
Exchange logs between devices based on UDP/TCP. For details, see Using Flume to Report Logs to LTS.
Flume
Collect logs and upload them to LTS using Flume. For details, see Using Flume to Report Logs to LTS.
Beats
Collect logs and upload them to LTS using Beats. For details, see Using Kafka to Report Logs to LTS.
Logstash
Collect logs and upload them to LTS using Logstash. For details, see Using Kafka to Report Logs to LTS.
SNMP Protocol
Remotely monitor network devices. Three versions (v1, v2, and v3) are available. For details, see Using Flume to Report Logs to LTS.
Java SDK (Log4j2)
Configure Huawei Cloud Appender in Log4j2 and then report generated logs to LTS. For details, see LTS Log4j 2 SDK.
LOGBack SDK
Configure Huawei Cloud Appender in logback and then report generated logs to LTS.
Cross-Account Ingestion - Log Stream Mapping
Create an agency to map the delegator account's log stream to the delegated account's log stream. For details, see Ingesting Logs to LTS Across IAM Accounts.
Custom Prometheus Metrics
Ingest custom Prometheus metrics. For details, see Ingesting Custom Prometheus Metrics to AOM.
Step 2: Add a Dashboard for Unified Monitoring
- Setting a dashboard
- Log in to the AOM 2.0 console.
- In the navigation pane on the left, choose Dashboard > Dashboard. Click Try New Version in the upper right corner of the page.
- Create a dashboard. For details, see Creating a Dashboard.
- Setting an alarm rule
- Log in to the AOM 2.0 console.
- In the navigation pane, choose Alarm Center > Alarm Rules.
- On the Prometheus Monitoring or Log Monitoring tab page, configure metric and log alarm rules as required. For details, see:
- Creating an AOM Metric Alarm Rule: You can set threshold conditions for resource metrics in an alarm rule. When the metric data meets the threshold conditions, a threshold alarm is generated. When no metric data is reported, an insufficient data event is generated.
- Creating an AOM Event Alarm Rule: You can set event conditions for services in an alarm rule. When the service status changes and the resource data meets the event conditions, an event alarm is generated.
- Creating an AOM Log Alarm Rule: AOM allows you to create alarm rules based on keyword statistics, search analysis, and SQL statistics to monitor log data and report alarms in real time.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot