Skip to content
This repository was archived by the owner on Feb 13, 2025. It is now read-only.

Commit 9125f86

Browse files
committed
TLS connection documentation.
Reference #84.
1 parent 510e792 commit 9125f86

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

README.md

+31
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,37 @@ COPY custom-metrics.toml /
232232
ENTRYPOINT ["/oracledb_exporter", "--custom.metrics", "/custom-metrics.toml"]
233233
```
234234

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+
235266
# Integration with Grafana
236267

237268
An example Grafana dashboard is available [here](https://grafana.com/dashboards/3333).

0 commit comments

Comments
 (0)