@@ -232,6 +232,37 @@ COPY custom-metrics.toml /
232
232
ENTRYPOINT ["/oracledb_exporter" , "--custom.metrics" , "/custom-metrics.toml" ]
233
233
```
234
234
235
+ # TLS connection to database
236
+
237
+ First, set the following variables:
238
+
239
+ export WALLET_PATH=/wallet/path/to/use
240
+ export TNS_ENTRY=tns_entry
241
+ export DB_USERNAME=db_username
242
+ export TNS_ADMIN=/tns/admin/path/to/use
243
+
244
+ Create the wallet and set the credential:
245
+
246
+ mkstore -wrl $WALLET_PATH -create
247
+ mkstore -wrl $WALLET_PATH -createCredential $TNS_ENTRY $DB_USERNAME
248
+
249
+ Then, update sqlnet.ora:
250
+
251
+ echo "
252
+ WALLET_LOCATION = (SOURCE = (METHOD = FILE) (METHOD_DATA = (DIRECTORY = $WALLET_PATH )))
253
+ SQLNET.WALLET_OVERRIDE = TRUE
254
+ SSL_CLIENT_AUTHENTICATION = FALSE
255
+ " >> $TNS_ADMIN/sqlnet.ora
256
+
257
+ To use the wallet, use the wallet_location parameter. You may need to disable ssl verification with the
258
+ ssl_server_dn_match parameter.
259
+
260
+ Here a complete example of string connection:
261
+
262
+ DATA_SOURCE_NAME=username/password@tcps://dbhost:port/service?ssl_server_dn_match=false&wallet_location=wallet_path
263
+
264
+ For more details, have a look at the following location: https://github.com/iamseth/oracledb_exporter/issues/84
265
+
235
266
# Integration with Grafana
236
267
237
268
An example Grafana dashboard is available [ here] ( https://grafana.com/dashboards/3333 ) .
0 commit comments