Register a MySQL instance running in the Google Cloud Platform
The following sections provide instructions for using a wizard to register a MySQL instance running in the Google Cloud Platform for monitoring with DPA.
Alternatively, you can use mass registration to registrations to register multiple database instances, or you can register database instances using scripts that call the DPA API.
Task 1: Create the monitoring user
Complete the following steps to create the user that DPA will use to monitor the MySQL database instance.
- Create the DPA monitoring user through the Google Cloud Platform. For more information, see Create a user in the Cloud SQL documentation.
-
Run the following commands to grant the monitoring user the privileges required for monitoring:
GRANT SELECT ON performance_schema.* TO 'dpa_user'@'%';
GRANT UPDATE ON performance_schema.* TO 'dpa_user'@'%';
GRANT PROCESS ON *.* TO 'dpa_user'@'%';
GRANT SELECT ON *.* TO 'dpa_user'@'%';
-
Run the following commands to grant the monitoring user the privileges required to enable the retrieval of query execution plans:
GRANT INSERT ON *.* TO 'dpa_user'@'%';
GRANT UPDATE ON *.* TO 'dpa_user'@'%';
GRANT DELETE ON *.* TO 'dpa_user'@'%';
Task 2: Register the database instance
- In the upper-left corner of the DPA home page, click Register DB Instance for Monitoring.
- Under Google Cloud SQL, select Cloud SQL for MySQL. Then click Next.
-
Complete the Connection information panel:
-
Enter the host name or IP address of the database instance.
-
Enter the port number.
-
Enter the user name and password of the monitoring user created previously. Or, if DPA is configured to use CyberArk, enter the CyberArk credentials query for the monitoring user.
-
Click Next.
DPA validates the connection information and the privileges of the monitoring user.
-
-
Specify the following Instance Options.
The instance name and group membership can be changed after registration.
-
Enter the name that DPA will display to identify this database instance.
The Display name field defaults to the name retrieved from the database instance.
-
(Optional) If you have manually created instance groups, you can assign this database instance to one of the groups.
If no manual groups exist, this option is not shown.
-
(Optional) If you have existing alert groups, you can assign this database instance to one or more groups.
If no alert groups exist, or the existing groups do not match this instance's database type, this option is not shown.
-
Click Next.
-
-
Review the information on the Summary page. Click Back if you need to make changes. When the information is correct, click Register.
Task 3: Set up SSL communication for Cloud SQL for MySQL instances (Optional)
If you want to use SSL communication for a Cloud SQL for MySQL instance, use the Google Cloud SQL Auth proxy to enable it. Run the Google Cloud SQL Auth proxy for that database instance on the DPA server to create a secure tunnel between DPA and the Cloud SQL for MySQL instance. For more information, see About the Cloud SQL Auth proxy.
MySQL monitored database requirements
SolarWinds recommends the following settings to provide the best monitoring capabilities for MySQL monitored database instances.
MySQL Performance Schema
The Performance Schema monitors server events and collects performance data. If the Performance Schema is not enabled, DPA provides limited data. Monitoring with the Performance Schema disabled excludes the following data:
- All instrumented wait events
- All wait operations
- All file wait time, broken out by file
- All object wait time, broken out by index and table
- SQL statistics
- Performance-schema dependent alerts
The Performance Schema must be enabled at server startup. In MySQL versions 5.6.6 and later, the Performance Schema is enabled by default.
Global Instrumentation and Thread Instrumentation
Global Instrumentation and Thread Instrumentation must be enabled in the Performance Schema configuration. Disabling these instruments has the same effect as disabling the Performance Schema.
By default, DPA enables these instruments in the configuration. However, if you select the Leave As Is option for Performance Schema setup, you must verify that Global Instrumentation and Thread Instrumentation are enabled in the existing Performance Schema configuration.
show_compatibility_56 system variable
If the monitored database instance is MySQL 5.7.6 or later, SolarWinds recommends turning on the show_compatibility_56
system variable. If this variable is on, DPA can collect data for all metrics.
If this variable is off and the Performance Schema is enabled, DPA cannot collect data for the following metrics:
- Selects
- Inserts
- Updates
- Deletes
The scripts are not supported under any SolarWinds support program or service. The scripts are provided AS IS without warranty of any kind. SolarWinds further disclaims all warranties including, without limitation, any implied warranties of merchantability or of fitness for a particular purpose. The risk arising out of the use or performance of the scripts and documentation stays with you. In no event shall SolarWinds or anyone else involved in the creation, production, or delivery of the scripts be liable for any damages whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business information, or other pecuniary loss) arising out of the use of or inability to use the scripts or documentation.