Notice: We've updated our Privacy Policy, effective November 14, 2024.

Step 3: Install the Collector

In this step we'll install the collector which sends statistics information to pganalyze.

Set up Managed Identity

To start, we need to create a new user-assigned Managed Identity through the Azure Portal.

After the Managed Identity is created, assign it to your virtual machine by going to "Security", "Identity", "User assigned" and clicking "Add user assigned managed identity":

Screenshot of Virtual Machine Identity configuration in Azure Portal

Now the pganalyze collector running inside the virtual machine will be able to call Azure REST APIs using the Managed Identity.

Grant Access to Database

Next, grant access to the DB instance by assigning the role with the created Managed Identity. Go to the DB instance's page in the Azure Portal and select Access Control (IAM). Click "Add role assignment", then choose the "Monitoring Reader" role. Next, assign access to the created Managed Identity.

Screenshot of adding role assignment to the DB instance in Azure Portal 1Screenshot of adding role assignment to the DB instance in Azure Portal 2

This allows the collector to view the DB instance information, as well as obtain the metrics like CPU usage.

If you are using Azure Cosmos DB for PostgreSQL Cluster, note that cluster-level access control is not supported. As a workaround, grant access at the resource group level instead.

Install the collector

We recommend running our install script to automatically detect your platform and install the correct package:

curl https://packages.pganalyze.com/collector-install.sh | bash
Repository Signing Key Fingerprint: C09B 2CAB 0DB3 78F6 E7FD 93F1 0E6D EC71 A2B5 F2F9

Alternately, you can follow the manual install instructions.

Continue to Step 4: Configure the Collector

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