Skip to content

[BUG] metric wait_time form default-metrics.toml does not add labels in prometheus metrics #349

@romankspb

Description

@romankspb

Description

In default-metrics.toml defined metric with labels

          [[metric]]
          context = "wait_time"
          labels = [ "inst_id", "wait_class", "con_id" ]
          metricsdesc = { time_waited_sec_total="counter metric from system_wait_class view in Oracle." }
          metricstype = { time_waited_sec_total = "counter" }
          fieldtoappend= "wait_class"
          request = '''
          select
            inst_id,
            wait_class,
            round(time_waited/100,3) time_waited_sec_total,
            con_id
          from gv$system_wait_class
          where wait_class <> 'Idle'
          group by inst_id, wait_class, con_id, round(time_waited/100,3)

but exporter creates metrics without labels inst_id, wait_class, con_id as described in documentation

$ k -n oracle-db-observability-exporter exec -it deploy/oracle-db-observability-exporter -- curl http://oracle-db-observability-exporter.oracle-db-observability-exporter.svc.cluster.local:9161/metrics | grep wait_time | grep PALM | grep -v \#
oracledb_wait_time_administrative{database="PALMIRA"} 3231.3
oracledb_wait_time_application{database="PALMIRA"} 39697.56
oracledb_wait_time_cluster{database="PALMIRA"} 7.05280253e+06
oracledb_wait_time_commit{database="PALMIRA"} 570079.2
oracledb_wait_time_concurrency{database="PALMIRA"} 402058.46
oracledb_wait_time_configuration{database="PALMIRA"} 6.18485476e+06
oracledb_wait_time_network{database="PALMIRA"} 28088.17
oracledb_wait_time_other{database="PALMIRA"} 1.80085476e+06
oracledb_wait_time_scheduler{database="PALMIRA"} 205.93
oracledb_wait_time_system_io{database="PALMIRA"} 2.4603302e+06
oracledb_wait_time_user_io{database="PALMIRA"} 1.916006641e+07

Environment

  • OS: Official docker image
  • Oracle Database version: 19c Enterprise Edition Release 19.0.0.0.0 - Production Version 19.26.0.0.0
  • Exporter version: 2.0.4

Screenshots / Logs

Image

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