oracledb-receiver-config.yaml 1.2 KB

123456789101112131415161718192021222324252627
  1. sqlquery:
  2. # driver name: oracle
  3. # username: otel
  4. # password: password
  5. # host: localhost
  6. # container exposed port: 51521
  7. # Oracle DB service name: XE
  8. # Refer to Oracle Go Driver go_ora documentation for full connection string options
  9. datasource: "oracle://otel:password@localhost:51521/XE"
  10. driver: oracle
  11. queries:
  12. # Note: The table name may need to be preceded by the name of the user who created the table.
  13. # If the table is created by an initialization script within a docker container, it would be referred
  14. # to as "sys.movie", as the sys user runs initialization scripts. Permission would need to be granted
  15. # to the "otel" user to access or modify the table in that case.
  16. # This example assumes "otel" created the movie table.
  17. - sql: "select count(*) as count, genre, avg(imdb_rating) as avg from otel.movie group by genre"
  18. metrics:
  19. - metric_name: genre.count
  20. # Note that COUNT and GENRE are now all capital letters, the queries will return nothing if this isn't
  21. # accounted for.
  22. value_column: "COUNT"
  23. attribute_columns: [ GENRE ]
  24. - metric_name: genre.imdb
  25. value_column: "AVG"
  26. attribute_columns: [ GENRE ]
  27. value_type: "double"