Not the answer you need?
Register and ask your own question!

Pmm2 MongoDB error

GajendraGajendra ContributorCurrent User Role Patron

Hi Team,

we are using PMM2.2 version to monitor MongoDB database but we are getting lots of messages in mongoDb log

Please let know how can i fix it .

monitoring by mongodb_exporter user

db.getSiblingDB("admin").createUser({

  user: "mongodb_exporter",

  pwd: "****,

  roles: [

    { role: "clusterMonitor", db: "admin" },

    { role: "read", db: "local" }

  ]

})


pmm-admin config --server-insecure-tls --server-url=https://admin:[email protected]:443

pmm-admin add mongodb --username mongodb_exporter --password *****  --service-name=Testm2 --query-source=none --host=127.0.0.1 --port=27017 


2020-03-29T10:11:26.695+0200 I ACCESS  [conn7401125] Unauthorized: not authorized on config to execute command { collStats: "system.sessions", scale: 1, lsid: { id: UUID("05347118-6397-4d9a-92da-bdc293d8674b") }, $clusterTime: { clusterTime: Timestamp(1585469484, 1), signature: { hash: BinData(0, 7EFE52FC1986771F502C7A2D477FCD8ECFA1CC70), keyId: 6775416033059536897 } }, $db: "config", $readPreference: { mode: "primaryPreferred" } }

2020-03-29T10:11:26.696+0200 I ACCESS  [conn7401125] Unauthorized: not authorized on config to execute command { collStats: "system.profile", scale: 1, lsid: { id: UUID("05347118-6397-4d9a-92da-bdc293d8674b") }, $clusterTime: { clusterTime: Timestamp(1585469484, 1), signature: { hash: BinData(0, 7EFE52FC1986771F502C7A2D477FCD8ECFA1CC70), keyId: 6775416033059536897 } }, $db: "config", $readPreference: { mode: "primaryPreferred" } }

2020-03-29T10:11:26.713+0200 I ACCESS  [conn7401125] Unauthorized: not authorized on customer_ABC to execute command { collStats: "system.profile", scale: 1, lsid: { id: UUID("05347118-6397-4d9a-92da-bdc293d8674b") }, $clusterTime: { clusterTime: Timestamp(1585469484, 1), signature: { hash: BinData(0, 7EFE52FC1986771F502C7A2D477FCD8ECFA1CC70), keyId: 6775416033059536897 } }, $db: "customer_docs", $readPreference: { mode: "primaryPreferred" } }

Best Answer

  • Akira KuroganeAkira Kurogane Percona Percona Staff Role
    Accepted Answer

    Hi Gajendra. (And hi Steve too)

    If you want to do something immediately to prevent the bloat in the mongod log files is to disable the -collect.collection option of mongodb_exporter and start again. (And -collection.indexusage option if you are using that too.)

    But to make it work with those options on the mongodb_exporter user will have to wait for a fix, sorry. The information mentioned is in https://jira.percona.com/browse/PMM-5351. The fix is developed, but not expected to be released until PMM 2.6 in maybe May.

Answers

  • steve.hoffmansteve.hoffman Percona Percona Staff Role

    Just to eliminate a basic typo as a possibility (it may simply have been from masking the password) but I see you have pwd: "****, in your permissions statement, looks like that line is missing the second set of quotes to be: pwd: "****",

  • steve.hoffmansteve.hoffman Percona Percona Staff Role

    Quick Update, was able to get a mongo instance setup on my testbed and tried to grant the permissions omitting the second quote and the command won't even complete (kind of figured that) and the fact that you were able to connect the exporter and PMM with the credentials without error says it's not the permission step. I added the instance to my PMM (2.4) and had no issue or errors in the logs so you might want to try and upgrade to 2.4 (several great new features in there!). I will see about spinning up a container later tonight or tomorrow with 2.2 and see if I can recreate it there. Another thing to consider is if permissions changed after you set them...again, unlikely but throwing out suggestions.

  • GajendraGajendra Contributor Current User Role Patron

    Thanks Akira

  • GajendraGajendra Contributor Current User Role Patron

    Hi Akira,

    Disabling collect.collection option is not working

    could you please suggest me how to disable it

    pmm-admin add mongodb --username mongodb_exporter --password ***** --disable-collect.collection  --service-name=Testm2 --query-source=none --host=127.0.0.1 --port=27017 

  • GajendraGajendra Contributor Current User Role Patron
    Hi Team,
    Please help me on this.
    Otherwise i have to downgrade my PMM2  to pmm1.17.3
    Thanks

Sign In or Register to comment.

MySQL, InnoDB, MariaDB and MongoDB are trademarks of their respective owners.
Copyright ©2005 - 2020 Percona LLC. All rights reserved.