Updated on 2023-11-17 GMT+08:00

Discovering Applications

Overview

AOM can discover applications deployed on hosts and collects their metrics based on preset rules. The discovered applications and their metric data will be displayed on the Application Monitoring and O&M pages.

The relationship between applications and components is as follows:

  • Component refers to the smallest unit for completing a task. It can be a microservice, container process, or common process.
  • Application refers to a complete service module and consists 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).

Configuring Application Discovery Rules

  1. In the navigation pane, choose Configuration Management > Application Discovery.
  2. Click Add Custom Application Discovery Rule and configure an application discovery rule.
  3. 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 6. Then, click Next.

  4. 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 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.

  5. Set an application name and component name.

    Set an application 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.

      • 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.
      • 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, you can enter Java or Python to categorize applications by technology stack or enter collector or database to categorize applications 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.

  6. 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.

  7. Click Add to complete the configuration. AOM collects metrics of the process.
  8. After about two minutes, choose Monitoring > Component Monitoring in the navigation pane, select the target host from the cluster drop-down list, and find out the monitored component.

Viewing the Application Status

  1. In the navigation pane, choose Monitoring > Application Monitoring.
  2. Click an application to view its components and other resources.

    Figure 1 Viewing the application status

  3. Click the Component List tab and view the component information.

    Figure 2 Viewing components

  4. Click the Host List tab to view the host information.

    Figure 3 Viewing hosts

  5. Click the Alarm Analysis tab to view alarms.