It is possible to use PMM for monitoring Azure database instances like other remote instances. In this case, the PMM Client is not installed on the host where the database server is deployed. By using the PMM web interface, you connect to the Azure DB instance. Discovery is not yet implemented in PMM but it is possible to add known instances by providing the connection parameters.
First of all, ensure that there is the minimal latency between PMM Server and the Azure instance.
Second, add a firewall rule to enable access from PMM Client like this:
Setting up a MySQL instance¶
Query Analytics requires you to configure Performance Schema as the query source, because the slow query log is stored on the Azure side, and QAN agent is not able to read it. Enable the
performance_schema option under
Parameter Groups in Amazon RDS.
When adding a monitoring instance for Azure, specify a unique name to distinguish it from the local MySQL instance. If you do not specify a name, it will use the client’s host name.
pmm user with the following privileges on the Amazon RDS instance that you want to monitor:
GRANT SELECT, PROCESS, REPLICATION CLIENT ON *.* TO 'pmm'@'%' IDENTIFIED BY 'pass' WITH MAX_USER_CONNECTIONS 10; GRANT SELECT, UPDATE, DELETE, DROP ON performance_schema.* TO 'pmm'@'%';
Adding an Azure Instance¶
Follow the instructions for remotes instances explained here.
and be sure to set Performance Schema as the query collection method for Query Analytics.
MariaDB up to version 10.2 works out of the box but starting with MariaDB 10.3 instrumentation is disabled by default and cannot be enabled since there is no SUPER role in Azure-MariaDB. So, it is not possible to run the required queries to enable instrumentation. Monitoring will work but Query Analytics won’t receive any query data.
For PostgreSQL follow the same methods used for MySQL and MariaDB and enable
track_io_timing in the instance configuration to enable Query Analytics.
For Query Analytics, set the server parameter:
pg_stat_statements.track = all
- Page updated 2021-04-06