dt-obs-gcp
GCP cloud resources including Compute Engine, GKE, Cloud Run, Pub/Sub, VPC networking, DNS, IAM, Secret Manager, and monitoring. Monitor GCP infrastructure, analyze resource usage, audit security posture, and manage organizational hierarchy across projects and folders.
By dynatrace · 1,391 installs
npx skills add dynatrace/dynatrace-for-ai --skill dt-obs-gcp
Source repository · Upstream listing
GCP Cloud Infrastructure
Monitor and analyze GCP resources using Dynatrace Smartscape and DQL. Query GCP services, manage organizational hierarchy, audit security posture, and track resource ownership across your GCP infrastructure.
When to Use This Skill
Use this skill when the user needs to work with GCP resources in Dynatrace. Load the reference file for the task type:
Task File to load
Inventory and topology queries (no additional file — use core patterns above)
Compute Engine instances, machine types, IP addresses Load references/compute instances.md
GKE clusters, node pools, pods, deployments, services, RBAC Load references/kubernetes gke.md
Cloud Run services, revisions, executions Load references/serverless containers.md
VPC networks, subnets, routes, DNS records Load references/networking dns.md
Pub/Sub topics Load references/messaging pubsub.md
IAM service accounts, roles, Secret Manager Load references/iam security.md
Monitoring dashboards, logging, saved queries Load references/monitoring logging.md
GCP projects, regions, organizational hierarchy Load references/resource management.md
Resource ownership, GCP labels, organizational structure Load references/resource ownership.md
Core Concepts
Entity Types
GCP resources use the GCP prefix and can be queried using the smartscapeNodes function. All GCP entities are automatically discovered and modeled in Dynatrace Smartscape.
Compute: GCP COMPUTE GOOGLEAPIS COM INSTANCE , GCP COMPUTE GOOGLEAPIS COM ADDRESS
Networking: GCP COMPUTE GOOGLEAPIS COM NETWORK , GCP COMPUTE GOOGLEAPIS COM SUBNETWORK , GCP COMPUTE GOOGLEAPIS COM ROUTE , GCP DNS GOOGLEAPIS COM RESOURCERECORDSET
Kubernetes (GKE): GCP K8S IO POD , GCP K8S IO NODE , GCP K8S IO SERVICE , GCP K8S IO SERVICEACCOUNT , GCP K8S IO PERSISTENTVOLUMECLAIM , GCP APPS K8S IO DEPLOYMENT , GCP APPS K8S IO STATEFULSET , GCP CONTAINER GOOGLEAPIS COM NODEPOOL , GCP RBAC AUTHORIZATION K8S IO CLUSTERROLEBINDING , GCP RBAC AUTHORIZATION K8S IO ROLEBINDING
Serverless: GCP RUN GOOGLEAPIS COM SERVICE , GCP RUN GOOGLEAPIS COM REVISION , GCP RUN GOOGLEAPIS COM EXECUTION
IAM & Security: GCP IAM GOOGLEAPIS COM SERVICEACCOUNT , GCP IAM GOOGLEAPIS COM ROLE , GCP SECRETMANAGER GOOGLEAPIS COM SECRETVERSION
Messaging: GCP PUBSUB GOOGLEAPIS COM TOPIC
Monitoring: GCP MONITORING GOOGLEAPIS COM DASHBOARD , GCP LOGGING GOOGLEAPIS COM SAVEDQUERY
Infrastructure: GCP REGION
Common GCP Fields
All GCP entities include:
gcp.project.id — GCP project identifier
gcp.region — GCP region (e.g., us central1)
gcp.zone — GCP zone (e.g., us central1 a)
gcp.organization.id — GCP organization identifier
gcp.resource.name — Resource name
gcp.resource.type — Resource type identifier
gcp.asset.type — GCP asset type
gcp.object — JSON blob containing full resource configuration
GCP Organizational Hierarchy
GCP resources are organized in a hierarchy:
Organization — Top level container ( gcp.organization.id )
Folder — Logical grouping within an organization
Project — Resource container ( gcp.project.id )
Region/Zone — Physical location ( gcp.region , gcp.zone )
Entity Naming Convention
GCP entity types follow the pattern GCP <SERVICE API <RESOURCE :
Service API maps to the Google API domain (e.g., compute.googleapis.com → COMPUTE GOOGLEAPIS COM )
Resource is the specific resource type (e.g., INSTANCE , NETWORK )
Examples:
GCP COMPUTE GOOGLEAPIS COM INSTANCE — Compute Engine VM
GCP K8S IO POD — GKE pod
GCP RUN GOOGLEAPIS COM SERVICE — Cloud Run service
Query Patterns
All GCP queries build on four core patterns. Master these and adapt them to any entity type.
Pattern 1: Resource Discovery
List resources by type, filter by project/region/zone, summarize counts:
To list all GCP resource types, replace with "GCP " and add summarize count = count(), by: {type} sort count desc . Add filters like filter gcp.project.id == "<PROJECT ID " or filter gcp.region == "<REGION " to scope results.
Pattern 2: Configuration Parsing
Parse gcp.object JSON for detailed configuration fields:
GCP configuration fields are nested under gcpjson[configuration][resource][...] for primary resource attributes and gcpjson[configuration][additionalAttributes][...] for extended properties.
Pattern 3: Relationship Traversal
Follow relationships between resources:
GCP entities use " " as the relationship name in traversals because GCP entities do not have named relationship types. Use fieldsKeep to carry fields through traversals and dt.traverse.history[ N] to access ancestor fields.
Pattern 4: Label Based Ownership
Group resources by GCP labels for ownership and organizational tracking:
GCP labels are exposed via the tags:gcp labels field and must be accessed using backtick syntax. Replace "GCP " with a specific type to scope to one service.
Reference Guide
Load reference files for detailed queries when the core patterns above need service specific adaptation.
Reference When to load Key content
[compute instances.md](references/compute instances.md) Compute Engine VMs, machine types, IP addresses, disks Instance inventory, machine type distribution, status checks
[kubernetes gke.md](references/kubernetes gke.md) GKE clusters, node pools, pods, deployments, services, RBAC Cluster topology, workload distribution, RBAC bindings
[serverless containers.md](references/serverless containers.md) Cloud Run services, revisions, executions Service inventory, revision tracking, execution analysis
[networking dns.md](references/networking dns.md) VPC networks, subnets, routes, DNS records Network topology, subnet analysis, route tables, DNS record sets
[messaging pubsub.md](references/messaging pubsub.md) Pub/Sub topics Topic inventory, messaging topology
[iam security.md](references/iam security.md) IAM service accounts, roles, Secret Manager Service account audit, role analysis, secret version tracking
[monitoring logging.md](references/monitoring logging.md) Monitoring dashboards, logging, saved queries Dashboard inventory, saved query analysis
[resource management.md](references/resource management.md) GCP projects, regions, organizational hierarchy Project inventory, region distribution, hierarchy mapping
[resource ownership.md](references/resource ownership.md) Resource ownership, GCP labels, organizational structure Label based grouping, project level summaries, chargeback
Best Practices
Configuration Parsing
1. Always parse gcp.object with JSON parser: parse gcp.object, "JSON:gcpjson"
2. Access primary resource attributes via gcpjson[configuration][resource][...]
3. Access extended properties via gcpjson[configuration][additionalAttributes][...]
4. Check for null values after parsing with isNotNull()
GCP Hierarchy
1. Organization → Folder → Project → Region/Zone
2. Use gcp.project.id as the primary scoping filter
3. Use gcp.organization.id for cross project queries
4. Use gcp.region and gcp.zone for location based analysis
Entity Naming
1. Entity types follow the GCP <SERVICE API <RESOURCE format
2. Service API maps to the Google API domain with underscores replacing dots and hyphens
3. Use specific entity types (avoid "GCP " wildcards when possible)
Labels
1. GCP labels must be accessed via backtick syntax: tags:gcp labels
2. Use isNotNull( tags:gcp labels ) for label based filtering
3. Track label coverage with summarize operations
Relationship Traversal
1. Use " " as the relationship name — GCP entities do not have named relationship types
2. Use fieldsKeep to maintain important fields through traversal
3. Access traversal history with dt.traverse.history[ N]
4. Complex topologies may require multiple traverse operations
Limitations and Notes
Smartscape Limitations
Smartscape data reflects the most recent scan; there may be a delay between GCP changes and Dynatrace visibility
Not all GCP services are represented as entity types
Some configuration fields may be null depending on resource setup
Resource discovery depends on GCP integration configuration
GCP Specific Notes
GCP labels must be accessed via backtick syntax: tags:gcp labels
GCP entities use " " for relationship traversal (no named relationship types)
GCP object configuration requires parsing with parse gcp.object, "JSON:gcpjson"
Configuration fields nest under gcpjson[configuration][resource][...] (differs from AWS pattern)
General Tips
Filter early by project and region for better performance
Use isNotNull() and isNull() for graceful null handling
Combine project and region filters for large environments
Use countDistinct() for unique resource counts
Limit results with limit N during exploration