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

Added support for yaml-formatted configs #408

Merged
merged 1 commit into from
Apr 1, 2024

Conversation

marinafrank
Copy link
Contributor

@marinafrank marinafrank commented Jan 29, 2024

Description

  • Added yaml parser for more readable configs. toml is also still supported.
  • Enchanced log messages: use key-value syntax, added warning message when fallback to hard-coded default metrics
  • Updated readme with some tips from my experience with the oracledb exporter (which I find anyway cool).

Type of change

  • New feature (non-breaking change which adds functionality)
  • This change requires a documentation update

How Has This Been Tested?

make local-build
export DATA_SOURCE_NAME="<connectionstring-to-oracle-19.21.0.0.0>"

# regression test
dist/oracledb_exporter-0.5.2.linux-amd64/oracledb_exporter --default.metrics=./default-metrics.toml --log.level debug
dist/oracledb_exporter-0.5.2.linux-amd64/oracledb_exporter --custom.metrics=./custom-metrics-example/custom-metrics.toml --log.level debug
curl http://localhost:9161

# functional test
dist/oracledb_exporter-0.5.2.linux-amd64/oracledb_exporter --default.metrics=./default-metrics.yaml --log.level debug
dist/oracledb_exporter-0.5.2.linux-amd64/oracledb_exporter --custom.metrics=./custom-metrics-example/custom-metrics.yaml --log.level debug
curl http://localhost:9161

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules
  • Updated version in Makefile respecting semver v2

@Yannig
Copy link
Collaborator

Yannig commented Apr 1, 2024

Thanks for this contribution! Looks very interesting!

Do you mind to change just one thing to the YAML structure: use metrics for the root of all metrics?

Sorry for the delay ...

Yannig

@Yannig Yannig merged commit e5e48a7 into iamseth:master Apr 1, 2024
4 of 5 checks passed
@marinafrank marinafrank deleted the yaml-config branch April 26, 2024 12:25
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

Successfully merging this pull request may close these issues.

2 participants