Updated on 2024-04-15 GMT+08:00

Discovering Applications

Application Discovery Overview

AOM can discover applications and collect their metrics based on configured rules. You can view the discovered applications on the Application Monitoring page and their metrics on the O&M page.

The relationship between applications and components is as follows:

  • Component: the smallest unit for completing a task. It can be a microservice, container process, or common process.
  • Application: a complete service module consisting of multiple components.

After application discovery is configured, you can use AOM to monitor application metrics and associate related alarms. Mainly, AOM can:

  1. Provide association relationships between applications and components, between components and component instances, and between applications and hosts.
  2. Enable you to search for associated components and logs.
  3. Aggregate component metrics (so that you can obtain aggregated results of all component instances).

Procedure

  1. On the menu bar, choose Monitoring Center.
  2. In the navigation pane, choose Configuration Management > Application Discovery.
  3. 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, ruletest.
    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.
      • To precisely detect processes, you are advised to add check items about unique features of the processes.
      • You need to add one check item at least and can add five check items at most. 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 10s, modify the application discovery rule and detect processes again. Go to the next step only when at least one process is detected.

  6. Set a component name.

    1. Set an application name.
      In the Application Name Settings area, click Add Naming Rule to set an application name for the discovered process.
      • If you do not set an application name, unknownapplicationname is used by default.
      • When you add multiple naming rules, all the naming rules are combined as the application name of the process. Metrics with the same application name are aggregated.
    2. Set a component name.
      In the Component Name Settings area, click Add Naming Rule to set a component name for the discovered process.
      • The component name cannot be left blank.
      • When you add multiple naming rules, all the naming rules are combined as the component name of the process. Metrics with the same component name are aggregated.
    3. Preview the component name.

      If the application or component name does not meet your requirements, locate the name in the Preview Component Name table and rename it.

  7. Set a priority and detection range.

    1. Set a priority: When there are multiple rules, set priorities. Enter 1 to 9999. The default value is 9999. The smaller value, the higher priority. For example, 1 indicates the highest priority and 9999 indicates the lowest priority.

      Do not use multiple custom discovery rules with the same priority for the same process.

    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 those added later.

  8. Click Add to complete the configuration. AOM collects metrics of the process.
  9. Wait for about two minutes, choose Infrastructure Monitoring > Component Monitoring in the navigation pane, select the target host (for example, host-test) from the cluster drop-down list, and find the target component (for example, /openvswitch/) that has been monitored.
  10. View the application status.

    1. In the navigation pane, choose Infrastructure Monitoring > Application Monitoring.
    2. Click an application to view its components and other resources.
    3. Click the Component List tab and view the component information.
    4. Click the Host List tab to view the host information.
    5. Click the Alarms tab to view alarms.