Help Center> ServiceStage> User Guide> Application O&M> Custom Metric Monitoring

Custom Metric Monitoring

ServiceStage allows you to obtain custom metrics.

Precautions

  • Currently, only Gauge metrics of Prometheus can be obtained.
  • Before setting custom monitoring for an application component, you need to 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.

Setting Custom Metric Monitoring

During or after application component deployment, you can go to the application details page, choose Upgrade and customize metrics.

When deploying an application component, expand Advanced Configuration > O&M Monitoring and set the following parameters on the O&M Policy tab page:

Table 1 Parameter description

Parameter

Description

Mandatory or Not

Report Path

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

The path must start with a slash (/). Only letters, digits, slashes (/), and underscores (_) are allowed. For example, /metrics.

Yes

Reported Port

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

The value is an integer ranging from 1 to 65535. For example, 8080.

Yes

Monitoring Metrics

Custom metric names provided by the exporter.

The value is a string of 5 to 100 characters. Only letters, digits, and underscores (_) are allowed. It is in the format of ["Custom metric name 1","Custom metric name 2"]. Multiple metrics are separated by commas (,), for 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

Viewing Custom Metrics

After the configuration and deployment are complete, you can view metrics on Application Operations Management (AOM).

  1. Log in to AOM and choose View Management > Metric Monitoring.

  2. In the Select Metrics area, select the desired metric to view its data.

    In addition to service metrics, you can also view instance metrics.