User Statistics for Percona database

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?

2 Likes

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?

@ilyam8 what do you think?

1 Like

Hi, guys :wave:

The quick answer - running the plugin in the debug mode will tell us the problem.

2 Likes

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

1 Like

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

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?

1 Like

If there is an error during user statistics collection we log it.

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

1 Like

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:


```(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)

1 Like

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 :grinning:

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

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

1 Like

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 :relaxed: