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

Wrong metric types #803

Open
IncandescentChrysalis opened this issue Feb 26, 2024 · 1 comment
Open

Wrong metric types #803

IncandescentChrysalis opened this issue Feb 26, 2024 · 1 comment

Comments

@IncandescentChrysalis
Copy link

IncandescentChrysalis commented Feb 26, 2024

Describe the bug
The exporter makes arbitrary consideratiosn regarding the type of the exported metrics : https://github.com/percona/mongodb_exporter/blob/v0.40.0/exporter/metrics.go#L163C1-L166C3:

  • count-suffixed metrics are exported to the Counter type
  • All other metrics are exported untyped; specifically no Gauge type is ever exporter

For instance, this is incorrect (should be Gauge):

# TYPE mongodb_collstats_storageStats_count counter

To Reproduce
Steps to reproduce the behavior:

  1. Run the exporter
  2. Some Counters shall be Gauges but are not exported as such

Expected behavior

  • Proper types, especially Gauges even when their name is suffixed with count
  • No untyped metric

Additional context
If the MongoDB database offers no hint on the type of the metrics, maybe one way would be to maintain a mapping? Hard to maintain cross-versions, though…

@vishwas-sharma2480
Copy link

hi @BupycHuk can this bug be replicated in a local env ?

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

No branches or pull requests

2 participants