- What's New
- Function Overview
- Service Overview (2.0)
- Billing (2.0)
- Getting Started (2.0)
-
User Guide (2.0)
- Introduction
- Access Center
- Dashboard
- Alarm Management
- Metric Browsing
- Log Analysis (New)
- Log Analysis (Old)
- Application Insights (Retiring)
-
Prometheus Monitoring
- Prometheus Monitoring
- Creating Prometheus Instances
- Managing Prometheus Instances
- Configuring a Recording Rule
- Metric Management
- Dashboard Monitoring
- Data Multi-Write
-
Access Guide
- Connecting Node Exporter
- Connecting Self-Built Middleware in the CCE Container Scenario
-
Exporter Access in the VM Scenario
- Access Overview
- MySQL Component Access
- Redis Component Access
- Kafka Component Access
- Nginx Component Access
- MongoDB Component Access
- Consul Component Access
- HAProxy Component Access
- PostgreSQL Component Access
- Elasticsearch Component Access
- RabbitMQ Component Access
- Access of Other Components
- Custom Plug-in Access
- Other Operations
- Obtaining the Service Address of a Prometheus Instance
- Regions that Support Public Network Addresses for Remote Write
- Viewing Prometheus Instance Data Through Grafana
- Reading Prometheus Instance Data Through Remote Read
- Reporting Self-Built Prometheus Instance Data to AOM
- Resource Usage Statistics
- Business Monitoring (Beta)
- Infrastructure Monitoring
- O&M Management (Retiring)
- Settings
- Remarks
- Permissions Management
- Auditing
- Subscribing to AOM 2.0
- Upgrading to AOM 2.0
-
Best Practices (2.0)
- AOM Best Practices
- Building a Comprehensive Metric System
- Alarm Noise Reduction
- Unified Metric Monitoring
- Customizing OS Images to Automatically Connect UniAgent
- Connecting Self-Built Middleware in the CCE Container Scenario
- Interconnecting Third-Party/IDC/Huawei Cloud Cross-Region Self-Built Prometheus with AOM Prometheus Instances
-
FAQs (2.0)
- Dashboard
- Alarm Management
- Log Analysis
- Prometheus Monitoring
- Infrastructure Monitoring
- Application Monitoring
-
Collection Management
- Are ICAgent and UniAgent the Same?
- What Can I Do If an ICAgent Is Offline?
- Why Is an Installed ICAgent Displayed as "Abnormal" on the UniAgent Installation and Configuration Page?
- Why Can't I View the ICAgent Status After It Is Installed?
- Why Can't AOM Monitor CPU and Memory Usage After ICAgent Is Installed?
- How Do I Obtain an AK/SK?
- FAQs About UniAgent and ICAgent Installation
- How Do I Enable the Nginx stub_status Module?
- Why Does APM Metric Collection Fail?
- Why Cannot the Installation Script Be Downloaded When I Try to Install UniAgent on an ECS?
- CMDB (Unavailable Soon)
-
O&M Management (Unavailable Soon)
- How Can I Obtain the OBS Permission for Installing Packages?
- Why Can't Scheduled Tasks Be Triggered?
- Can I Specify Script Parameters and Hosts During Job Execution?
- Why Is a Parameter Error Displayed When I Create a Scheduled Task Using a Cron Expression?
- How Can I Set a Review for an Execution Plan?
- Why Is "delete success:{}" Displayed (Files Cannot Be Deleted) During Disk Clearance?
- What Can I Do If the Execution Plan Is Not Updated After I Modify the Job?
- What Can I Do If "agent not found" Is Displayed?
- Why Are the Hosts Listed in Execution Logs Inconsistent with Those I Configured for a Task?
- Why Did a Task Fail to Execute?
- Other FAQs
-
API Reference
- Before You Start
- API Overview
- Calling APIs
-
APIs
-
Alarm
- Querying the Event Alarm Rule List
- Adding an Event Alarm Rule
- Modifying an Event Alarm Rule
- Deleting an Event Alarm Rule
- Querying Events and Alarms
- Counting Events and Alarms
- Reporting Events and Alarms
- Obtaining the Alarm Sending Result
- Deleting a Silence Rule
- Adding a Silence Rule
- Modifying a Silence Rule
- Obtaining the Silence Rule List
- Querying an Alarm Action Rule Based on Rule Name
- Adding an Alarm Action Rule
- Deleting an Alarm Action Rule
- Modifying an Alarm Action Rule
- Querying the Alarm Action Rule List
- Querying Metric or Event Alarm Rules
- Adding or Modifying Metric or Event Alarm Rules
- Deleting Metric or Event Alarm Rules
-
Monitoring
- Querying Time Series Objects
- Querying Time Series Data
- Querying Metrics
- Querying Monitoring Data
- Adding Monitoring Data
- Adding or Modifying One or More Service Discovery Rules
- Deleting a Service Discovery Rule
- Querying Existing Service Discovery Rules
- Adding a Threshold Rule
- Querying the Threshold Rule List
- Modifying a Threshold Rule
- Deleting a Threshold Rule
- Querying a Threshold Rule
- Deleting Threshold Rules in Batches
-
Prometheus Monitoring
- Querying Expression Calculation Results in a Specified Period Using the GET Method
- (Recommended) Querying Expression Calculation Results in a Specified Period Using the POST Method
- Querying the Expression Calculation Result at a Specified Time Point Using the GET Method
- (Recommended) Querying Expression Calculation Results at a Specified Time Point Using the POST Method
- Querying Tag Values
- Obtaining the Tag Name List Using the GET Method
- (Recommended) Obtaining the Tag Name List Using the POST Method
- Querying Metadata
- Log
- Prometheus Instance
- Configuration Management
-
CMDB (AOM 2.0)
- Creating an Application
- Deleting an Application
- Querying the Details of an Application
- Modifying an Application
- Adding a Component
- Deleting a Component
- Querying the Details of a Component
- Modifying a Component
- Creating an Environment
- Deleting an Environment
- Querying the Details of an Environment
- Modifying an Environment
- Querying the Resource List of a Node
- Querying the Details of an Application Based on the Application Name
- Querying the Details of an Environment Based on the Environment Name
- Querying the Details of a Component Based on the Component Name
- Adding a Sub-application
- Deleting a Sub-application
- Modifying a Sub-application
-
Automation (AOM 2.0)
- Creating a Task
- Updating a Task
- Operating a Paused Task
- Obtaining the Execution Details of a Workflow
- Terminating a Task
- Querying a Script
- Querying the Script Version
- Performing Fuzzy Search on the Job Management Page
- Querying Execution Plans (Custom Templates) Based on Job ID
- Querying the Details of an Execution Plan
- Querying Tasks
- Querying the Execution History of a Task
- Executing a Workflow
-
Alarm
- Historical APIs
- Examples
- Permissions Policies and Supported Actions
- Appendix
- SDK Reference
-
Service Overview (1.0)
- What Is AOM?
- Product Architecture
- Functions
- Application Scenarios
- Edition Differences
-
Metric Overview
- Introduction
- Network Metrics and Dimensions
- Disk Metrics and Dimensions
- Disk Partition Metrics
- File System Metrics and Dimensions
- Host Metrics and Dimensions
- Cluster Metrics and Dimensions
- Container Metrics and Dimensions
- VM Metrics and Dimensions
- Instance Metrics and Dimensions
- Service Metrics and Dimensions
- Security
- Restrictions
- Privacy and Sensitive Information Protection Statement
- Relationships Between AOM and Other Services
- Basic Concepts
- Permissions
- Billing
- Change History
- Getting Started (1.0)
-
User Guide (1.0)
- Overview
- Subscribing to AOM
- Permissions Management
- Connecting Resources to AOM
- Monitoring Overview
- Alarm Management
- Resource Monitoring
- Log Management
- Configuration Management
- Resource Groups
- Auditing
- Upgrading to AOM 2.0
- Best Practices (1.0)
-
FAQs (1.0)
- User FAQs
-
Consultation FAQs
- What Is the Billing Policy of AOM?
- What Are the Usage Restrictions of AOM?
- What Are the Differences Between AOM and APM?
- How Do I Distinguish Alarms from Events?
- What Is the Relationship Between the Time Range and Statistical Cycle?
- Does AOM Display Logs in Real Time?
- Will Container Logs Be Deleted After They Are Dumped?
- How Can I Do If I Cannot Receive Any Email Notification After Configuring a Threshold Rule?
- Why Are Connection Channels Required?
-
Usage FAQs
- What Can I Do If I Do Not Have the Permission to Access SMN?
- What Can I Do If Resources Are Not Running Properly?
- How Do I Set the Full-Screen Online Duration?
- What Can I Do If the Log Usage Reaches 90% or Is Full?
- How Do I Obtain an AK/SK?
- How Can I Check Whether a Service Is Available?
- Why Is the Status of an Alarm Rule Displayed as "Insufficient"?
- Why the Status of a Workload that Runs Normally Is Displayed as "Abnormal" on the AOM Page?
- How Do I Create the apm_admin_trust Agency?
- How Do I Obtain the AK/SK by Creating an Agency?
- What Is the Billing Policy of Logs?
- Why Can't I See Any Logs on the Console?
- What Can I Do If an ICAgent Is Offline?
- Why Can't the Host Be Monitored After ICAgent Is Installed?
- Why Is "no crontab for root" Displayed During ICAgent Installation?
- Why Can't I Select an OBS Bucket When Configuring Log Dumping on AOM?
- Why Can't Grafana Display Content?
- Videos
-
More Documents
-
User Guide (1.0) (Kuala Lumpur Region)
-
Service Overview
- What Is AOM?
- Product Architecture
- Functions
- Application Scenarios
-
Metric Overview
- Introduction
- Network Metrics and Dimensions
- Disk Metrics and Dimensions
- Disk Partition Metrics
- File System Metrics and Dimensions
- Host Metrics and Dimensions
- Cluster Metrics and Dimensions
- Container Metrics and Dimensions
- VM Metrics and Dimensions
- Instance Metrics and Dimensions
- Service Metrics and Dimensions
- Restrictions
- Privacy and Sensitive Information Protection Statement
- Relationships Between AOM and Other Services
- Basic Concepts
- Permissions
- Getting Started
- Permissions Management
- Connecting Resources to AOM
- Monitoring Overview
- Alarm Management
- Resource Monitoring
- Log Management
- Configuration Management
- Auditing
- Upgrading to AOM 2.0
-
FAQs
- User FAQs
-
Consultation FAQs
- What Are the Usage Restrictions of AOM?
- What Are the Differences Between AOM and APM?
- How Do I Distinguish Alarms from Events?
- What Is the Relationship Between the Time Range and Statistical Cycle?
- Does AOM Display Logs in Real Time?
- How Can I Do If I Cannot Receive Any Email Notification After Configuring a Threshold Rule?
- Why Are Connection Channels Required?
-
Usage FAQs
- What Can I Do If I Do Not Have the Permission to Access SMN?
- What Can I Do If Resources Are Not Running Properly?
- How Do I Set the Full-Screen Online Duration?
- How Do I Obtain an AK/SK?
- How Can I Check Whether a Service Is Available?
- Why Is the Status of an Alarm Rule Displayed as "Insufficient"?
- Why the Status of a Workload that Runs Normally Is Displayed as "Abnormal" on the AOM Page?
- How Do I Create the apm_admin_trust Agency?
- What Can I Do If an ICAgent Is Offline?
- Why Is "no crontab for root" Displayed During ICAgent Installation?
- Change History
-
Service Overview
-
User Guide (2.0) (Kuala Lumpur Region)
- Service Overview
- Getting Started
- Introduction
- Access Center
- Dashboard
- Alarm Management
-
Metric Analysis
- Metric Browsing
- Prometheus Monitoring
- Resource Usage Statistics
- Log Analysis (Beta)
- Container Insights
- Infrastructure Monitoring
- Process Monitoring
- Collection Management
- Configuration Management
- Remarks
- Permissions Management
- Auditing
- Upgrading to AOM 2.0
-
FAQs
- Overview
- Dashboard
- Alarm Management
- Log Analysis
- Prometheus Monitoring
- Container Insights
- Application Monitoring
-
Collection Management
- Are ICAgent and UniAgent the Same?
- What Can I Do If an ICAgent Is Offline?
- Why Is an Installed ICAgent Displayed as "Abnormal" on the Agent Management Page?
- Why Can't I View the ICAgent Status After It Is Installed?
- Why Can't AOM Monitor CPU and Memory Usage After ICAgent Is Installed?
- How Do I Obtain an AK/SK?
- FAQs About ICAgent Installation
- Other FAQs
- Change History
-
API Reference (Kuala Lumpur Region)
- Before You Start
- API Overview
- Calling APIs
-
APIs
-
Alarm
- Querying the Event Alarm Rule List
- Adding an Event Alarm Rule
- Modifying an Event Alarm Rule
- Deleting an Event Alarm Rule
- Obtaining the Alarm Sending Result
- Deleting a Silence Rule
- Adding a Silence Rule
- Modifying a Silence Rule
- Obtaining the Silence Rule List
- Querying an Alarm Action Rule Based on Rule Name
- Adding an Alarm Action Rule
- Deleting an Alarm Action Rule
- Modifying an Alarm Action Rule
- Querying the Alarm Action Rule List
- Querying Events and Alarms
- Counting Events and Alarms
- Reporting Events and Alarms
-
Monitoring
- Querying Time Series Objects
- Querying Time Series Data
- Querying Metrics
- Querying Monitoring Data
- Adding Monitoring Data
- Adding or Modifying One or More Service Discovery Rules
- Deleting a Service Discovery Rule
- Querying Existing Service Discovery Rules
- Adding a Threshold Rule
- Querying the Threshold Rule List
- Modifying a Threshold Rule
- Deleting a Threshold Rule
- Querying a Threshold Rule
- Deleting Threshold Rules in Batches
- Log
-
Alarm
- Examples
- Permissions Policies and Supported Actions
- Appendix
- Change History
-
User Guide (ME-Abu Dhabi Region)
- Service Overview
- Getting Started
- User Guide
-
FAQs
- What Can I Do If an ICAgent Is Offline?
- Obtaining an AK/SK
- What Is the Relationship Between the Time Range and Statistical Cycle?
- What Can I Do If Resources Are Not Running Properly?
- How Can I Do If I Do Not Have the Permission to Access SMN?
- How Do I Distinguish Alarms and Events?
- Does AOM Display Logs in Real Time?
- How Can I Check Whether a Service Is Available?
- Why Is the Status of an Alarm Rule Displayed as "Insufficient"?
- Why the Status of a Workload that Runs Normally Is Abnormal on the AOM Page?
-
API Reference(ME-Abu Dhabi Region)
- Before You Start
- API Overview
- Calling APIs
-
APIs
-
Monitoring (v1)
- Querying Metrics
- Querying Monitoring Data
- Adding Monitoring Data
- Adding a Threshold Rule
- Modifying a Threshold Rule
- Querying the Threshold Rule List
- Querying a Threshold Rule
- Deleting a Threshold Rule
- Adding or Modifying One or More Application Discovery Rules
- Deleting an Application Discovery Rule
- Querying Application Discovery Rules
- Auto Scaling
- Log
-
Monitoring (v1)
- Permissions Policies and Supported Actions
- Appendix
-
User Guide (Ankara Region)
- Service Overview
- Getting Started
- User Guide
-
FAQs
- What Can I Do If an ICAgent Is Offline?
- How Do I Obtain an AK/SK?
- What Can I Do If Resources Are Not Running Properly?
- How Can I Do If I Do Not Have the Permission to Access SMN?
- How Do I Distinguish Alarms from Events?
- Does AOM Display Logs in Real Time?
- Why Is the Application Status Normal but the Component Status Abnormal?
- Best Practices
- Change History
-
API Reference (Ankara Region)
- Before You Start
- API Overview
- Calling APIs
-
APIs
-
Monitoring (v1)
- Querying Metrics
- Querying Monitoring Data
- Adding Monitoring Data
- Adding a Threshold Rule
- Modifying a Threshold Rule
- Querying the Threshold Rule List
- Querying a Threshold Rule
- Deleting a Threshold Rule
- Adding or Modifying One or More Application Discovery Rules
- Deleting an Application Discovery Rule
- Querying Application Discovery Rules
- Monitoring (v2)
- Auto Scaling
- Log
- Events/Alarms
- Agent
- Application Discovery Rules
-
Prometheus Monitoring
- Querying Expression Calculation Results in a Specified Period
- Querying the Expression Calculation Result at a Specified Time Point
- Querying Tag Values
- Obtaining the Tag Name List
- Querying Metadata
- Querying the Calculation Results of a PromQL Expression in a Specified Period Based on Prometheus Instance
- Querying the Calculation Result of a PromQL Expression at a Specified Time Point Based on Prometheus Instance
- Querying the Values of a Tag Based on Prometheus Instance
- Obtaining the Tag Name List Based on Prometheus Instance
- Querying Metadata Based on Prometheus Instance
-
Monitoring (v1)
- Appendix
- Change History
-
User Guide (1.0) (Kuala Lumpur Region)
- General Reference
Copied.
Adding or Modifying Application Discovery Rules
Function
This API is used to add or modify one or more application discovery rules. A maximum of 100 rules can be added to a project.
URI
PUT /v1/{project_id}/aom/application-discovery-rules
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID obtained from IAM. Generally, a project ID contains 32 characters. |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
User token obtained from IAM. |
Content-Type |
Yes |
String |
Content type, which is application/json. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
app_rules |
Yes |
Array of AppRuleV1 objects |
Application Discovery Rules |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID obtained from IAM. Generally, a project ID contains 32 characters. |
id |
Yes |
String |
Rule ID. When creating an application discovery rule, leave this parameter blank. When modifying an application discovery rule, enter a rule ID. |
name |
Yes |
String |
Rule name. The value can contain a maximum of 64 characters. It must start with a lowercase letter and cannot end with a hyphen (-). Only digits, lowercase letters, and hyphens are allowed. |
enable |
Yes |
Boolean |
Whether a rule is enabled. Value: true or false. |
host_id |
No |
Array of strings |
Host ID (not used currently and can be left empty). |
event_name |
Yes |
String |
aom_inventory_rules_event Rule event name. For service discovery, the fixed name is aom_inventory_rules_event. |
spec |
Yes |
AppRulesSpecV1 object |
Additional information. |
create_time |
No |
String |
Creation time. When creating an application discovery rule, leave this parameter blank. When modifying an application discovery rule, enter the returned createTime. |
desc |
No |
String |
Rule description. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
app_type |
No |
String |
Service type, which is used only for rule classification and UI display. You can enter any field. For example, enter Java or Python to specify a technology stack. You can also enter collector or database to specify a function. |
attr_list |
No |
Array of strings |
Attribute list (not used currently and can be left empty). |
discovery_rule |
Yes |
Array of DiscoveryRuleV1 objects |
Discovery rule. When it is an array consisting of multiple conditions, only the processes that meet all the conditions are filtered.If the value of checkType is cmdLine, set the value of checkMode to contain. checkContent is in the format of ["xxx"], indicating that the process must contain the xxx parameter. If the value of checkType is env, set the value of checkMode to contain. checkContent is in the format of ["k1","v1"], indicating that the process must contain the environment variable whose name is k1 and value is v1. If the value of checkType is scope, set the value of checkMode to equals. checkContent is in the format of ["hostId1","hostId2"], indicating that the rule takes effect only on specified nodes. If no nodes are specified, the rule applies to all nodes of the project. |
name_rule |
Yes |
NameRuleV1 object |
Naming rules for discovered services and applications. |
detect_log |
No |
String |
Whether to enable log collection. Value: true or false |
log_file_fix |
No |
Array of strings |
Log file suffix. Value: log, trace, or out |
priority |
Yes |
Integer |
Rule priority. Value: 1–9999 (default) |
is_detect |
Yes |
String |
Whether the scenario is a pre-check scenario. No rules will be saved in the pre-check scenario. This scenario is designed only to check whether a rule can detect node processes before it is delivered. true or false |
data_source |
No |
String |
Data source. |
editable |
No |
String |
Whether a rule can be modified. If editable is set to "false", the rule is a system rule and cannot be deleted. |
is_default_rule |
Yes |
String |
Whether the current rule is the default one. Value: true or false |
log_path_rule |
No |
Array of NameRuleContent objects |
Log path configuration rule.If cmdLineHash is a fixed string, a log path or log file is specified. Otherwise, only the files whose names end with .log and .trace are collected. If the value of nameType is cmdLineHash, args is in the format of ["00001"] and value is in the format of ["/xxx/xx.log"], indicating that the log path is /xxx/xx.log when the startup command is 00001. |
aom_metric_relabel_configs |
No |
Array of Map<String,String> objects |
Metric configuration. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
check_type |
Yes |
String |
Match type. Value: cmdLine, env, or scope |
check_mode |
Yes |
String |
Match condition. Value: contain or equals |
check_content |
Yes |
Array of strings |
Matched value. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
app_name_rule |
No |
Array of NameRuleContent objects |
Component naming rule. |
application_name_rule |
No |
Array of NameRuleContent objects |
Application naming rule. |
environment |
No |
Array of NameRuleContent objects |
Environment information. |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
id |
Array of strings |
Application discovery rule ID. |
Example Requests
Add or modify one or more application discovery rules.
PUT https://{Endpoint}/v1/{project_id}/aom/application-discovery-rules { "app_rules" : [ { "id" : "44d6c4bb-f673-4bf4-8d33-313832f37b28", "name" : "bytest", "create_time" : "", "project_id" : "5a6036f48e954fcd84d198cb28db311a", "enable" : true, "host_id" : [ ], "event_name" : "aom_inventory_rules_event", "spec" : { "detect_log" : "true", "log_file_fix" : [ "log", "trace" ], "discovery_rule" : [ { "check_type" : "cmdLine", "check_mode" : "contain", "check_content" : [ "default" ] }, { "check_type" : "scope", "check_mode" : "equals", "check_content" : [ "44d6c4bb-f673-4bf4-8d33-313832f37b28" ] } ], "attr_list" : [ "cmdLine" ], "is_detect" : "false", "priority" : 1, "name_rule" : { "app_name_rule" : [ { "name_type" : "cmdLineHash", "args" : [ "00000000001" ], "value" : [ "serviceName1" ] }, { "name_type" : "cmdLine", "args" : [ "/var/paas/kubernetes/", "/kubeconfig" ] }, { "name_type" : "env", "args" : [ "APP_NAME" ] }, { "name_type" : "str", "args" : [ "kube" ] } ], "application_name_rule" : [ { "name_type" : "cmdLineHash", "args" : [ "00000000001" ], "value" : [ "applicationName1" ] }, { "name_type" : "str", "args" : [ "kubeproxy" ] } ] }, "app_type" : "", "is_default_rule" : "false", "log_path_rule" : [ { "name_type" : "cmdLineHash", "args" : [ "00000000001" ], "value" : [ "/xx/xxx/xx.log", "/xx/xxx/xx" ] } ] } } ] }
Example Responses
None
Status Codes
Status Code |
Description |
---|---|
200 |
OK The request is successful. |
400 |
Bad Request The client should not repeat the request without modifications. |
401 |
Unauthorized The authentication information is incorrect or invalid. |
403 |
ForbiddenThe server has received the request and understood it, but the server is refusing to respond to it. The client should not repeat the request without modifications. |
500 |
Internal Server Error The server has received the request but could not understand it. |
503 |
Service Unavailable The client should not repeat the request without modifications. |
Error Codes
See Error Codes.
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