For Google Cloud Monitoring you need the following prerequisites:

  1. to create a service account in your Google Cloud account and download the content of the JSON file


    To generate service-account credentials and view the public credentials already created, follow these steps:

    • Open the Service accounts page. When prompted, select a project.
    • Click CREATE SERVICE ACCOUNT.



    • In the CREATE SERVICE ACCOUNT window, type a name for the service account, and select Furnish a new private key. Click Create.
    • When you create a key, your new public/private key pair is generated and downloaded to your machine.

  2. To configure access to your Cloud SQL instance

    Go to the Cloud SQL Instances page in the Google Cloud Console.

    • From the client machine, use What's my IP to see the IP address of the client machine.
    • Copy that IP address.
    • Go to the Cloud SQL Instances page in the Google Cloud Console.
    • Open the instance Overview page, and record the IP address.
    • Select the Connections tab.
    • Under Authorized networks, click Add Network and enter the IP address of the client machine.

      The IP address of the instance and the MySQL client IP address you authorize must be the same IP version: either IPv4 or IPv6.

    • Click Done and then Save at the bottom of the page to save your changes.


Adding your Google Cloud Server

To add your Google Cloud Server to SQL DM for MySQL, you need to follow these steps:

  1. Provide the Host IP, MySQL Username, and Password to register your Google cloud SQL server in SQL DM for MySQL.
  2. Enable System Monitoring and enter the instance name with the content of the private key JSON file. Go to Edit Server > Advanced > System Metrics.
  3. To enable MySQL Error Log monitoring, review the below screenshot:
  4. To enable MySQL Query Log monitoring, review the below screenshot:
  5. To enable GCS Objects, go to the Monitors page, click “+” near Monitors, and select Manage Google Cloud SQL Objects.

  6. You can enable the below Monitors to monitor the Google Cloud SQL Metrics:
    • database/cpu/utilization 
    • database/memory/utilization 
    • database/disk/utilization 
    • database/disk/read_ops_count
    • database/disk/write_ops_count

        

  • No labels