Skip to content

[BUG] compatibility with oracle 11c #380

@MansuyDavid

Description

@MansuyDavid

Description

when connecting to oracle 11c db we have errors :
level=INFO source=database.go:220 msg="dbtype err" error="dpiStmt_execute: ORA-02003: invalid USERENV parameter\nHelp: https://docs.oracle.com/error-help/db/ora-02003/" database=oracle

Details

I found that this error is caused by database.go:getDBtype.
but i found also that this metric is never exposed when scrapInterval is used. collector.go:RunScheduledScrapes

So about this metric :

  1. this metric is not really usefull : remove it
  2. this metric must be used only when scrapinterval is not set (but this seems really strange to me) : so do not execute this request if scrapinterval is used. (no need to execute it if not exposed).
  3. this metric must be used no matter scrapinterval :
    a- add this metric to the exposed metrics for RunScheduledScrapes.
    b- change the handling of this request to have for example "-1" as value if an error occured. (this is the way we are doing internnaly for now)

I know that 11c is not maintained by oracle, but this metric is the only thing that make this exporter not compatible with 11c.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions