API Monitoring

Only some limited information is available through the existing monitoring systems. However with API monitoring, you can access more information.

Through the API monitoring system, you can access service level metrics, such as throughput, error and success rate, and response time for each API. You can also view the resource level metrics such as memory usage and CPU consumption.

You can use any of the following types of API monitoring tools:

Note: For more information about these monitoring tools, you can visit the documentation pages of the respective tool.

JMX MBeans

Before you beginInstall visualVM tool and MBeans plug-in on your machine.

Procedure

1. Set the following config values in the ConfigValues_Common.json file:

Property Name

Value

Description

monitoringSystem JMX

The monitoring system to view the application metrics.

(Default: Null)

Set the value (such as JMX, prometheus, elastic, Dynatrace) as per the required tool. You can also set multiple values here by comma separating them.

2. Open the MBeans tab in the VisualVM tool to view the metrics.
3. For the remote connection, you can add the following values in the start.sh script of OPE services:
- Dcom.sun.management.jmxremote=true

- Dcom.sun.management.jmxremote.port=port_no

- Dcom.sun.management.jmxremote.authenticate=false

- Dcom.sun.management.jmxremote.ssl=false

- Djava.rmi.server.hostname=<hostname> or <host_ip>

- Dcom.sun.management.jmxremote.rmi.port=port_no

Prometheus

Procedure

1. Set the following config values in the ConfigValues_Common.json file.

Property Name

Value

Description

monitoringSystem prometheus

The monitoring system to view the application metrics.

(Default: Null)

Set the value (such as JMX, prometheus, elastic, Dynatrace) as per the required tool. You can also set multiple values here by comma separating them.

2. Open the OPE management prometheus http://<host>:<port>/management/prometheus endpoint to view the metrics. You can also install the Prometheus application to view the prometheus metrics in a graphical representation.

Elasticsearch

Before you beginInstall the Kibana tool on your machine.

Procedure

1. Set the following config values in the ConfigValues_Common.json file.

Property Name

Value

Description

monitoringSystem elastic

The monitoring system to view the application metrics.

(Default: Null)

Set the value (such as JMX, prometheus, elastic, Dynatrace) as per the required tool. You can also set multiple values here by comma separating them.

management.metrics.export.elastic.enabled true Determines whether to enable the Elastic metrics or not
management.metrics.export.elastic.host http://localhost:9200 Elastic search Url
management.metrics.export.elastic.index micrometer-metrics Management Metrics Elastic Index
management.metrics.export.elastic.step 1m Time interval for sending metrics
management.metrics.export.elastic.userName client's ElasticSearch Username (Default ="NULL") ElasticSearch Username
management.metrics.export.elastic.password client's ElasticSearch Password (Default ="NULL") Encrypted ElasticSearch Password
2. Open the Kibana tool to view the metrics.

Dynatrace

Before you beginInstall Dynatrace tool on your machine.

Procedure

1. Set the following config values in the ConfigValues_Common.json file.

Property Name

Value

Description

monitoringSystem Dynatrace

The monitoring system to view the application metrics.

(Default: Null)

Set the value (such as JMX, prometheus, elastic, Dynatrace) as per the required tool. You can also set multiple values here by comma separating them.

management.metrics.export.dynatrace.uri The host on which the Dynatrace tool is installed The host on which the Dynatrace tool is installed
management.metrics.export.dynatrace.api-token Access token generated from the Dynatrace tool Access token generated from the Dynatrace tool
management.metrics.export.dynatrace.device-id The Id of the device on which the Dynatrace tool is installed The Id of the device on which the Dynatrace tool is installed
management.metrics.export.dynatrace.step 1m Time interval for sending metrics
management.metrics.export.dynatrace.enabled true

Determines whether to enable the dynatrace metrics or not.

(Default: false)

2. Add "metrics" as value for Dynatrace in the management.endpoints.web.exposure.include property value in the ConfigValues_Common.json file.
3. Open the Dynatrace tool to view the metrics.