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

exporter produces mongodb_dbstats_raw_xxxxxx metrics with a very very long names #923

Open
WojciechKuk opened this issue Oct 2, 2024 · 1 comment

Comments

@WojciechKuk
Copy link

Describe the bug
my mongodb_exporter produces prometheus metrics with very long names (name)

mongodb_dbstats_raw_xxxxxx_views
mongodb_dbstats_raw_xxxxxx_totalSize
mongodb_dbstats_raw_xxxxxx_totalFreeStorageSize

in the place of "xxxxxxx" there is a very long list of all replicas.

i.e.
mongodb_dbstats_raw_mongodb_name_of_replica_one_portnumber_mongodb_name_of_replica_one_portnumber_mongodb_name_of_replica_two_portnumber_mongodb_name_of_replica_three_portnumber_mongodb_name_of_replica_four_portnumber_mongodb_name_of_replica_five_portnumber_mongodb_name_of_replica_six_portnumber_mongodb_name_of_replica_seven_portnumber_mongodb_name_of_replica_eight_portnumber_mongodb_name_of_replica_nine_portnumber_mongodb_name_of_replica_ten_portnumber_totalFreeStorageSize

To Reproduce

  1. set up mongodb sharded cluster with many mongos instances
  2. run mongodb_exporter

Expected behavior

replicas names shouldn't be used in metric names (it's very dangerous for prometheus/victoriametrics name index - especially when replicas are in k8s, and have POD names with big cardinality)
If it's necessary, names should be added as labels.

@BupycHuk
Copy link
Member

BupycHuk commented Nov 8, 2024

Hello @WojciechKuk,
I tried to reproduce this behavior, but couldn't. Can you please share a few more details?

  1. What version of mongodb is used?
  2. What is topology of your cluster?
  3. What version of mongodb_exporter is used?
  4. What flags were enabled?
  5. Which instance was monitored and provided these metrics?

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