Buy Percona ServicesBuy Now!

How to configure mongodb replicaset monitoring on PMM

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to configure mongodb replicaset monitoring on PMM

    I need to configure existing Percona Monitoring and management dashboard in such a way to monitor an existing 3 replicaset members. Mongodb version is 3.4 and pmm version is 1.12.0. Something like the screenshot attached. Can some one help me with the steps for the same.

  • #2
    Hi Lalit,
    Thanks for your question. As you have seen in my blog, you just need to add the mongodb metrics with the cluster name option to pmm-admin for your replicaSet members. For example, I have replicaSet: "mongors1" with members mongors1n1, mongors1n2 and mongors1n3. Then please add them as follows from the agent server:

    Code:
    root@7433fdf7e8f7:/# pmm-admin add mongodb:metrics --uri "mongodb://mongors1n1:27017/admin?replicaSet=mongors1" mongo1 --cluster myReplicaSet
    OK, now monitoring MongoDB metrics using URI mongors1n1:27017/admin
    root@7433fdf7e8f7:/# pmm-admin add mongodb:metrics --uri "mongodb://mongors1n2:27017/admin?replicaSet=mongors1" mongo2 --cluster myReplicaSet
    OK, now monitoring MongoDB metrics using URI mongors1n2:27017/admin
    root@7433fdf7e8f7:/# pmm-admin add mongodb:metrics --uri "mongodb://mongors1n3:27017/admin?replicaSet=mongors1" mongo3 --cluster myReplicaSet
    OK, now monitoring MongoDB metrics using URI mongors1n3:27017/admin
    And check whether they are running fine with the below commands:

    Code:
    pmm-admin list
    pmm-admin check-network
    You need to make sure you have the connectivity and necessary port openings from your agent server to MongoDB instances and from agent server to PMM server. After doing this, please check the attached screenshot from my test environment which is showing as required. Note: Port openings needed between pmm client and pmm server are mentioned here.

    Click image for larger version

Name:	pmm-admin for replicaSet.png
Views:	1
Size:	62.1 KB
ID:	51842

    If you have tried these steps already and facing issue in seeing your instances in PMM, then please provide us the /var/log/pmm-mongodb-* log files and the output from below command:

    To be executed on PMM server:
    Code:
    wget https://raw.githubusercontent.com/Percona-QA/percona-qa/master/pmm-info.sh
    sh ./pmm-info.sh ext > pmm-server.log
    To be executed on client server:
    Code:
    wget https://raw.githubusercontent.com/Percona-QA/percona-qa/master/pmm-info.sh
    sh ./pmm-info.sh ext > pmm-client.log
    Best Regards,
    Vinodh Krish

    Comment

    Working...
    X