GCP logs and metrics.Your agent can inspect the current setup, prepare the connection and test access. You choose the account and resource scope, approve provider consent when needed, and authorize any required grants.
Connect Google Cloud so Struct Agent can query logs and metrics for the selected projects. Use the catalog’s grant instructions and verify access to the intended resources.Use the catalog’s current fields, choices and permission requirements. Reuse an existing healthy connection instead of creating a duplicate.An authorized operator runs the generated provider commands after checking the account and scope. Printing them does not apply grants. Preserve generated identifiers (such as an AWS External ID or Snowflake key-pair ID), then run the returned connection command with the real values.Inspect
Replace the values in angle brackets.Permission catalog version
Inspect access and existing connections
Use a claimed workspace with permission to configure connections.Connect with the CLI
Supply credentials from approved secret storage throughGCP_SERVICE_ACCOUNT_KEY. The catalog describes which are needed for the selected authentication method. Do not put literal secrets in shell arguments or chat.Print the setup material first:Verify and recover
Use the returned connection ID:ok, health and missing permissions, not only the exit code. struct connections grant-command CONNECTION_ID prints repair instructions where supported; have an authorized operator apply them. For expired OAuth links, start the connection command again and use the new link. Do not reconnect to a different account silently.Verify a bounded operation for the requested job. Connection health proves checked access; it does not prove telemetry arrival, an investigation or alert delivery.What Struct reads
Cloud Logging entries filtered by resource, severity, and time, including GKE and Cloud Run logs, plus Cloud Monitoring metrics.PromQL and Managed Service for Prometheus
Struct uses your existing Google Cloud connection to query PromQL in the connected project’s metrics scope. PromQL supports native Cloud Monitoring metrics as well as Prometheus metrics; no additional Prometheus connection or token is needed. The existing Monitoring read and alert-policy roles cover these operations.Struct can preserve PromQL evidence, run watches, and manage native PromQL alert policies. Each PromQL policy has one condition; multiple signals use separate policies. Kubernetes-managed Rules, ClusterRules, and GlobalRules are a separate inventory, inspected only through configured Kubernetes connections. Inaccessible cluster inventories are reported as uninspected.Permissions
The service account needs Cloud Asset Viewer, Service Usage Consumer, Logs Viewer and Monitoring Viewer to read, plus Monitoring AlertPolicy Editor, Monitoring NotificationChannel Editor and Logs Configuration Writer for Auto Monitors to create alert policies. Optionally, Cloud Run Viewer, Compute Viewer, Kubernetes Engine Cluster Viewer and Cloud SQL Viewer let Struct confirm deleted resources. The setup command grants all eleven and enables the core APIs Struct calls.Infrastructure inventory
List deployed resources through Cloud Asset Inventory.Permissions Struct uses:
cloudasset.assets.listResource, cloudasset.assets.searchAllResources, serviceusage.services.use.Resource configuration
Read resource configuration from Cloud Asset Inventory.Granted by: Cloud Asset Viewer (roles/cloudasset.viewer).Permissions Struct uses: cloudasset.assets.listResource.Metrics
Discover metrics and read time series through Cloud Monitoring filters or PromQL in the connected metrics scope.Granted by: Monitoring Viewer (roles/monitoring.viewer).Permissions Struct uses: monitoring.metricDescriptors.list, monitoring.timeSeries.list, monitoring.monitoredResourceDescriptors.list.Logs
Read application logs, including GKE and Cloud Run logs.Granted by: Logs Viewer (roles/logging.viewer).Permissions Struct uses: logging.logEntries.list.Infrastructure change history
Read Admin Activity and System Event audit logs.Granted by: Logs Viewer (roles/logging.viewer).Permissions Struct uses: logging.logEntries.list.Existing alerts
Read existing alert policies and notification channels.Granted by: Monitoring Viewer (roles/monitoring.viewer).Permissions Struct uses: monitoring.alertPolicies.list, monitoring.alertPolicies.get, monitoring.notificationChannels.list.Manage monitoring
Create and maintain the alert policies, log-based metrics and the notification channel that delivers alerts to Struct.Permissions Struct uses:
monitoring.alertPolicies.create, monitoring.alertPolicies.update, monitoring.alertPolicies.delete, monitoring.notificationChannels.create, logging.logMetrics.create, logging.logMetrics.get, logging.logMetrics.update, logging.logMetrics.delete.Confirm deleted resources
Confirm that a Cloud Run service, Compute Engine instance, GKE cluster or Cloud SQL instance was deleted. Only needed if you want deleted resources to leave inventory right away; without these, Struct keeps them until it can confirm.Permissions Struct uses:
run.services.get, compute.instances.get, container.clusters.get, cloudsql.instances.get.- Struct’s core APIs are Cloud Asset, Cloud Resource Manager, Cloud Monitoring and Cloud Logging. The setup and grant commands enable them with
gcloud services enable cloudasset.googleapis.com cloudresourcemanager.googleapis.com monitoring.googleapis.com logging.googleapis.com --project <project-id>. If one is disabled, the permission check marks the reads that go through it as unverified and names the disabled API. Auto Monitors write access is checked from IAM permissions only, so it can still show verified while an API is disabled. - Confirming deleted resources also calls the Cloud Run, Compute Engine, Kubernetes Engine and Cloud SQL Admin APIs (
run.googleapis.com,compute.googleapis.com,container.googleapis.com,sqladmin.googleapis.com). The setup command does not enable them. Each is already on in a project that uses that service; if one is off, Struct keeps that kind of resource in inventory until it can confirm the deletion. - Whoever runs the setup or grant command needs
serviceusage.services.enablein the project to enable the APIs (for example the Service Usage Admin role) andresourcemanager.projects.setIamPolicyto grant the roles (for example Project IAM Admin). If enabling an API fails, the command stops before granting any role and exits non-zero.
How to grant
Enable the APIs and grant the roles
Enable the APIs and grant the roles
2026-11-04.1. See permission changes.