Help Center> ServiceStage> User Guide (ME-Abu Dhabi Region)> User Guide> Application O&M> Configuring Custom Monitoring of an Application Component
Updated on 2023-06-25 GMT+08:00

Configuring Custom Monitoring of an Application Component

ServiceStage allows you to obtain monitoring data based on custom metrics.

You can configure custom metric monitoring during or after application component deployment.

Precautions

  • Currently, only Gauge metrics of Prometheus can be obtained.
  • Before setting custom metric monitoring for an application component, you must understand Prometheus and provide the GET API for obtaining custom metric data in your application component so that ServiceStage can obtain custom metric data using this API.

Procedure

When the component type is Common and the runtime system is Docker, perform the following operations:

  1. Access the page for setting custom metric monitoring for an application component.

    • To set custom metric monitoring during component configuration in the application component deployment, go to 2.
    • To set custom metric monitoring after an application component is deployed, go to 3.

  2. On the Configure Component page:

    1. Specify the following parameters to set custom metric monitoring for the application component.

      Parameter

      Description

      Mandatory

      Report Path

      URL provided by the exporter for ServiceStage to obtain custom metric data.

      Example: /metrics

      Yes

      Report Port

      Port provided by the exporter for ServiceStage to obtain custom metric data.

      Example: 8080

      Yes

      Monitoring Metrics

      Name of the custom metric provided by the exporter.

      Example: ["cpu_usage","mem_usage"]

      • If this parameter is not set, ServiceStage collects data of all custom metrics.
      • If you set this parameter, for example, to ["cpu_usage","mem_usage"], ServiceStage collects the data of the specified cpu_usage and mem_usage metrics.

      No

    2. Click Next to complete the component deployment.

  3. Log in to ServiceStage and choose Application Management > Application List to view all applications.
  4. Click an application. The Overview page is displayed.
  5. On the Environment View tab, select an environment to view the application components that have been deployed in the environment.
  6. Click an application component. The Overview page is displayed.
  7. Choose O&M Configurations and set the following parameters.

    Parameter

    Description

    Mandatory

    Report Path

    URL provided by the exporter for ServiceStage to obtain custom metric data.

    Example: /metrics

    Yes

    Report Port

    Port provided by the exporter for ServiceStage to obtain custom metric data.

    Example: 8080

    Yes

    Monitoring Metrics

    Name of the custom metric provided by the exporter.

    Example: ["cpu_usage","mem_usage"]

    • If this parameter is not set, ServiceStage collects data of all custom metrics.
    • If you set this parameter, for example, to ["cpu_usage","mem_usage"], ServiceStage collects the data of the specified cpu_usage and mem_usage metrics.

    No

  8. Click Re-deployment to complete the setting.

    After the configuration and deployment are complete, you can view the monitoring metric data on the AOM console. For details, see Metric Monitoring.

For other types of components, perform the following operations:

  1. Access the page for setting custom metric monitoring for an application component.

    • To set custom metric monitoring during component configuration in the application component deployment, go to 6.
    • To set custom metric monitoring after an application component is deployed, go to 2.

  2. Log in to ServiceStage and choose Application Management > Application List to view all applications.
  3. Click an application. The Overview page is displayed.
  4. On the Environment View tab, select an environment to view the application components that have been deployed in the environment.
  5. Click an application component. The Overview page is displayed. Choose Upgrade.
  6. Choose Advanced Settings > O&M Monitoring. On the O&M Policy tab, set the following parameters.

    Parameter

    Description

    Mandatory

    Report Path

    URL provided by the exporter for ServiceStage to obtain custom metric data.

    Example: /metrics

    Yes

    Report Port

    Port provided by the exporter for ServiceStage to obtain custom metric data.

    Example: 8080

    Yes

    Monitoring Metrics

    Name of the custom metric provided by the exporter.

    Example: ["cpu_usage","mem_usage"]

    • If this parameter is not set, ServiceStage collects data of all custom metrics.
    • If you set this parameter, for example, to ["cpu_usage","mem_usage"], ServiceStage collects the data of the specified cpu_usage and mem_usage metrics.

    No

  7. Complete the setting of the custom metric monitoring.

    • If the custom metric monitoring policy is set during component configuration, and click Next.
    • If the custom metric monitoring policy is set after the application component is deployed, and click Re-deployment.

    After the configuration and deployment are complete, you can view the monitoring metric data on the AOM console. For details, see Metric Monitoring.