Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use Multi-Target Support? #445

Open
dmitriy-shleht opened this issue May 3, 2024 · 5 comments
Open

How to use Multi-Target Support? #445

dmitriy-shleht opened this issue May 3, 2024 · 5 comments

Comments

@dmitriy-shleht
Copy link

dmitriy-shleht commented May 3, 2024

I have Oracle RAC, I would like to collect metrics from two instances (nodes, ora01 and ora02)

What is the current behavior?

I tried to specify them through a comma, but it does not work and I get a mistake ORA-12514: TNS:listener does not currently know of service requested in connect descriptor
oracle://SVC_ORACLEDB_EXPORTER:[email protected]:1521/odaodb,ora02.fgr.my:1521/odaodb

How do I need to set the connection string to two instances in the DSN ?

What is the expected behavior?

I thought to turn to the copies I needed as it is written in readme
/scrape?target=ora01:1521 OR scrape?target=ora02:1521

Please tell us about your environment:

Kubernetes

oracledb_exporter Version: 0.6.0

@valrusu
Copy link
Contributor

valrusu commented May 9, 2024

Hi, I used 2 targets under a single job in Prometheus, and started 2 scrapers, each pointing to one specific instance:

  - job_name: oracle_job_name
    scrape_interval: 60s
    static_configs:
    - targets: ['localhost:9161','localhost:9162']

DSN used: oracle://dbuser:password@server:1521/service?sid=sidname
Used the scan name for server.

Hope this helps.

@bufanzey
Copy link

In fact, I haven't found a solution either. I've seen many others asking the same question, and it seems that this feature is not supported by default. If you have a better solution, please share it with me.

@lucian-vanghele
Copy link
Contributor

@dmitriy-shleht you are mixing 2 features (both broken actually): multi target and the multi-host . you can also see #339 and #334

@thomas-vt
Copy link

@valrusu
Is it possible to mask the password?
Will the password be exposed in the Prometheus UI - under Targets
Can scrape use wallet to obtain the password?

@lucian-vanghele
Copy link
Contributor

You ca use oracle wallet instead of text password. Anyway, this is the password used by the exporter to connect to the oracle server, it has nothing to do with the scrapper or Prometheus UI. If you want to protect the /metrics endpoint with some form of authentication then you should read here: https://github.com/prometheus/exporter-toolkit/blob/master/docs/web-configuration.md

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants