Managing Applications
This section describes how to use AOM to manage applications on the Overview page, including application creation, discovery, and monitoring. The procedure is as follows:
- Adding an Application: Create an application and resource relationship tree on CMDB and install collectors on the hosts where the application is located.
- Setting an Alarm Rule: Create metric alarm rules to ensure that notifications are sent when applications become abnormal.
- Setting an Alarm Action Rule: Configure alarm action rules, for example, applications automatically restart when they become abnormal.
The Overview option is disabled by default. If you need this option, enable it on the Menu Settings page. For details, see Menu Settings.
Adding an Application
- Log in to the AOM 2.0 console.
- In the navigation pane, choose Overview.
- On the displayed page, switch to By Application.
Figure 1 Switching the perspective
- In the Getting Started area, click Add Application. The Application Management page is displayed.
- Add an application.
- Click Add Application in the upper right corner. On the displayed page, set parameters for adding an application.
Figure 2 Adding an application
Table 1 Parameters for adding an application Parameter
Description
Unique Identifier
Unique identifier of an application.
Enter 2 to 64 characters. Only letters, digits, underscores (_), hyphens (-), and periods (.) are allowed.
Application Name
Name of an application.
Enter 2 to 64 characters. Only letters, digits, underscores (_), hyphens (-), and periods (.) are allowed.
Enterprise Project
Huawei Cloud enterprise project. Select a project from the drop-down list.
If there is no project you want to select, click Create Project to create one.
Description
Description of the application. Enter up to 255 characters.
- Click OK.
- Click Add Application in the upper right corner. On the displayed page, set parameters for adding an application.
- Add nodes for the created application, including components and sub-applications. Use either of the following methods:
- After an application is created, click Add Node.
Figure 3 Adding a sub-application
- In the navigation pane, choose Application Management. Click next to the application in the tree on the left.
Figure 4 Application tree
- Configure node information, including the node type and name.
Figure 5 Adding a node
Table 2 Parameters for adding a node Category
Parameter
Description
Component parameters
Component Name
Name of a component.
Enter 2 to 64 characters. Only letters, digits, underscores (_), hyphens (-), and periods (.) are allowed.
Description
Description of the component. Enter up to 255 characters.
Sub-application parameters
Unique Identifier
Unique identifier of a sub-application.
Enter 2 to 64 characters. Only letters, digits, underscores (_), hyphens (-), and periods (.) are allowed.
Sub-application Name
Name of a sub-application.
Enter 2 to 64 characters. Only letters, digits, underscores (_), hyphens (-), and periods (.) are allowed.
Description
Description of the sub-application. Enter up to 255 characters.
- Up to three levels of sub-applications can be created under an application.
- Up to 50 sub-applications can be created under an application.
- Up to 50 components can be created under an application.
- Click OK.
- After an application is created, click Add Node.
- Add different environments for the component based on information such as hosts and regions for easier resource and application management.
- In the tree on the left, move the cursor to the name of the target component and click .
- On the Add Environment page, set information such as the environment type and host type.
Figure 6 Adding an environment
Table 3 Parameters for adding an environment Parameter
Description
Environment Type
Type of an environment. Options: Development, Test, Pre-release, and Production.
OS Type
OS type of a host. Options: Linux and Windows.
Environment Name
Name of an environment.
Enter 2 to 64 characters. Only letters, digits, underscores (_), hyphens (-), and periods (.) are allowed.
Region
Region where the environment is located. Select a value from the drop-down list.
Description
Description of the environment. Enter up to 255 characters.
A maximum of 20 environments can be created under a component.
- Click OK.
After creating an environment for a component, you can bind resources to this environment. Then, you can monitor the resource usage in real time through application monitoring.
- Select the required resource on the right and bind it to the application.
- In the tree on the left, select a target environment, click a resource tab in the right pane, and click Bind Resource in the lower pane.
- Select your target resource from the resource list.
The resource list displays only the resources under the enterprise project that you have selected.
Figure 7 Binding resources
- Click Bind.
In the case of an ECS, click Bind Resource & Install Agent to bind the ECS and install an Agent.
Setting an Alarm Rule
Metric alarm rules can be created using the following modes: Select from all metrics, and PromQL.
The following uses Select from all metrics as an example.
- On the Overview page, switch to By Application.
- In the Getting Started area, click Set Alarm Rule. The Alarm Rules page is displayed.
- Click Create Alarm Rule.
- Set basic information about the alarm rule by referring to Table 4.
Table 4 Basic information Parameter
Description
Rule Name
Name of a rule. Enter a maximum of 256 characters and do not start or end with any special character. Only letters, digits, underscores (_), and hyphens (-) are allowed.
Enterprise Project
Enterprise project.
- If you have selected All for Enterprise Project on the global settings page, select one from the drop-down list here.
- If you have already selected an enterprise project on the global settings page, this option will be dimmed and cannot be changed.
Description
Description of the rule. Enter up to 1024 characters.
- Set the detailed information about the alarm rule.
- Set Rule Type to Metric alarm rule.
- Set Configuration Mode to Select from all metrics.
- Select a target Prometheus instance from the drop-down list.
- Set alarm rule details. Table 5 describes the parameters.
After the setting is complete, the monitored metric data is displayed in a line graph above the alarm condition. A maximum of 50 metric data records can be displayed. Click the line icon before each metric data record to hide the metric data in the graph. You can click Add Metric to add metrics and set the statistical period and detection rules for the metrics.
After moving the cursor to the metric data and the corresponding alarm condition, you can perform the following operations as required:
- Click next to an alarm condition to hide the corresponding metric data record in the graph.
- Click next to an alarm condition to convert the metric data and alarm condition into a Prometheus command.
- Click next to an alarm condition to quickly copy the metric data and alarm condition and modify them as required.
- Click next to an alarm condition to remove a metric data record from monitoring.
Figure 8 Setting alarm rule details
Table 5 Alarm rule details Parameter
Description
Multiple Metrics
Calculation is performed based on the preset alarm conditions one by one. An alarm is triggered when one of the conditions is met.
For example, if three alarm conditions are set, the system performs calculation respectively. If any of the conditions is met, an alarm will be triggered.
Combined Operations
The system performs calculation based on the expression you set. If the condition is met, an alarm will be triggered.
For example, if there is no metric showing the CPU core usage of a host, do as follows:
- Set the metric of alarm condition "a" to aom_node_cpu_used_core and retain the default values for other parameters. This metric is used to count the number of CPU cores used by a measured object.
- Set the metric of alarm condition "b" to aom_node_cpu_limit_core and retain the default values for other parameters. This metric is used to count the total number of CPU cores that have been applied for a measured object.
- If the expression is set to "a/b", the CPU core usage of the host can be obtained.
- Set Rule to Max > 0.2.
- In the trigger condition, set Consecutive Periods to 3.
- Set Alarm Severity to Critical.
If the maximum CPU core usage of a host is greater than 0.2 for three consecutive periods, a critical alarm will be generated.
Metric
Metric to be monitored. When Select from all metrics is selected, enter keywords to search for metrics.
Click the Metric text box. In the resource tree on the right, you can also select a target metric by resource type.
Statistical Period
Metric data is aggregated based on the configured statistical period, which can be 15 seconds, 30 seconds, 1 minute, 5 minutes, 15 minutes, or 1 hour.
Condition
Metric monitoring scope. If this parameter is left blank, all resources are covered.
Each condition is in a key-value pair. You can select a dimension name from the drop-down list. The dimension value varies according to the matching mode.
- =: Select a dimension value from the drop-down list. For example, if Dimension Name is set to Host name and Dimension Value is set to 192.168.16.4, only host 192.168.16.4 will be monitored.
- !=: Select a dimension value from the drop-down list. For example, if Dimension Name is set to Host name and Dimension Value is set to 192.168.16.4, all hosts excluding host 192.168.16.4 will be monitored.
- =~: The dimension value is determined based on one or more regular expressions. Separate regular expressions by vertical bar (|). For example, if Dimension Name is set to Host name and Regular Expression is set to 192.*|172.*, only hosts whose names are 192.* and 172.* will be monitored.
- !~: The dimension value is determined based on one or more regular expressions. Separate regular expressions by vertical bar (|). For example, if Dimension Name is set to Host name and Regular Expression is set to 192.*|172.*, all hosts excluding hosts 192.* and 172.* will be monitored.
For details about how to enter a regular expression, see Regular Expression Examples.
You can also click and select AND or OR to add more conditions for the metric.
Grouping Condition
Aggregate metric data by the specified field and calculate the aggregation result. Options: Not grouped, avg by, max by, min by, and sum by. For example, avg by clusterName indicates that metrics are grouped by cluster name, and the average value of the grouped metrics is calculated and displayed in the graph.
Rule
Detection rule of a metric alarm, which consists of the statistical mode (Avg, Min, Max, Sum, and Samples), determination criterion (≥, ≤, >, and <), and threshold value. For example, if the detection rule is set to Avg >10, a metric alarm will be generated if the average metric value is greater than 10.
Trigger Condition
When the metric value meets the alarm condition for a specified number of consecutive periods, a metric alarm will be generated. Range: 1 to 30.
For example, if Consecutive Periods is set to 2, a metric alarm will be triggered if the trigger condition is met for two consecutive periods.
Alarm Severity
Metric alarm severity. Options:
- : critical alarm.
- : major alarm.
- : minor alarm.
- : warning.
- Click Advanced Settings and set information such as Check Interval and Alarm Clearance. For details about the parameters, see Table 6.
Table 6 Advanced settings Parameter
Description
Check Interval
Interval at which metric query and analysis results are checked.
- Hourly: Query and analysis results are checked every hour.
- Daily: Query and analysis results are checked at a fixed time every day.
- Weekly: Query and analysis results are checked at a fixed time point on a specified day of a week.
- Custom interval: The query and analysis results are checked at a fixed interval.
NOTE:
You can set Check Interval to 15 seconds or 30 seconds to implement second-level monitoring. The timeliness of metric alarms depends on the metric reporting period, rule check interval, and notification send time.
For example, if the metric reporting period is 5 seconds, rule check interval is 30 seconds, and notification send time is 1 second, an alarm can be detected and an alarm notification can be sent within 36 seconds.
- Cron: A cron expression is used to specify a time interval. Query and analysis results are checked at the specified interval.
The time specified in the cron expression can be accurate to the minute and must be in the 24-hour notation. Example: 0/5 * * * *, which indicates that the check starts from 0th minute and is performed every 5 minutes.
Alarm Clearance
The alarm will be cleared when the alarm condition is not met for a specified number of consecutive periods. By default, metrics in only one period are monitored. You can set up to 30 consecutive monitoring periods.
For example, if Consecutive Periods is set to 2, the alarm will be cleared when the alarm condition is not met for two consecutive periods.
Action Taken for Insufficient Data
Action to be taken when no metric data is generated or metric data is insufficient within the monitoring period. You can set this option based on your requirements.
By default, metrics in only one period are monitored. You can set up to five consecutive monitoring periods.
The system supports the following actions: changing the status to Exceeded and sending an alarm, changing the status to Insufficient data and sending an event, maintaining Previous status, and changing the status to Normal and sending an alarm clearance notification.
Alarm Tag
Click to add an alarm tag. Alarm identification attribute. It is used in alarm noise reduction scenarios. It is in the format of "key:value".
For details, see Alarm Tags and Annotations.
NOTE:If tag policies related to AOM have already been set, add alarm tags based on these policies. If a tag does not comply with the policies, tag addition may fail. Contact your organization administrator to learn more about tag policies.
Alarm Annotation
Click to add an alarm annotation. Alarm non-identification attribute. It is used in alarm notification and message template scenarios. It is in the format of "key:value".
For details, see Alarm Tags and Annotations.
- Set an alarm notification policy. For details, see Table 7.
Figure 9 Setting an alarm notification policy
Table 7 Parameters for setting an alarm notification policy Parameter
Description
Notify When
Set the scenario for sending alarm notifications.
- Alarm triggered: If the alarm trigger condition is met, the system sends an alarm notification to the specified personnel by email or SMS.
- Alarm cleared: If the alarm clearance condition is met, the system sends an alarm notification to the specified personnel by email or SMS.
Alarm Mode
- Direct alarm reporting: An alarm is directly sent when the alarm condition is met. If you select this mode, set an interval for notification and specify whether to enable an action rule.
Frequency: frequency for sending alarm notifications. Select a desire value from the drop-down list.
If you enable this function, the system sends notifications based on the associated SMN topic and message template. If the existing alarm action rules cannot meet your requirements, click Create Rule in the drop-down list to create one. For details about how to set alarm action rules, see Setting an Alarm Action Rule.
- Alarm noise reduction: Alarms are sent only after being processed based on noise reduction rules, preventing alarm storms.
If you select this mode, the silence rule is enabled by default. You can determine whether to enable Grouping Rule as required. If you enable this function, select a grouping rule from the drop-down list. If the existing grouping rules cannot meet your requirements, click Create Rule in the drop-down list to create one. For details, see Creating a Grouping Rule.
- Click Confirm. Then click View Rule to view the created alarm rule.
In the expanded list, if a metric value meets the configured alarm condition, a metric alarm is generated on the alarm page. To view it, choose Alarm Management > Alarm List in the navigation pane. If a metric value meets the preset notification policy, the system sends an alarm notification to the specified personnel by email or SMS.
Figure 10 Created metric alarm rule
Setting an Alarm Action Rule
- On the Overview page, switch to By Application.
- In the Getting Started area, click Set Alarm Action Rule. The Alarm Action Rules page is displayed.
- On the Action Rules tab page, click Create.
- Set parameters such as Rule Name and Action Type by referring to Table 8.
Figure 11 Creating an alarm action rule
- Click OK.
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