percona / mongodb_exporter

A Prometheus exporter for MongoDB including sharding, replication and storage engines
Apache License 2.0
1.15k stars 426 forks source link

Wrong metric types #803

Open IncandescentChrysalis opened 6 months ago

IncandescentChrysalis commented 6 months ago

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:

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

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 commented 5 months ago

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