mongodbprometheusgrafanamongodb-atlas

MongoDB atlas Prometheusv metrics


Currently Mongodb atlas allows to collect metrics using prometheus: https://www.mongodb.com/docs/atlas/tutorial/prometheus-integration/

I would like to know if anyone has used this stack. I can collect several metrics, but I don't find information about them.

My biggest question currently would be how to create a lag replication view. Could someone help on which metric would return this information or if I need to create some specific query?

Informações sobre Atlas


Solution

  • You may try this one

    scalar(sum(mongodb_members_optimeDate{rs_state="1"} AND (mongodb_members_state{rs_state="1"} == 1)) by (member_idx))
     - (sum(mongodb_members_optimeDate{rs_state="1"} AND (mongodb_members_state{rs_state="1"} == 2)) by (member_idx))