Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 33 additions & 13 deletions .secrets.baseline
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"files": "^.secrets.baseline$",
"lines": null
},
"generated_at": "2025-05-22T15:33:26Z",
"generated_at": "2025-06-02T07:42:51Z",
"plugins_used": [
{
"name": "AWSKeyDetector"
Expand Down Expand Up @@ -202,23 +202,23 @@
"hashed_secret": "5a2ea68e9ea943ea31948fe51388c798e13346a9",
"is_secret": false,
"is_verified": false,
"line_number": 393,
"line_number": 395,
"type": "Secret Keyword",
"verified_result": null
},
{
"hashed_secret": "fa9beb99e4029ad5a6615399e7bbae21356086b3",
"is_secret": false,
"is_verified": false,
"line_number": 624,
"line_number": 625,
"type": "Secret Keyword",
"verified_result": null
},
{
"hashed_secret": "12d3a2730ae9976303db72d424b3771221f90852",
"is_secret": false,
"is_verified": false,
"line_number": 673,
"line_number": 674,
"type": "Secret Keyword",
"verified_result": null
}
Expand Down Expand Up @@ -274,7 +274,7 @@
"hashed_secret": "fa9beb99e4029ad5a6615399e7bbae21356086b3",
"is_secret": false,
"is_verified": false,
"line_number": 600,
"line_number": 587,
"type": "Secret Keyword",
"verified_result": null
}
Expand All @@ -284,15 +284,15 @@
"hashed_secret": "d033e22ae348aeb5660fc2140aec35850c4da997",
"is_secret": false,
"is_verified": false,
"line_number": 113,
"line_number": 115,
"type": "Secret Keyword",
"verified_result": null
},
{
"hashed_secret": "c94cfbe098fb5c2eedde2bb22c78fe2cd7e9a0e8",
"is_secret": false,
"is_verified": false,
"line_number": 171,
"line_number": 173,
"type": "Secret Keyword",
"verified_result": null
}
Expand Down Expand Up @@ -404,15 +404,15 @@
"hashed_secret": "fa9beb99e4029ad5a6615399e7bbae21356086b3",
"is_secret": false,
"is_verified": false,
"line_number": 421,
"line_number": 406,
"type": "Secret Keyword",
"verified_result": null
},
{
"hashed_secret": "076a042dcb8e3b7be55cbbe95e1f18f577ef1ba5",
"is_secret": false,
"is_verified": false,
"line_number": 467,
"line_number": 452,
"type": "Secret Keyword",
"verified_result": null
}
Expand Down Expand Up @@ -753,12 +753,22 @@
"line_number": 36,
"type": "Secret Keyword",
"verified_result": null
}
],
"contrib/monitor/mpmetrics/monitor-values.yaml": [
{
"hashed_secret": "082b34549c67487c03a3ecf6f8411a5a7800e55f",
"is_secret": false,
"is_verified": false,
"line_number": 6,
"type": "Secret Keyword",
"verified_result": null
},
{
"hashed_secret": "fd1daf2e350a06b865f4a1e17bb39183b806c1e9",
"is_secret": false,
"is_verified": false,
"line_number": 85,
"line_number": 15,
"type": "Secret Keyword",
"verified_result": null
}
Expand All @@ -768,15 +778,25 @@
"hashed_secret": "b11974a9da0d56698df935ab86e19b127804d6d4",
"is_secret": false,
"is_verified": false,
"line_number": 67,
"line_number": 78,
"type": "Secret Keyword",
"verified_result": null
}
],
"contrib/monitor/opentelemetry/otel-values.yaml": [
{
"hashed_secret": "082b34549c67487c03a3ecf6f8411a5a7800e55f",
"is_secret": false,
"is_verified": false,
"line_number": 10,
"type": "Secret Keyword",
"verified_result": null
},
{
"hashed_secret": "fd1daf2e350a06b865f4a1e17bb39183b806c1e9",
"is_secret": false,
"is_verified": false,
"line_number": 131,
"line_number": 19,
"type": "Secret Keyword",
"verified_result": null
}
Expand Down Expand Up @@ -1022,7 +1042,7 @@
"hashed_secret": "09ccd3b51d7491b00e3177f614b668cf14dd9ce0",
"is_secret": false,
"is_verified": false,
"line_number": 35,
"line_number": 34,
"type": "Secret Keyword",
"verified_result": null
}
Expand Down
41 changes: 24 additions & 17 deletions contrib/monitor/mpmetrics/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ The MicroProfile mpMetrics Liberty feature provides a /metrics endpoint from whi
2. Create a pull secret by running a `kubectl create secret` command.

