# User Statistics for Percona database

**URL:** <https://community.netdata.cloud/t/user-statistics-for-percona-database/1286>\
**Category:** Help\
**Tags:** agent\
**Created:** [May 12, 2021, 11:10am UTC](https://community.netdata.cloud/t/user-statistics-for-percona-database/1286 "2021-05-12T11:10:48Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![lars](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.netdata.cloud/lars/32/795_2.png) [@lars](https://community.netdata.cloud/u/lars)\
**Post date:** [May 12, 2021, 11:10am UTC](https://community.netdata.cloud/t/user-statistics-for-percona-database/1286/1 "2021-05-12T11:10:48Z")

</div>

Using go.d/mysql plugin with Percona, and I’m able to see charts with connections, queries etc. but there’s no user statistics.  
In documentation there’s a link to MariaDB, does this mean that user statistics doesn’t work with Percona?

I can see user statistics with “SELECT \* FROM INFORMATION\_SCHEMA.USER\_STATISTICS\G” on a Percona prompt.

Current configuration /etc/netdata/go.d/mysql.conf:

```
jobs:
  # my.cnf
  - name: mydb1
    my.cnf: '/etc/my.db1.cnf'
  # netdata
  - name: db1
    dsn: netdata@tcp(10.20.30.40:3306)/

```

Am I missing some basic configuration?

---

<div class="post-metadata">

**Author:** ![OdysLam](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.netdata.cloud/odyslam/32/98_2.png) [@OdysLam](https://community.netdata.cloud/u/OdysLam)\
**Post date:** [May 12, 2021, 2:34pm UTC](https://community.netdata.cloud/t/user-statistics-for-percona-database/1286/2 "2021-05-12T14:34:13Z")

</div>

According to the docs, indeed it should show user statistics. Maybe it detected that it’s not MariaDB and incorrectly infers that this option is not supported.

Please, can you verify that you have fulfilled all the requirements as illustrated in the docs?

> **[MySQL monitoring with Netdata | Learn Netdata](https://learn.netdata.cloud/docs/agent/collectors/go.d.plugin/modules/mysql)**
>
> Monitor connections, slow queries, InnoDB memory and disk utilization, locks, and more with zero configuration and per-second metric granularity.

@ilyam8 what do you think?

---

<div class="post-metadata">

**Author:** ![ilyam8](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.netdata.cloud/ilyam8/32/134_2.png) [@ilyam8](https://community.netdata.cloud/u/ilyam8)\
**Post date:** [May 12, 2021, 5:44pm UTC](https://community.netdata.cloud/t/user-statistics-for-percona-database/1286/3 "2021-05-12T17:44:20Z")

</div>

Hi, guys 👋

The quick answer - [running the plugin in the debug mode](https://github.com/netdata/go.d.plugin/tree/master/modules/mysql#troubleshooting) will tell us the problem.

---

<div class="post-metadata">

**Author:** ![ilyam8](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.netdata.cloud/ilyam8/32/134_2.png) [@ilyam8](https://community.netdata.cloud/u/ilyam8)\
**Post date:** [May 12, 2021, 5:47pm UTC](https://community.netdata.cloud/t/user-statistics-for-percona-database/1286/4 "2021-05-12T17:47:28Z")

</div>

> [@lars](#):
>
> I can see user statistics with “SELECT \* FROM INFORMATION\_SCHEMA.USER\_STATISTICS\G” on a Percona prompt.

Let’s try `SHOW USER_STATISTICS\G` as `netdata` user.

---

<div class="post-metadata">

**Author:** ![lars](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.netdata.cloud/lars/32/795_2.png) [@lars](https://community.netdata.cloud/u/lars)\
**Post date:** [May 13, 2021, 12:50pm UTC](https://community.netdata.cloud/t/user-statistics-for-percona-database/1286/5 "2021-05-13T12:50:26Z")

</div>

I think I have configured according to docs, maybe I missed something basic 🙂

Running in debug mode shows a continuous output like:

BEGIN ‘mysql\_db1.innodb\_rows’ 3999409  
SET ‘innodb\_rows\_inserted’ = 782842830  
SET ‘innodb\_rows\_read’ = 376277549748  
SET ‘innodb\_rows\_updated’ = 77101668  
SET ‘innodb\_rows\_deleted’ = 179734055  
END

BEGIN ‘mysql\_db1.innodb\_buffer\_pool\_pages’ 3999409  
SET ‘innodb\_buffer\_pool\_pages\_data’ = 617960  
SET ‘innodb\_buffer\_pool\_pages\_dirty’ = 14969  
SET ‘innodb\_buffer\_pool\_pages\_free’ = 22290  
SET ‘innodb\_buffer\_pool\_pages\_misc’ = 15030  
SET ‘innodb\_buffer\_pool\_pages\_total’ = 655280  
END

BEGIN ‘mysql\_db1.innodb\_buffer\_pool\_flush\_pages\_requests’ 3999409  
SET ‘innodb\_buffer\_pool\_pages\_flushed’ = 141297280  
END

BEGIN ‘mysql\_db1.innodb\_buffer\_pool\_bytes’ 3999409  
SET ‘innodb\_buffer\_pool\_bytes\_data’ = 10124656640  
SET ‘innodb\_buffer\_pool\_bytes\_dirty’ = 245252096  
END

BEGIN ‘mysql\_db1.innodb\_buffer\_pool\_read\_ahead’ 3999409  
SET ‘innodb\_buffer\_pool\_read\_ahead’ = 575450  
SET ‘innodb\_buffer\_pool\_read\_ahead\_evicted’ = 0  
SET ‘innodb\_buffer\_pool\_read\_ahead\_rnd’ = 0  
END

BEGIN ‘mysql\_db1.innodb\_buffer\_pool\_ops’ 3999409  
SET ‘innodb\_buffer\_pool\_reads’ = 5280990  
SET ‘innodb\_buffer\_pool\_wait\_free’ = 1909  
END

SHOW USER\_STATISTICS\G as netdata user works.

As I haven’t seen how things are collected for user stats, should there be an exact database name configured in configuration for it to work, or is my configuration valid to collect user stats and make charts?

---

<div class="post-metadata">

**Author:** ![ilyam8](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.netdata.cloud/ilyam8/32/134_2.png) [@ilyam8](https://community.netdata.cloud/u/ilyam8)\
**Post date:** [May 13, 2021, 7:25pm UTC](https://community.netdata.cloud/t/user-statistics-for-percona-database/1286/6 "2021-05-13T19:25:53Z")

</div>

If there is an error during user statistics collection [we log it](https://github.com/netdata/go.d.plugin/blob/fb4772c13c3beba5b8d5229dfefe8f62a64c7f6a/modules/mysql/collect.go#L52-L58).

Could you show the full debug output from the very beginning (one full data collection cycle)?

* * *

The output supposed to be big, use `Hide Details` to keep the topic readable.

> **Like this**
>
> This text will be hidden

---

<div class="post-metadata">

**Author:** ![OdysLam](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.netdata.cloud/odyslam/32/98_2.png) [@OdysLam](https://community.netdata.cloud/u/OdysLam)\
**Post date:** [May 14, 2021, 8:44am UTC](https://community.netdata.cloud/t/user-statistics-for-percona-database/1286/7 "2021-05-14T08:44:19Z")

</div>

Actually, instead of using `hide details`, it’s better if you enclose the log in a `code block`.

To do this, simple enclose it in three backticks:

````auto

```(I add this bracket so that it's not rendered as code)
this is code
```(I add this bracket so that it's not rendered as code)

````

---

<div class="post-metadata">

**Author:** ![lars](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.netdata.cloud/lars/32/795_2.png) [@lars](https://community.netdata.cloud/u/lars)\
**Post date:** [October 7, 2022, 2:11pm UTC](https://community.netdata.cloud/t/user-statistics-for-percona-database/1286/8 "2022-10-07T14:11:38Z")

</div>

Latest update works with Percona! (a fix from august 2022)

A developer at my company was actually debugging on the plugin and found the issue, but also found that a docker-compose pull; docker-compose up -d made Netdata work with Percona 😀

---

<div class="post-metadata">

**Author:** ![Christopher\_Akritid1](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.netdata.cloud/christopher_akritid1/32/419_2.png) [@Christopher\_Akritid1](https://community.netdata.cloud/u/Christopher_Akritid1)\
**Post date:** [October 7, 2022, 2:33pm UTC](https://community.netdata.cloud/t/user-statistics-for-percona-database/1286/9 "2022-10-07T14:33:47Z")

</div>

Well, what was the issue? You do know how to build up suspense… 😃

---

<div class="post-metadata">

**Author:** ![ilyam8](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.netdata.cloud/ilyam8/32/134_2.png) [@ilyam8](https://community.netdata.cloud/u/ilyam8)\
**Post date:** [October 7, 2022, 2:40pm UTC](https://community.netdata.cloud/t/user-statistics-for-percona-database/1286/10 "2022-10-07T14:40:02Z")

</div>

The issue was a lack of compatibility with Percona MySQL that was added in [feat(mysql): add Percona MySQL compatibility by ilyam8 · Pull Request #776 · netdata/go.d.plugin · GitHub](https://github.com/netdata/go.d.plugin/pull/776)

---

<div class="post-metadata">

**Author:** ![lars](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.netdata.cloud/lars/32/795_2.png) [@lars](https://community.netdata.cloud/u/lars)\
**Post date:** [October 7, 2022, 3:17pm UTC](https://community.netdata.cloud/t/user-statistics-for-percona-database/1286/11 "2022-10-07T15:17:21Z")

</div>

It’s working great! Now I just need to figure out how to make health checks/alerts on 200+ users usage. I hope there’s a smart way 😌
