You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: OracleSOASuite/kubernetes/monitoring-service/README.md
+26-84Lines changed: 26 additions & 84 deletions
Original file line number
Diff line number
Diff line change
@@ -20,22 +20,29 @@ Set up the WebLogic Monitoring Exporter that will collect WebLogic Server metric
20
20
21
21
## Set up manually
22
22
23
-
### Deploy Prometheus and Grafana
23
+
### Install kube-prometheus-stack
24
24
25
-
Refer to the compatibility matrix of [Kube Prometheus](https://github.com/coreos/kube-prometheus#kubernetes-compatibility-matrix) and clone the [release](https://github.com/coreos/kube-prometheus/releases) version of the `kube-prometheus` repository according to the Kubernetes version of your cluster.
25
+
Refer to [link](https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack) and install the Kube Prometheus stack.
26
26
27
-
1.Clone the `kube-prometheus` repository:
27
+
1.Get Helm Repository Info for the `kube-prometheus`:
1. Change to folder `kube-prometheus` and enter the following commands to create the namespace and CRDs, and then wait for their availability before creating the remaining resources:
1. `kube-prometheus` requires all nodes in the Kubernetes cluster to be labeled with `kubernetes.io/os=linux`. If any node is not labeled with this, then you need to label it using the following command:
@@ -44,78 +51,22 @@ Refer to the compatibility matrix of [Kube Prometheus](https://github.com/coreos
1. With the nodePort values provided during helm install, monitoring serives will be available at:
56
55
57
-
Note:
58
56
* `32100` is the external port for Grafana
59
57
* `32101` is the external port for Prometheus
60
58
* `32102` is the external port for Alertmanager
61
59
62
-
### Generate the WebLogic Monitoring Exporter Deployment Package
63
-
64
-
The `wls-exporter.war` package need to be updated and created for each listening ports (Administration Server and Managed Servers) in the domain.
65
-
Set the below environment values based on your environment and run the script `get-wls-exporter.sh` to generate the required WAR files at `${WORKDIR}/monitoring-service/scripts/wls-exporter-deploy`:
66
-
- adminServerPort
67
-
- wlsMonitoringExporterTosoaCluster
68
-
- soaManagedServerPort
69
-
- wlsMonitoringExporterToosbCluster
70
-
- osbManagedServerPort
71
-
72
-
For example:
73
-
74
-
```
75
-
$ cd ${WORKDIR}/monitoring-service/scripts
76
-
$ export adminServerPort=7011
77
-
$ export wlsMonitoringExporterTosoaCluster=true
78
-
$ export soaManagedServerPort=8011
79
-
$ export wlsMonitoringExporterToosbCluster=true
80
-
$ export osbManagedServerPort=9011
81
-
$ sh get-wls-exporter.sh
82
-
```
60
+
### Use the Monitoring Exporter with WebLogic Kubernetes Operator
83
61
84
-
Verify whether the required WAR files are generated at `${WORKDIR}/monitoring-service/scripts/wls-exporter-deploy`.
62
+
For enabling monitoring exporter, simply add the [monitoringExporter](https://github.com/oracle/weblogic-kubernetes-operator/blob/main/documentation/domains/Domain.md#monitoring-exporter-specification) configuration element in the domain resource.
63
+
Sample configuration available at `${WORKDIR}/monitoring-service/config/config.yaml` can be added to your domain using below command:
85
64
86
65
```
87
-
$ ls ${WORKDIR}/monitoring-service/scripts/wls-exporter-deploy
This will trigger the restart of domain. The newly created server pods will have the exporter sidecar. See https://github.com/oracle/weblogic-monitoring-exporter for details.
119
70
120
71
### Configure Prometheus Operator
121
72
@@ -186,21 +137,15 @@ The following parameters can be provided in the inputs file.
186
137
| `setupKubePrometheusStack` | Boolean value indicating whether kube-prometheus-stack (Prometheus, Grafana and Alertmanager) to be installed | `true` |
187
138
| `additionalParamForKubePrometheusStack` | The script install's kube-prometheus-stack with `service.type` as NodePort and values for `service.nodePort` as per the parameters defined in `monitoring-inputs.yaml`. Use `additionalParamForKubePrometheusStack` parameter to further configure with additional parameters as per [values.yaml](https://github.com/prometheus-community/helm-charts/blob/main/charts/kube-prometheus-stack/values.yaml). Sample value to disable NodeExporter, Prometheus-Operator TLS support, Admission webhook support for PrometheusRules resources and custom Grafana image repository is `--set nodeExporter.enabled=false --set prometheusOperator.tls.enabled=false --set prometheusOperator.admissionWebhooks.enabled=false --set grafana.image.repository=xxxxxxxxx/grafana/grafana`| |
| `monitoringHelmReleaseName` | Helm release name for monitoring resources. | `monitoring` |
189
141
| `adminServerName` | Name of the Administration Server. | `AdminServer` |
190
-
| `adminServerPort` | Port number for the Administration Server inside the Kubernetes cluster. | `7011` |
191
-
| `soaClusterName` | Name of the soaCluster. | `soa_cluster` |
192
-
| `soaManagedServerPort` | Port number of the managed servers in the soaCluster. | `8011` |
193
-
| `wlsMonitoringExporterTosoaCluster` | Boolean value indicating whether to deploy WebLogic Monitoring Exporter to soaCluster. | `false` |
194
-
| `osbClusterName` | Name of the osbCluster. | `osb_cluster` |
195
-
| `osbManagedServerPort` | Port number of the managed servers in the osbCluster. | `9011` |
196
-
| `wlsMonitoringExporterToosbCluster` | Boolean value indicating whether to deploy WebLogic Monitoring Exporter to osbCluster. | `false` |
197
142
| `exposeMonitoringNodePort` | Boolean value indicating if the Monitoring Services (Prometheus, Grafana and Alertmanager) is exposed outside of the Kubernetes cluster. | `false` |
198
143
| `prometheusNodePort` | Port number of the Prometheus outside the Kubernetes cluster. | `32101` |
199
144
| `grafanaNodePort` | Port number of the Grafana outside the Kubernetes cluster. | `32100` |
200
145
| `alertmanagerNodePort` | Port number of the Alertmanager outside the Kubernetes cluster. | `32102` |
201
146
| `weblogicCredentialsSecretName` | Name of the Kubernetes secret which has Administration Server's user name and password. | `soainfra-domain-credentials` |
202
147
203
-
Note that the values specified in the `monitoring-inputs.yaml` file will be used to install kube-prometheus-stack (Prometheus, Grafana and Alertmanager) and deploying WebLogic Monitoring Exporter into the OracleSOASuite domain. Hence make the domain specific values to be same as that used during domain creation.
148
+
Note that the values specified in the `monitoring-inputs.yaml` file will be used to install kube-prometheus-stack (Prometheus, Grafana and Alertmanager) and enabling WebLogic Monitoring Exporter into the OracleSOASuite domain. Hence make the domain specific values to be same as that used during domain creation.
204
149
205
150
### Run the setup monitoring script
206
151
@@ -214,13 +159,10 @@ $ ./setup-monitoring.sh \
214
159
The script will perform the following steps:
215
160
216
161
- Helm install `prometheus-community/kube-prometheus-stack` if `setupKubePrometheusStack` is set to `true`.
217
-
- Deploys WebLogic Monitoring Exporter to Administration Server.
218
-
- Deploys WebLogic Monitoring Exporter to `soaCluster` if `wlsMonitoringExporterTosoaCluster` is set to `true`.
219
-
- Deploys WebLogic Monitoring Exporter to `osbCluster` if `wlsMonitoringExporterToosbCluster` is set to `true`.
162
+
- Configures Monitoring Exporter as sidecar
220
163
- Exposes the Monitoring Services (Prometheus at `32101`, Grafana at `32100` and Alertmanager at `32102`) outside of the Kubernetes cluster if `exposeMonitoringNodePort` is set to `true`.
221
164
- Imports the WebLogic Server Grafana Dashboard if `setupKubePrometheusStack` is set to `true`.
222
165
223
-
224
166
### Verify the results
225
167
The setup monitoring script will report failure if there was any error. However, verify that required resources were created by the script.
0 commit comments