Atatus monitors SQL Server on Google Cloud SQL, collecting key data like query metrics, execution plans, and events. Because Google Cloud SQL does not allow direct host access, the Atatus Infra Agent runs on a separate host (typically a GCE VM in the same VPC) that can connect to your Cloud SQL instance.

Before You Begin

1. Grant the Agent Access

Create a SQL login for the Atatus Infra Agent and assign the required permissions. On Cloud SQL the default admin user is sqlserver; connect as that role to run the following statements.
Google Cloud SQL does not permit granting CONNECT ANY DATABASE. You must create the atatus user explicitly in each target database.
For each application database, run:
For SQL Server Agent Jobs monitoring (SQL Server 2016+), grant the same access to msdb:

2. Configure the Atatus Agent

Step 1: Configure the SQL Server Integration

Edit the /etc/atatus-infra-agent/conf.d/sqlserver.d/sqlserver.yml configuration file in your Atatus Agent installation directory:
Replace <CLOUD_SQL_INSTANCE_IP> with your Cloud SQL instance’s private/public IP, or 127.0.0.1 if connecting through the Cloud SQL Auth Proxy.

Step 2: Restart the Atatus Infra Agent


Enable Schema Collection for SQL Server 2017+ (Optional)

Atatus Agent can collect schema information from SQL Server 2017 and above.

Requirements

  • Agent v3.4.0 or higher
  • collect_database_info: true
  • collect_settings: true
  • Use auto_discovery: true to auto-detect all databases

Configuration Example


Collect Metrics Using Custom Queries (Optional)

You can collect custom metrics from SQL Server using the custom_queries option in your configuration.

Configuration Example