```
$ kubectl create secret docker-registry icregistry-secret \
kubectl create secret docker-registry icregistry-secret \
--docker-server=cp.icr.io \
--docker-username=cp \
--docker-password="<API_KEY_GENERATED>" \
Expand Down Expand Up @@ -70,7 +70,7 @@ Create the monitor-secret
```shell
helm search repo ibm-odm-prod
NAME CHART VERSION APP VERSION DESCRIPTION
ibm-helm/ibm-odm-prod 24.1.0 9.0.0.1 IBM Operational Decision Manager
ibm-helm/ibm-odm-prod 25.0.0 9.5.0.0 IBM Operational Decision Manager
```

### 3. Run the `helm install` command
Expand All @@ -80,17 +80,24 @@ You can now install the product. We will use the PostgreSQL internal database an
See the [Preparing to install](https://www.ibm.com/docs/en/odm/9.5.0?topic=production-preparing-install-operational-decision-manager) documentation for more information.

```shell
helm install my-odm-release ibm-helm/ibm-odm-prod \
--set image.repository=cp.icr.io/cp/cp4a/odm --set image.pullSecrets=icregistry-secret \
--set license=true --set usersPassword=odmAdmin \
--set internalDatabase.persistence.enabled=false \
--set customization.monitorRef=monitor-secret \
--set internalDatabase.runAsUser='' --set customization.runAsUser='' --set service.enableRoute=true
helm install my-odm-release ibm-helm/ibm-odm-prod -f monitor-values.yaml
```

> [!NOTE]
> **customization.monitorRef** is installing /metrics endpoint on all components.
> If you would like to install /metrics on a specific component, you can replace usage of **customization.monitorRef** by **decisionCenter.monitorRef** , **decisionServerConsole.monitorRef** , **decisionRunner.monitorRef** or **decisionServerRuntime.monitorRef**
> This command installs the **latest available version** of the chart.
> If you want to install a **specific version**, add the `--version` option:
>
> ```bash
> helm install my-odm-release ibm-helm/ibm-odm-prod --version <version> -f monitor-values.yaml
> ```
>
> You can list all available versions using:
>
> ```bash
> helm search repo ibm-helm/ibm-odm-prod -l
> ```

### 4. Check the /metrics endpoints

Expand Down Expand Up @@ -122,14 +129,14 @@ curl -k https://<DS_RUNTIME_HOST>/metrics
You should get a view of all Liberty metrics that will be accessible in Prometheus:

```
# TYPE base_gc_total counter
# HELP base_gc_total Displays the total number of collections that have occurred. This attribute lists -1 if the collection count is undefined for this collector.
base_gc_total{name="global"} 30
base_gc_total{name="scavenge"} 157
# HELP gc_total Displays the total number of collections that have occurred. This attribute lists -1 if the collection count is undefined for this collector.
# TYPE gc_total counter
gc_total{mp_scope="base",name="global",} 377.0
gc_total{mp_scope="base",name="scavenge",} 312.0
...
# TYPE vendor_connectionpool_waitTime_total_seconds gauge
# HELP vendor_connectionpool_waitTime_total_seconds The total wait time on all connection requests since the start of the server.
vendor_connectionpool_waitTime_total_seconds{datasource="jdbc_ilogDataSource"} 0.0
# HELP connectionpool_waitTime_total_seconds The total wait time on all connection requests since the start of the server.
# TYPE connectionpool_waitTime_total_seconds gauge
connectionpool_waitTime_total_seconds{datasource="jdbc_ilogDataSource",mp_scope="vendor",} 0.0
```

## Expose metrics in OCP
Expand Down Expand Up @@ -159,11 +166,11 @@ You should see the 4 ODM metrics endpoints
Drill at Observe > metrics.

You can now use any kind of available metrics using a query.
For example put **base_gc_total** in the **Expression** field and click on the **Run queries** button.
For example put **gc_total** in the **Expression** field and click on the **Run queries** button.

![Queries](./images/queries.png)

If you are interested in servlet requests managed by the runtime, you can use the query **vendor_servlet_request_total{servlet="DecisionService_RESTDecisionService"}**
If you are interested in servlet requests managed by the runtime, you can use the query **servlet_request_total{mp_scope="vendor",servlet="DecisionService_RESTDecisionService"}**
For example, by monitoring this metrics, you can check the behaviour of the load balancer is correct if all Decision Server Runtime replicas are receiving almost the same number of requests like in the following screenshot.

![Runtime Servlet Request](./images/RuntimeRequest.png)
Expand Down
Binary file modified contrib/monitor/mpmetrics/images/queries.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 16 additions & 0 deletions contrib/monitor/mpmetrics/monitor-values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
customization:
runAsUser: ''
monitorRef: monitor-secret
image:
repository: cp.icr.io/cp/cp4a/odm
pullSecret: icregistry-secret
internalDatabase:
persistence:
enabled: false
populateSampleData: true
runAsUser: ''
license: true
service:
enableRoute: true
usersPassword: odmAdmin

Loading