이 콘텐츠는 선택한 언어로 제공되지 않습니다.
Chapter 13. Red Hat Process Automation Manager Kogito Operator interaction with Prometheus and Grafana
Red Hat build of Kogito in Red Hat Decision Manager provides a monitoring-prometheus-addon add-on that enables Prometheus metrics monitoring for Red Hat build of Kogito microservices and generates Grafana dashboards that consume the default metrics exported by the add-on. The RHPAM Kogito Operator uses the Prometheus Operator to expose the metrics from your project for Prometheus to scrape. Due to this dependency, the Prometheus Operator must be installed in the same namespace as your project.
If you want to enable the Prometheus metrics monitoring for your Red Hat build of Kogito microservices, add the following dependency to the pom.xml file in your project, depending on the framework you are using:
Dependency for Prometheus Red Hat build of Quarkus add-on
<dependency>
<groupId>org.kie.kogito</groupId>
<artifactId>monitoring-prometheus-quarkus-addon</artifactId>
</dependency>
<dependency>
<groupId>org.kie.kogito</groupId>
<artifactId>monitoring-prometheus-quarkus-addon</artifactId>
</dependency>
Dependency for Prometheus Spring Boot add-on
<dependency>
<groupId>org.kie.kogito</groupId>
<artifactId>monitoring-prometheus-springboot-addon</artifactId>
</dependency>
<dependency>
<groupId>org.kie.kogito</groupId>
<artifactId>monitoring-prometheus-springboot-addon</artifactId>
</dependency>
When you deploy a Red Hat build of Kogito microservice that uses the monitoring-prometheus-addon add-on and the Prometheus Operator is installed, the Red Hat Process Automation Manager Kogito Operator creates a ServiceMonitor custom resource to expose the metrics for Prometheus, as shown in the following example:
Example ServiceMonitor resource for Prometheus
You must manually configure your Prometheus custom resource that is managed by the Prometheus Operator to select the ServiceMonitor resource:
Example Prometheus resource
After you configure your Prometheus resource with the ServiceMonitor resource, you can see the endpoint scraped by Prometheus in the Targets page in the Prometheus web console. The metrics exposed by the Red Hat Decision Manager service appear in the Graph view.
The RHPAM Kogito Operator also creates a GrafanaDashboard custom resource defined by the Grafana Operator for each of the Grafana dashboards generated by the add-on. The app label for the dashboards is the name of the deployed Red Hat build of Kogito microservice. You must set the dashboardLabelSelector property of the Grafana custom resource according to the relevant Red Hat build of Kogito microservice.
Example Grafana resource