# PMM Query Analytics doesn't work with mongodb

**URL:** <https://forums.percona.com/t/pmm-query-analytics-doesnt-work-with-mongodb/7073>\
**Category:** PMM 1.x\
**Created:** [June 21, 2019, 7:00am UTC](https://forums.percona.com/t/pmm-query-analytics-doesnt-work-with-mongodb/7073 "2019-06-21T07:00:41Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![rpedrero](https://avatars.discourse-cdn.com/v4/letter/r/57b2e6/32.png) [@rpedrero](https://forums.percona.com/u/rpedrero)\
**Post date:** [June 21, 2019, 7:00am UTC](https://forums.percona.com/t/pmm-query-analytics-doesnt-work-with-mongodb/7073/1 "2019-06-21T07:00:41Z")

</div>

Hello,

I’m running percona mongodb server in a docker with the following config in  
docker-compose.yml:

```auto
mongo:
image: percona/percona-server-mongodb
command: --dbpath=/data/db -profile=2 -slowms=200 -rateLimit=100
restart: always
ports:
- "27017:27017"

```

The info from the DDBB about the Profiling is:

```auto
db.getProfilingStatus()
{
"was" : 2,
"slowms" : 200,
"ratelimit" : 100,
"sampleRate" : 1.0
}

```

Also, I created the user with permissions:

```auto
[
{
"_id" : "admin.admin",
"userId" : UUID("be9ad6ca-d3f2-4901-a7ae-d63b1bfedbbc"),
"user" : "admin",
"db" : "admin",
"roles" : [
{
"role" : "root",
"db" : "admin"
}
],
"mechanisms" : [
"SCRAM-SHA-1",
"SCRAM-SHA-256"
]
},
{
"_id" : "admin.mongodb_exporter",
"userId" : UUID("64fb0978-1a56-4b6d-a4df-57ec66e0a422"),
"user" : "mongodb_exporter",
"db" : "admin",
"roles" : [
{
"role" : "clusterMonitor",
"db" : "admin"
},
{
"role" : "read",
"db" : "MyDb1"
},
{
"role" : "read",
"db" : "Mydb2"
},
{
"role" : "read",
"db" : "local"
},
{
"role" : "read",
"db" : "admin"
}
],
"mechanisms" : [
"SCRAM-SHA-1",
"SCRAM-SHA-256"
]
}
]

```

But PMM is not working, that is the message:

Can anyone help me, please?

Many thanks!

 ![yjUuerC.png](https://us1.discourse-cdn.com/flex019/uploads/percona1/original/2X/c/cd17ee9d6c85ac8d9a13237a1563dd564ed6c239.png)

---

<div class="post-metadata">

**Author:** ![rpedrero](https://avatars.discourse-cdn.com/v4/letter/r/57b2e6/32.png) [@rpedrero](https://forums.percona.com/u/rpedrero)\
**Post date:** [June 27, 2019, 2:47am UTC](https://forums.percona.com/t/pmm-query-analytics-doesnt-work-with-mongodb/7073/2 "2019-06-27T02:47:24Z")

</div>

Hello everybody!

Can anyone help me?

Many thanks!

---

<div class="post-metadata">

**Author:** ![Agus\_Syafaat](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/agus_syafaat/32/10599_2.png) [@Agus\_Syafaat](https://forums.percona.com/u/Agus_Syafaat)\
**Post date:** [July 3, 2019, 5:14am UTC](https://forums.percona.com/t/pmm-query-analytics-doesnt-work-with-mongodb/7073/3 "2019-07-03T05:14:26Z")

</div>

You need to configure profiling in mongodb, but the cons when we enable profiling will sometime hurt the performance. I think, there’s a link how to Configuring profiling in Mongodb on the message.

---

<div class="post-metadata">

**Author:** ![rpedrero](https://avatars.discourse-cdn.com/v4/letter/r/57b2e6/32.png) [@rpedrero](https://forums.percona.com/u/rpedrero)\
**Post date:** [July 3, 2019, 5:23am UTC](https://forums.percona.com/t/pmm-query-analytics-doesnt-work-with-mongodb/7073/4 "2019-07-03T05:23:03Z")

</div>

> [@Agus Syafaat;54244](#):
>
> You need to configure profiling in mongodb, but the cons when we enable profiling will sometime hurt the performance. I think, there’s a link how to Configuring profiling in Mongodb on the message.

Hello Agus Syafaat,

Yes, I do the config, and the query to mongodb shows the profiling is activated as I need, but query analitics doesn’t work till…

Can u review my config and tell me if isn’t correct?

Many thanks!

---

<div class="post-metadata">

**Author:** ![rpedrero](https://avatars.discourse-cdn.com/v4/letter/r/57b2e6/32.png) [@rpedrero](https://forums.percona.com/u/rpedrero)\
**Post date:** [July 17, 2019, 2:45am UTC](https://forums.percona.com/t/pmm-query-analytics-doesnt-work-with-mongodb/7073/5 "2019-07-17T02:45:27Z")

</div>

Can anyone help me, please?

Many thanks!

---

<div class="post-metadata">

**Author:** ![lorraine.pocklington](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/lorraine.pocklington/32/37_2.png) [@lorraine.pocklington](https://forums.percona.com/u/lorraine.pocklington)\
**Post date:** [July 17, 2019, 11:54am UTC](https://forums.percona.com/t/pmm-query-analytics-doesnt-work-with-mongodb/7073/6 "2019-07-17T11:54:09Z")

</div>

Hi rpedrero

Would you be able to record this in our JIRA system so that the PMM engineers can take a better look, please?

There are guidelines on how to make your report here: [URL][https://www.percona.com/forums/questions-discussions/percona-monitoring-and-management/50690-pmm-troubleshooting-and-how-to-report-a-bug[/URL]](https://www.percona.com/forums/questions-discussions/percona-monitoring-and-management/50690-pmm-troubleshooting-and-how-to-report-a-bug%5B/URL%5D)

Thank you!
