GithubHelp home page GithubHelp logo

Comments (7)

Yannig avatar Yannig commented on August 11, 2024

Sorry but there is no way to connect to Oracle Database using this kind of trick.
This limitation came from the oracle driver (github.com/mattn/go-oci8).
So no way to change this only by changing this lib.

from oracledb_exporter.

Yannig avatar Yannig commented on August 11, 2024

It seems to be supported (https://github.com/mattn/go-oci8/blob/master/_example/as_sysdba/main.go).

Can you try the following value :

sqlplus sys/password@tnsentry as sysdba   =>   sys/password@tnsentry?as=sysdba
sqlplus / as sysdba                       =>   sys/.@?as=sysdba

from oracledb_exporter.

Yannig avatar Yannig commented on August 11, 2024

The issue : mattn/go-oci8#209
The pull request : mattn/go-oci8#212

from oracledb_exporter.

changmao01 avatar changmao01 commented on August 11, 2024

where is tnsnames.ora file to be looked by go-oci8?
I put this config file on $ORACLE_HOME/network/admin, however, oracle_exporter can not find it.

from oracledb_exporter.

mzs114 avatar mzs114 commented on August 11, 2024

The below worked for me. @Yannig @changmao01
I am using something called easy connect name(or string or something)

bash$ export LD_LIBRARY_PATH=/usr/lib/oracle/19.3/client64/lib:$LD_LIBRARY_PATH;

bash$ export DATA_SOURCE_NAME='system:PASSWORDhere@oracle-host:1521/easy-tns-name'

Note that I did not pass any sysdba or sysoper parameter, as it was not working and instead connected as system.

Post this:

bash$ ./oracledb_exporter.0.2.3.linux-amd64/oracledb_exporter -log.level info -web.listen-address localhost:9161 -default.metrics oracledb_exporter.0.2.3.linux-amd64/default-metrics.toml

To make this work, I also had to comment out the query that was causing timeout, the one in default-metrics.toml.
I am posting this after multiple trail and errors, yet to scrape the metrics using metricbeat(as I am on ELK).

from oracledb_exporter.

Seth1u avatar Seth1u commented on August 11, 2024

Hello!

Nice work Yanning

I want to know how to use connetion with sqlplus user/password only because on my database i can use one user for monitoring without connect with TNS or sys as sysdba.

Your function can do it too ?

Thanks a lot

from oracledb_exporter.

Yannig avatar Yannig commented on August 11, 2024

Hi,

Are you talking about the ability to connect in the same way as sqlplus with access management by user groups? If this is what you are talking about, the agent does not support this type of connection (or in any case, I am not aware of it).

But otherwise, nothing prevents using the same type of connection string in sqlplus and the exporter.
In any case, I advise you to approach your database administrator to resolve any problems that you may encounter.

from oracledb_exporter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.