Collection from `runtime_mysql_servers` table requires admin privileges

Description

Hi,

In proxysql_exporter the  "-collect.runtime_mysql_servers" is disabled in default but in PMM we enable it to collect more data:

https://github.com/percona/pmm-managed/blob/5b2db2321507238d8ca61aeef85c952e232f2d96/services/agents/proxysql.go#L59

In a recent change in the documentation (https://github.com/percona/pmm-doc/pull/691) says that pmm-client can use the read_only `stats` user in proxysql. The exporter can start and collect most of the metrics but in the error log we can see constant errors:

That user does not have access to the `runtime_mysql_servers` table.

At this point because the collection is enabled in default I would says our proxysql exporter is not working 100% well. 

Options:

1) Change back the documentation and accept that we need admin privileges.

2) If read_only stats user is used, disable `runtime_mysql_servers` collection automatically.

3) Give the choice to the customers to decide if they need those metrics or not.

 

How to test

None

How to document

None

Smart Checklist

Activity

Lalit Choudhary April 6, 2022 at 2:29 PM

Hi Tibor,

Thank you for the report.

Details

Assignee

Reporter

Priority

Components

Needs QA

Yes

Needs Doc

Yes

Affects versions

Smart Checklist

Created February 15, 2022 at 10:40 AM
Updated August 27, 2024 at 12:38 PM