Closed tux-jochen closed 4 months ago
Thanks for reporting the issue. I will try to reproduce it and see what is going on.
One quick question - I noticed the file you posted has DB_PASSWORT not DB_PASSWORD. I see the error message is talking about the username not the password, but just wanted to check on that, just in case maybe the error message is misleading.
Thanks, I changed the typo in my exporter.env
The log message is the same
ts=2024-07-18T14:53:38.320Z caller=collector.go:272 level=debug msg="error = pool=0x7f481c00c750 stats=busy=0 open=0 max=0 maxLifetime=1h0m0s timeout=5m0s waitTimeout=30s params={authMode:0 connectionClass:<nil> connectionClassLength:0 purity:0 newPassword:<nil> newPasswordLength:0 appContext:<nil> numAppContext:0 externalAuth:0 externalHandle:<nil> pool:0x7f481c00c750 tag:<nil> tagLength:0 matchAnyTag:0 outTag:<nil> outTagLength:0 outTagFound:0 shardingKeyColumns:<nil> numShardingKeyColumns:0 superShardingKeyColumns:<nil> numSuperShardingKeyColumns:0 outNewSession:0}: ORA-24415: Missing or null username."
I had special chars in my password and changed the password to a password without special chars.
The log changed to
olumns:0 superShardingKeyColumns:<nil> numSuperShardingKeyColumns:0 outNewSession:0}: ORA-12514: TNS:listener does not currently know of service requested in connect descriptor"
Is the DB_CONNECT_STRING correct?
Solved :-)
In OCI we need the domain suffix in DB_CONNECT_STRING
DB_CONNECT_STRING=MyPDBName.priv.db.oraclevcn.com
The exporter logs show successfull connection
Many Thanks for Your help
How can I configure the path and filename of oracles alert.log? In OCI Database Service is the name of the file alert_<cdb_name>.log
not alert.log
ts=2024-07-18T15:23:40.133Z caller=alertlog.go:103 level=error msg="Error querying the alert logs"
Or is this a grant problem of the db user?
You can specify the location of the output log file using the environment variable LOG_DESTINATION
That looks like a grant issue though
Your user needs permission to read v$diag_alert_ext
Thanks a lot
works for me
installed oracledb_exporter from binary 1.3.0 on the DB System
excute as oracle user ./startExporter.sh
ts=2024-07-18T13:33:50.693Z caller=main.go:72 level=info msg="FREE_INTERVAL end var is not present, will not periodically attempt to release memory" ts=2024-07-18T13:33:50.694Z caller=main.go:79 level=info msg="RESTART_INTERVAL env var is not present, so will not restart myself periodically" ts=2024-07-18T13:33:50.695Z caller=collector.go:361 level=debug msg="Launching connection to localhost:1521/JOCHEN01" ts=2024-07-18T13:33:50.695Z caller=collector.go:374 level=debug msg="connection properties: user=system password=SECRET-*** connectString=localhost:1521/MyPDBName configDir=\nconnectionClass= enableEvents=0 externalAuth=0 heterogeneousPool=0 initOnNewConnection=0\nlibDir= noBreakOnContextCancel=0 noTimezoneCheck=0 perSessionTimezone=0 pingInterval=0s\npoolIncrement=0 poolMaxSessions=0 poolMinSessions=0 poolSessionMaxLifetime=0s\npoolSessionTimeout=0s poolWaitTimeout=0s prelim=0 standaloneConnection=0 sysasm=0\nsysdba=0 sysoper=0 timezone=" ts=2024-07-18T13:33:50.695Z caller=collector.go:379 level=debug setmaxidleconnectionsto=0 ts=2024-07-18T13:33:50.695Z caller=collector.go:381 level=debug setmaxopenconnectionsto=10 ts=2024-07-18T13:33:50.695Z caller=collector.go:384 level=debug msg="Successfully configured connection to localhost:1521/JOCHEN01" ts=2024-07-18T13:33:50.748Z caller=collector.go:391 level=info msg="Could not set CLIENT_INFO." ts=2024-07-18T13:33:50.748Z caller=collector.go:396 level=info msg="dbtype err =pool=0x29f1410 stats=busy=0 open=0 max=0 maxLifetime=1h0m0s timeout=5m0s waitTimeout=30s params={authMode:0 connectionClass: connectionClassLength:0 purity:0 newPassword: newPasswordLength:0 appContext: numAppContext:0 externalAuth:0 externalHandle: pool:0x29f1410 tag: tagLength:0 matchAnyTag:0 outTag: outTagLength:0 outTagFound:0 shardingKeyColumns: numShardingKeyColumns:0 superShardingKeyColumns: numSuperShardingKeyColumns:0 outNewSession:0}: ORA-24415: Missing or null username."
ts=2024-07-18T13:33:50.748Z caller=collector.go:402 level=info msg="got error checking my database role"
ts=2024-07-18T13:33:50.748Z caller=collector.go:404 level=info msg="Connected as SYSDBA? "
ts=2024-07-18T13:33:50.748Z caller=collector.go:272 level=debug msg="error = pool=0x29f1410 stats=busy=0 open=0 max=0 maxLifetime=1h0m0s timeout=5m0s waitTimeout=30s params={authMode:0 connectionClass: connectionClassLength:0 purity:0 newPassword: newPasswordLength:0 appContext: numAppContext:0 externalAuth:0 externalHandle: pool:0x29f1410 tag: tagLength:0 matchAnyTag:0 outTag: outTagLength:0 outTagFound:0 shardingKeyColumns: numShardingKeyColumns:0 superShardingKeyColumns: numSuperShardingKeyColumns:0 outNewSession:0}: ORA-24415: Missing or null username."
ts=2024-07-18T13:33:50.749Z caller=collector.go:283 level=error msg="Error pinging oracle" error="pool=0x29f1410 stats=busy=0 open=0 max=0 maxLifetime=1h0m0s timeout=5m0s waitTimeout=30s params={authMode:0 connectionClass: connectionClassLength:0 purity:0 newPassword: newPasswordLength:0 appContext: numAppContext:0 externalAuth:0 externalHandle: pool:0x29f1410 tag: tagLength:0 matchAnyTag:0 outTag: outTagLength:0 outTagFound:0 shardingKeyColumns: numShardingKeyColumns:0 superShardingKeyColumns: numSuperShardingKeyColumns:0 outNewSession:0}: ORA-24415: Missing or null username."
ts=2024-07-18T13:33:50.749Z caller=main.go:107 level=info msg="Starting oracledb_exporter" version=1.3.0
ts=2024-07-18T13:33:50.749Z caller=main.go:108 level=info msg="Build context" build="(go=go1.22.4, platform=linux/amd64, user=, date=, tags=unknown)"
ts=2024-07-18T13:33:50.749Z caller=main.go:109 level=info msg="Collect from: " metricPath=/metrics
startExporter.sh
exporter.env
Database ist available