Join us for our webinar on June 25th, 10:00am Pacific Time: Postgres plan monitoring and management - register now.

Step 3: Set Up Service Account

If you used IAM Authentication to create a monitoring user using a service account, grant “Pub/Sub Subscriber” permission to that service account and continue to the next step.

Go to “IAM & Admin”, click on “Service accounts” and then “Create Service Account”.

  • Pick a name of your choice, e.g. “pganalyze-collector”
  • Grant “Pub/Sub Subscriber” permission to the service account

We now have two options here:

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 cannot assign the service account to your VM, you can specify credentials directly:

  • Associate a key to the service account
  • Download the private key in JSON format and save on the collector VM
  • Specify the path to the key file as the value for the gcp_credentials_file collector setting

Continue to Step 4: Configure collector


Couldn't find what you were looking for or want to talk about something specific?
Start a conversation with us →