mongodb_exporter icon indicating copy to clipboard operation
mongodb_exporter copied to clipboard

Query execution time metrics?

Open hairyhenderson opened this issue 7 years ago • 1 comments

Sorry if this is a dumb question, but is it possible to get simple query execution time metrics from this exporter? Specifically I want to answer the question "How long are read/insert/update queries taking?"

I think profiling will need to be enabled to answer this (based on https://docs.mongodb.com/manual/tutorial/manage-the-database-profiler/), but in my use-case the overhead is worth the visibility 🙂

hairyhenderson avatar Apr 24 '18 15:04 hairyhenderson

can some one help me with execution read and write query for promethues i have below one but doesnot seem to give exact metric value

((avg(rate(mongodb_mongod_op_latencies_latency_total{type="write",mongo_cluster=~"$cluster_name"}[5m])) by (instance)) * on (instance) group_right mongodb_mongod_replset_my_name) * on (instance,name,service) group_right mongodb_mongod_replset_member_health{state=~"$type",set=~"$shardName",name=~"$instance"}

som-kanade avatar Feb 01 '21 20:02 som-kanade