Help Center/ ServiceStage/ Best Practices/ Connecting Microservice Engine Dashboard Data to AOM through ServiceStage
Updated on 2023-11-09 GMT+08:00

Connecting Microservice Engine Dashboard Data to AOM through ServiceStage

Background

The real-time monitoring data of a Java chassis application deployed on the microservice engine dashboard is retained for 5 minutes by default. To permanently store historical monitoring data for subsequent query and analysis, use the custom metric monitoring function of ServiceStage to connect the microservice data displayed on the microservice engine dashboard to AOM.

This section uses the application deployed using a software package as an example to describe how to complete the connection.

Procedure

  1. Add dependency.

    In the development environment, open the application project that requires persistent storage of historical monitoring data and add the following dependency to the pom file of the microservice:

    <dependency>
        <groupId>org.apache.servicecomb</groupId>
        <artifactId>metrics-core</artifactId>
    </dependency>
    <dependency>
        <groupId>org.apache.servicecomb</groupId>
        <artifactId>metrics-prometheus</artifactId>
    </dependency>

  2. Recompile and package the application project to which the dependency has been added, and upload the package.

  3. Deploy the application component.

    • To deploy a new component, go to 4.
    • If the component has been deployed, go to 5.

  4. Deploy the component that is packaged and uploaded in 2. For details, see Creating and Deploying Components.

    1. During component deployment, choose Advanced Settings > O&M Monitoring > O&M Policy and configure the following parameters:

      Parameter

      Value

      Report Path

      /metrics

      Report Port

      9696

      Figure 1 Setting custom monitoring
    2. After the component is successfully deployed, go to 6.

  5. Connect monitoring metrics to AOM.

    1. Log in to ServiceStage.
    2. Choose Application Management.
    3. Click the application where the component is located. The Overview page of the application is displayed.
    4. In the Component List area, click the target component. The component overview page is displayed.
    5. Click Deploy.
    6. Select Single-batch Release and click Next.
    7. Choose Advanced Settings > O&M Monitoring > O&M Policy and configure the following parameters:

    Parameter

    Value

    Report Path

    /metrics

    Report Port

    9696

    Figure 2 Monitoring metrics

    h. Click Deploy and wait until the component is redeployed successfully.

  6. On the AOM console, view monitoring metrics and export monitoring data. For details, see Metric Monitoring.