Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive

Application Discovery

Updated on 2024-05-27 GMT+08:00

AOM can discover applications and collect their metrics based on configured rules. There are two modes to configure application discovery: auto mode and manual mode. This section mainly describes the manual mode.

  • Auto mode

    After you install the ICAgent on a host, the ICAgent automatically discovers applications on the host based on Built-in Discovery Rules and displays them on the Application Monitoring page.

  • Manual mode

    If you customize an application discovery rule and apply it to the host where the ICAgent is installed, the ICAgent discovers applications on the host based on the custom rule and displays them on the Application Monitoring page.

Filtering Rules

The ICAgent periodically detects processes on the target host. The effect is similar to that of running the ps -e -o pid,comm,lstart,cmd | grep -v defunct command. Then, the ICAgent checks whether processes match the filtering rules in Table 1. If a process meets a filtering rule, the process is filtered out and is not discovered by AOM. If a process does not meet any filtering rules, the process is not filtered and is discovered by AOM.

Information similar to the following is displayed:

   PID COMMAND                          STARTED CMD
     1 systemd         Tue Oct  2 21:12:06 2018 /usr/lib/systemd/systemd --switched-root --system --deserialize 20
     2 kthreadd        Tue Oct  2 21:12:06 2018 [kthreadd]
     3 ksoftirqd/0     Tue Oct  2 21:12:06 2018 (ksoftirqd/0)
  1140 tuned           Tue Oct  2 21:12:27 2018 /usr/bin/python -Es /usr/sbin/tuned -l -P
  1144 sshd            Tue Oct  2 21:12:27 2018 /usr/sbin/sshd -D
  1148 agetty          Tue Oct  2 21:12:27 2018 /sbin/agetty --keep-baud 115200 38400 9600 hvc0 vt220
  1154 docker-containe Tue Oct  2 21:12:29 2018 docker-containerd -l unix:///var/run/docker/libcontainerd/docker-containerd.sock --shim docker-containerd-shim --start-timeout 2m --state-dir /var/run/docker/libcontainerd/containerd --runtime docker-runc --metrics-interval=0
Table 1 Filtering rules

Filtering Rule

Example

If the COMMAND value of a process is docker-containe, vi, vim, pause, sshd, ps, sleep, grep, tailf, tail, or systemd-udevd, and the process is not running in a container, the process is filtered out and is not discovered by AOM.

In the preceding information, the process whose PID is 1154 is not discovered by AOM because its COMMAND value is docker-containe.

If the CMD value of a process starts with [ and ends with ], the process is filtered out and is not discovered by AOM.

In the preceding information, the process whose PID is 2 is not discovered by AOM because its CMD value is [kthreadd].

If the CMD value of a process starts with ( and ends with ), the process is filtered out and is not discovered by AOM.

In the preceding information, the process whose PID is 3 is not discovered by AOM because its CMD value is (ksoftirqd/0).

If the CMD value of a process starts with /sbin/, the process is filtered out and is not discovered by AOM.

In the preceding information, the process whose PID is 1148 is not discovered by AOM because its CMD value starts with /sbin/.

Built-in Discovery Rules

AOM provides two built-in discovery rules: Sys_Rule and Default_Rule. These rules are executed on all hosts, including hosts added later. The priority of Sys_Rule is higher than that of Default_Rule. That is, Sys_Rule is executed on the host first. If Sys_Rule is met, Default_Rule is not executed. Otherwise, Default_Rule is executed. Rule details are as follows:

Sys_Rule (cannot be disabled)

When Sys_Rule is used, the component name and application name must be used together. The names are determined according to the following priorities:

  • Priorities for determining the application name:
    1. Use the value of the Dapm_application field in the process startup command.
    2. If the value in 1 is empty, use the value of the Dapm_application field in the JAVA_TOOL_OPTIONS variable.
    3. If the value in 2 is empty, use the value of the PAAS_MONITORING_GROUP variable.
    4. If the value in 3 is empty, use the value of the DAOM.APPN field in the process startup command.
  • Priorities for determining the component name:
    1. Use the value of the DAOM.PROCN field in the process startup command. If the value is empty, use the value of the Dapm_tier field.
    2. If the value in 1 is empty, use the value of the Dapm_tier field in the JAVA_TOOL_OPTIONS variable.
    3. If the value in 2 is empty, use the value of the PAAS_APP_NAME variable.
