Configure the go-oracledb thin driver
The thin exporter uses Oracle's go-oracledb driver. This pure Go driver supports Oracle Database 19c and later and runs without CGO or Oracle Instant Client. See Builds for thin binaries and container tags.
Build with go-oracledb
make go-build DRIVER=oracledb CGO_ENABLED=0
To build a Linux arm64 container locally, use docker-arm. For amd64, use docker-amd.
make docker-arm DRIVER=oracledb
Configure connections
The thin exporter requires a database username and password. Set them separately from the Easy Connect string or full connect descriptor in databases.<name>.url.
databases:
oracle_db:
username: exporter
password: your_password
url: localhost:1521/FREEPDB1
Existing password-file and vault credential resolution also applies. Credentials are passed to the driver's connector configuration, preserving special characters without DSN escaping. Do not embed credentials in url.
databases:
oracle_db:
username: exporter
password: your_password
url: "(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=FREEPDB1)))"
Use driver-supported Easy Connect query parameters for connection options. See the upstream driver documentation for TCP, TCPS, TLS/wallet options, and configuration precedence. The upstream driver's environment variables can override programmatic connector settings. The exporter accepts its own --config.file flag; configure driver options through the URL or environment rather than upstream driver CLI flags.
OCI wallets
OCI Autonomous Database discovery uses the supplied ewallet.pem directly. A minimal wallet ZIP for this driver contains only ewallet.pem, including the client private key, client certificate, and CA certificates.
For an encrypted PEM private key, configure its wallet password with ORACLE_GO_WALLET_PASSWORD (or oracle.go.wallet_password, which takes precedence). This is a process-wide native driver setting. Automatic OCI wallet generation uses this same configured password; an unencrypted supplied PEM needs no password. See the discovery guide for minimal files, shared-wallet ZIPs, and generation requirements.
For a static database, set tnsAdmin to the directory containing ewallet.pem and provide the full connect descriptor or Easy Connect address in url. If you connect using a TNS alias today, copy the descriptor for that alias into url. Discovery-owned wallet directories are cleaned up after connection pools close.