yorkie-team / yorkie

Yorkie is a document store for collaborative applications.
https://yorkie.dev
Apache License 2.0
780 stars 144 forks source link

Support collecting metrics for MongoDB sharded clusters #876

Open sejongk opened 4 months ago

sejongk commented 4 months ago

What would you like to be added: It seems necessary to collect metrics for MongoDB sharded clusters. Currently, the existing monitoring system focuses on Yorkie metrics and go process metrics, but extending this to include MongoDB sharded clusters would provide valuable insights into their performance and health.

Why is this needed: It is helpful to prevent and resolve problems in MongoDB sharded clusters such as #872. Consider to utilize open source exporters such as mongodb_exporter. Refer to MongoDB performance metrics in the Datadog blog post.

sejongk commented 2 months ago

Currently, the yorkie-mongodb Helm chart depends on Bitnami's mongodb-sharded chart, which provides a metrics option for setting up a Prometheus exporter. I think we can consider leveraging this option. Ref.: https://github.com/bitnami/charts/blob/main/bitnami/mongodb-sharded/values.yaml#L1765

krapie commented 2 months ago

It seems like the mongodb-exporter in our mongodb-sharded is not working due to misconfiguration of the username to connect to the mongodb shard node.

The error message shows like below: Cannot connect to MongoDB: invalid dsn: error validating uri: username required if URI contains user info

xet-a commented 2 months ago

I'm interested in this issue. Can I try it?

sejongk commented 2 months ago

I'm interested in this issue. Can I try it?

@xet-a Sure. If you have any questions, feel free to ask.

sejongk commented 2 months ago

@xet-a @krapie I guess the mongodb-exporter for ARM64 is supported now. https://hub.docker.com/r/bitnami/mongodb-exporter/tags