In the following example, the component name is atps-demo and the application name is atpd-test.
PAAS_MONITORING_GROUP=atpd-test
PAAS_APP_NAME=atps-demo
JAVA_TOOL_OPTIONS=-javaagent:/opt/oss/servicemgr/ICAgent/pinpoint/pinpoint-bootstrap.jar -Dapm_application=atpd-test -Dapm_tier=atps-demo
Default_Rule (can be disabled)
  • If the COMMAND value of a process is java, obtain the name of the JAR package in the command, the main class name in the command, and the first keyword that does not start with a hyphen (-) in the command based on the priorities in descending order as the component name, and use the default value unknownapplicationname as the application name.
  • If the COMMAND value of a process is python, obtain the name of the first .py/.pyc script in the command as the component name, and use the default value unknownapplicationname as the application name.
  • If the COMMAND value of a process is node, obtain the name of the first .js script in the command as the component name, and use the default value unknownapplicationname as the application name.

Creating a Custom Discovery Rule

  1. Log in to the AOM 2.0 console.
  2. In the navigation pane, choose Infrastructure Monitoring > Process Monitoring. Next, click the Application Discovery tab.
  3. On the displayed page, click Add Custom Application Discovery Rule and configure an application discovery rule.
  4. Select a host for pre-detection.

    1. Customize a rule name, for example, rule-test.
    2. Select a typical host, for example, host-test, to check whether the application discovery rule is valid. The hosts that execute the rule will be configured in 7. Then click Next.

  5. Set an application discovery rule.

    1. Click Add Check Items. AOM can discover processes that meet the conditions of check items.
      For example, AOM can detect the processes whose command parameters contain ovs-vswitchd unix: and environment variables contain SUDO_USER=paas.
      NOTE:
      • To precisely detect processes, you are advised to add check items about unique features of the processes.
      • You must add at least one check item and can add up to five check items. If there are multiple check items, AOM only discovers the processes that meet the conditions of all check items.
    2. After adding check items, click Detect to search for the processes that meet the conditions.

      If no process is detected within 20s, modify the discovery rule and detect processes again. Only when at least one process is detected can you proceed to the next step.

  6. Set an application name and component name.

    1. Set an application name.

      In the Application Name Settings area, click Add Naming Rule to set an application name for the detected process.

      NOTE:
      • If you do not set an application name, the default name unknownapplicationname is used.
      • When you add multiple naming rules, all the naming rules are combined as the application name of the process. Metrics of the same application are aggregated.
    2. Set a component name.
      In the Component Name Settings area, specify an application type and click Add Naming Rule to set a component name for the discovered process. For example, add the text app-test as a component name.
      NOTE:
      • Application types are specified to identify application categories. They are used only for better rule classification and console display. You can enter any field. For example, enter Java or Python by technology stack, or enter collector or database by function.
      • If you do not set a component name, the default name unknownapplicationname is used.
      • When you add multiple naming rules, all the naming rules are combined as the component name of the process. Metrics of the same component are aggregated.
    3. Preview the component name.

      If the name does not meet your requirements, click in the Preview Component Name table to rename the component.

  7. Set a priority and detection range.

    1. Set a priority: When there are multiple rules, set priorities. Enter 1 to 9999. A smaller value indicates a higher priority. For example, 1 indicates the highest priority and 9999 indicates the lowest priority.
    2. Set a detection range: Select a host to be detected. That is, select the host to which the configured rule is applied. If no host is selected, this rule will be executed on all hosts, including hosts added later.

  8. Click OK to complete the configuration. AOM collects metrics of the process.
  9. After about two minutes, choose Process Monitoring > Component Monitoring in the navigation pane to view the monitored components.

More Operations

After creating an application discovery rule, perform the operations listed in Table 2 if needed.

Table 2 Related operations

Operation

Description

Viewing rule details

In the Name column, click the name of an application discovery rule.

Starting or stopping rules

  • Click Start in the Operation column.
  • Click Stop in the Operation column. After a rule is disabled, AOM does not collect corresponding process metrics.

Deleting rules

  • To delete a discovery rule, click Delete in the Operation column.
  • To delete one or more application discovery rules, select them and click Delete above the rule list.
NOTE:

Built-in discovery rules cannot be deleted.

Modifying rules

Click Modify in the Operation column.

NOTE:

Built-in discovery rules cannot be modified.

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback