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. API monitoring is implemented for Catalog service, AOPD, Orchestrator, Data service, and Jeopardy.
You can use any of the following types of API monitoring tools:
JMX MBeans
Install visualVM tool and MBeans plug-in on your machine.
- Procedure
- 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.
- Open the MBeans tab in the VisualVM tool to view the metrics.
- For the remote connection, you can add the following values in the
start.sh
script of OM 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
- 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.
- Add prometheus in the
management.endpoints.web.exposure.include
property value in theConfigValues_Common.json
file. - Open the OM 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
Install the Kibana tool on your machine.
- Procedure
- 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 User name (Default = "NULL") ElasticSearch User name management.metrics.export.elastic.password client's ElasticSearch Password (Default = "NULL") Encrypted ElasticSearch Password
management.endpoints.jmx.exposure.include * Specifies the resource metric endpoints to expose, such as health and loggers.
management.endpoint.loggers.enabled true Specifies whether to enable the loggers endpoint. This is a Boolean property; it can be either true or false. management.endpoints.jolokia.enabled true Specifies whether to enable the Jolokia endpoint. This is a Boolean property; it can be either true or false. - Open the Kibana tool to view the metrics.
Dynatrace
Install the Dynatrace tool on your machine.
- Procedure
- 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)
- Add "dynatrace" as value for Dynatrace in the
management.endpoints.web.exposure.include
property value in theConfigValues_Common.json
file. - Open the Dynatrace tool to view the metrics.