Step 2: Install the Collector
To continue, we need to know where you'd like to install the pganalyze collector.
The collector needs to run on a virtual machine or container and be able to reach your Google Cloud SQL or AlloyDB database.
If you used IAM Authentication to create a monitoring user using a service account, see the section below before installing the collector.
Set up VM for IAM Authentication
If you used IAM Authentication to create a monitoring user using a service account, you'll need to associate the service account to the VM first.
To keep things simple and secure, we recommend assigning the service account to the VM. To do so, navigate to your virtual machine.
If your virtual machine is running, you will need to stop it to change the associated service account. Then, edit the VM instance details, and set the "Service account" setting to the just-created service account. Now, start the VM again.
Local processes on the VM, such as the pganalyze collector, can now access APIs through the service account.
If you choose "Use credential file", note the path to the key file so that it can be used in the later step of configuring the collector.
Once you associate the service account to the VM, it is important to check access scopes on the VM instance.
Check if it's properly set to cloud-platform
(or "Allow full access to all Cloud APIs" in the Google Cloud Console, in the API and identity management section).
If not, follow the documentation to update the access scope to be cloud-platform
.
Couldn't find what you were looking for or want to talk about something specific?
Start a conversation with us →