我试图通过oracledb_exporter
容器中的钱包连接到adb,而钱包位于/tmp/wallet
位置。
下面是调试日志。无法理解这个问题,因为它首先说成功连接,然后抛出tns错误。
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 specifiedn" source="main.go:215"
time="2022-11-17T11:37:08Z" level=info msg="Listening on :9161" source="main.go:579"
我尝试了不同的DATA_SOURCE_NAME的,但似乎都抛出相同的错误。下面是我尝试过的一个这样的数据源名称。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
如果有任何帮助,我将不胜感激。
我们正在尝试在oracle导出器和oracle自治数据库之间建立连接。
请在自治数据库上启用单向TLS并尝试导出。
这是一个博客
https://blogs.oracle.com/datawarehousing/post/connecting-your-autonomous-database-has-never-been-easier
另一件需要注意的事情是,自治数据库通过OCI监控服务提供了许多指标,可以连接到Grafana
度量标准文档
https://docs.oracle.com/en/cloud/paas/autonomous-database/adbsa/autonomous-monitor-metrics.html guid fbdeee26 - 5 - fce考试4 - f4d 9 - a1f - 84860824 - eed6
Grafana OCI Monitoring Service插件
https://grafana.com/grafana/plugins/oci-metrics-datasource/