I am trying to connect to adb through wallet in oracledb_exporter
container and wallet is at /tmp/wallet
location.
Below are the debug logs. Unable to understand the issue as first it says successfully connected and then throws the tns error.
time="2022-11-17T11:37:08Z" level=info msg="Starting oracledb_exporter master" source="main.go:543"
time="2022-11-17T11:37:08Z" level=info msg=" Successfully loaded default metrics from: default-metrics.toml" source=" main.go:518"
time="2022-11-17T11:37:08Z" level=info msg="No custom metrics defined." source="main.go:533"
time="2022-11-17T11:37:08Z" level=debug msg="Launching connection: acdc/XXXXXXXXXXX@dvc2687adb324_high?ssl_server_dn_match=false&wallet_location=/tmp/wallet" source="main.go:105"
time="2022-11-17T11:37:08Z" level=debug msg="set max idle connections to 0" source="main.go:111"
time="2022-11-17T11:37:08Z" level=debug msg="set max open connections to 10" source="main.go:113"
time="2022-11-17T11:37:08Z" level=debug msg="Successfully connected to: acdc/XXXXXXXXXXX@dvc2687adb324_high?ssl_server_dn_match=false&wallet_location=/tmp/wallet" source="main.go:115"
time="2022-11-17T11:37:08Z" level=error msg="Error pinging oracle: ORA-12154: TNS:could not resolve the connect identifier specified\n" source="main.go:215"
time="2022-11-17T11:37:08Z" level=info msg="Listening on :9161" source="main.go:579"
I tried with different DATA_SOURCE_NAME's but all seem to throw the same error. Below is one such data source name that I have tried.
acdc/XXXXXXXXXXX@//vt1jqern.adb.us-phoenix-1.oraclecloud.com:1521/vphbtcf4stcojsp_dvc2687adb324_high.adb.oraclecloud.com?ssl_server_dn_match=false&wallet_location=/tmp/wallet
Any help on this would be much appreciated.
We are trying to establish a connection between the oracledb exporter and oracle autonomous database.
Please enable 1-way TLS on your Autonomous Database and try the exporter.
Here is a blog
https://blogs.oracle.com/datawarehousing/post/connecting-your-autonomous-database-has-never-been-easier
Another thing to note is that Autonomous Database provides many metrics via OCI Monitoring Service that can be hooked into Grafana
Documentation for metrics
https://docs.oracle.com/en/cloud/paas/autonomous-database/adbsa/autonomous-monitor-metrics.html#GUID-FBDEEE26-5FCE-4F4D-9A1F-84860824EED6
Grafana OCI Monitoring Service plugin
https://grafana.com/grafana/plugins/oci-metrics-datasource/