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:
smartscapeNodes "GCP_COMPUTE_GOOGLEAPIS_COM_INSTANCE"
| fields name, gcp.project.id, gcp.region, gcp.zone, gcp.resource.name
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:
smartscapeNodes "GCP_COMPUTE_GOOGLEAPIS_COM_INSTANCE"
| parse gcp.object, "JSON:gcpjson"
| fieldsAdd machineType = gcpjson[configuration][resource][machineType],
status = gcpjson[configuration][resource][status]
| fields name, gcp.project.id, machineType, status
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:
smartscapeNodes "GCP_COMPUTE_GOOGLEAPIS_COM_INSTANCE"
| traverse "*", "GCP_COMPUTE_GOOGLEAPIS_COM_SUBNETWORK"
| fields name, gcp.project.id
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:
smartscapeNodes "GCP_*"
| filter isNotNull(`tags:gcp_labels`)
| fields name, gcp.project.id, `tags:gcp_labels`
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 |
Compute Engine VMs, machine types, IP addresses, disks |
Instance inventory, machine type distribution, status checks |
| kubernetes-gke.md |
GKE clusters, node pools, pods, deployments, services, RBAC |
Cluster topology, workload distribution, RBAC bindings |
| serverless-containers.md |
Cloud Run services, revisions, executions |
Service inventory, revision tracking, execution analysis |
| networking-dns.md |
VPC networks, subnets, routes, DNS records |
Network topology, subnet analysis, route tables, DNS record sets |
| messaging-pubsub.md |
Pub/Sub topics |
Topic inventory, messaging topology |
| iam-security.md |
IAM service accounts, roles, Secret Manager |
Service account audit, role analysis, secret version tracking |
| monitoring-logging.md |
Monitoring dashboards, logging, saved queries |
Dashboard inventory, saved query analysis |
| resource-management.md |
GCP projects, regions, organizational hierarchy |
Project inventory, region distribution, hierarchy mapping |
| resource-ownership.md |
Resource ownership, GCP labels, organizational structure |
Label-based grouping, project-level summaries, chargeback |
Best Practices
Configuration Parsing
- Always parse
gcp.object with JSON parser: parse gcp.object, "JSON:gcpjson"
- Access primary resource attributes via
gcpjson[configuration][resource][...]
- Access extended properties via
gcpjson[configuration][additionalAttributes][...]
- Check for null values after parsing with
isNotNull()
GCP Hierarchy
- Organization → Folder → Project → Region/Zone
- Use
gcp.project.id as the primary scoping filter
- Use
gcp.organization.id for cross-project queries
- Use
gcp.region and gcp.zone for location-based analysis
Entity Naming
- Entity types follow the
GCP_<SERVICE_API>_<RESOURCE> format
- Service API maps to the Google API domain with underscores replacing dots and hyphens
- Use specific entity types (avoid
"GCP_*" wildcards when possible)
Labels
- GCP labels must be accessed via backtick syntax:
`tags:gcp_labels`
- Use
isNotNull(tags:gcp_labels) for label-based filtering
- Track label coverage with summarize operations
Relationship Traversal
- Use
"*" as the relationship name — GCP entities do not have named relationship types
- Use
fieldsKeep to maintain important fields through traversal
- Access traversal history with
dt.traverse.history[-N]
- 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
1---2name: dt-obs-gcp3description: 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.4license: Apache-2.05---6
7# GCP Cloud Infrastructure
8
9Monitor 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.
10
11## When to Use This Skill
12
13Use this skill when the user needs to work with GCP resources in Dynatrace. Load the reference file for the task type:
14
15| Task | File to load |
16|---|---|
17| Inventory and topology queries | (no additional file — use core patterns above) |
18| Compute Engine instances, machine types, IP addresses | Load `references/compute-instances.md` |
19| GKE clusters, node pools, pods, deployments, services, RBAC | Load `references/kubernetes-gke.md` |
20| Cloud Run services, revisions, executions | Load `references/serverless-containers.md` |
21| VPC networks, subnets, routes, DNS records | Load `references/networking-dns.md` |
22| Pub/Sub topics | Load `references/messaging-pubsub.md` |
23| IAM service accounts, roles, Secret Manager | Load `references/iam-security.md` |
24| Monitoring dashboards, logging, saved queries | Load `references/monitoring-logging.md` |
25| GCP projects, regions, organizational hierarchy | Load `references/resource-management.md` |
26| Resource ownership, GCP labels, organizational structure | Load `references/resource-ownership.md` |
27
28---
29
30## Core Concepts
31
32### Entity Types
33
34GCP resources use the `GCP_*` prefix and can be queried using the `smartscapeNodes` function. All GCP entities are automatically discovered and modeled in Dynatrace Smartscape.
35
36**Compute:** `GCP_COMPUTE_GOOGLEAPIS_COM_INSTANCE`, `GCP_COMPUTE_GOOGLEAPIS_COM_ADDRESS`
37**Networking:** `GCP_COMPUTE_GOOGLEAPIS_COM_NETWORK`, `GCP_COMPUTE_GOOGLEAPIS_COM_SUBNETWORK`, `GCP_COMPUTE_GOOGLEAPIS_COM_ROUTE`, `GCP_DNS_GOOGLEAPIS_COM_RESOURCERECORDSET`
38**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`
39**Serverless:** `GCP_RUN_GOOGLEAPIS_COM_SERVICE`, `GCP_RUN_GOOGLEAPIS_COM_REVISION`, `GCP_RUN_GOOGLEAPIS_COM_EXECUTION`
40**IAM & Security:** `GCP_IAM_GOOGLEAPIS_COM_SERVICEACCOUNT`, `GCP_IAM_GOOGLEAPIS_COM_ROLE`, `GCP_SECRETMANAGER_GOOGLEAPIS_COM_SECRETVERSION`
41**Messaging:** `GCP_PUBSUB_GOOGLEAPIS_COM_TOPIC`
42**Monitoring:** `GCP_MONITORING_GOOGLEAPIS_COM_DASHBOARD`, `GCP_LOGGING_GOOGLEAPIS_COM_SAVEDQUERY`
43**Infrastructure:** `GCP_REGION`
44
45### Common GCP Fields
46
47All GCP entities include:
48- `gcp.project.id` — GCP project identifier
49- `gcp.region` — GCP region (e.g., us-central1)
50- `gcp.zone` — GCP zone (e.g., us-central1-a)
51- `gcp.organization.id` — GCP organization identifier
52- `gcp.resource.name` — Resource name
53- `gcp.resource.type` — Resource type identifier
54- `gcp.asset.type` — GCP asset type
55- `gcp.object` — JSON blob containing full resource configuration
56
57### GCP Organizational Hierarchy
58
59GCP resources are organized in a hierarchy:
60- **Organization** — Top-level container (`gcp.organization.id`)
61- **Folder** — Logical grouping within an organization
62- **Project** — Resource container (`gcp.project.id`)
63- **Region/Zone** — Physical location (`gcp.region`, `gcp.zone`)
64
65### Entity Naming Convention
66
67GCP entity types follow the pattern `GCP_<SERVICE_API>_<RESOURCE>`:
68- Service API maps to the Google API domain (e.g., `compute.googleapis.com` → `COMPUTE_GOOGLEAPIS_COM`)
69- Resource is the specific resource type (e.g., `INSTANCE`, `NETWORK`)
70
71Examples:
72- `GCP_COMPUTE_GOOGLEAPIS_COM_INSTANCE` — Compute Engine VM
73- `GCP_K8S_IO_POD` — GKE pod
74- `GCP_RUN_GOOGLEAPIS_COM_SERVICE` — Cloud Run service
75
76---
77
78## Query Patterns
79
80All GCP queries build on four core patterns. Master these and adapt them to any entity type.
81
82### Pattern 1: Resource Discovery
83
84List resources by type, filter by project/region/zone, summarize counts:
85
86```dql
87smartscapeNodes "GCP_COMPUTE_GOOGLEAPIS_COM_INSTANCE"
88| fields name, gcp.project.id, gcp.region, gcp.zone, gcp.resource.name
89```
90
91To 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.
92
93### Pattern 2: Configuration Parsing
94
95Parse `gcp.object` JSON for detailed configuration fields:
96
97```dql
98smartscapeNodes "GCP_COMPUTE_GOOGLEAPIS_COM_INSTANCE"
99| parse gcp.object, "JSON:gcpjson"
100| fieldsAdd machineType = gcpjson[configuration][resource][machineType],
101 status = gcpjson[configuration][resource][status]
102| fields name, gcp.project.id, machineType, status
103```
104
105GCP configuration fields are nested under `gcpjson[configuration][resource][...]` for primary resource attributes and `gcpjson[configuration][additionalAttributes][...]` for extended properties.
106
107### Pattern 3: Relationship Traversal
108
109Follow relationships between resources:
110
111```dql
112smartscapeNodes "GCP_COMPUTE_GOOGLEAPIS_COM_INSTANCE"
113| traverse "*", "GCP_COMPUTE_GOOGLEAPIS_COM_SUBNETWORK"
114| fields name, gcp.project.id
115```
116
117GCP 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.
118
119### Pattern 4: Label-Based Ownership
120
121Group resources by GCP labels for ownership and organizational tracking:
122
123```dql
124smartscapeNodes "GCP_*"
125| filter isNotNull(`tags:gcp_labels`)
126| fields name, gcp.project.id, `tags:gcp_labels`
127```
128
129GCP 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.
130
131---
132
133## Reference Guide
134
135Load reference files for detailed queries when the core patterns above need service-specific adaptation.
136
137| Reference | When to load | Key content |
138|---|---|---|
139| [compute-instances.md](references/compute-instances.md) | Compute Engine VMs, machine types, IP addresses, disks | Instance inventory, machine type distribution, status checks |
140| [kubernetes-gke.md](references/kubernetes-gke.md) | GKE clusters, node pools, pods, deployments, services, RBAC | Cluster topology, workload distribution, RBAC bindings |
141| [serverless-containers.md](references/serverless-containers.md) | Cloud Run services, revisions, executions | Service inventory, revision tracking, execution analysis |
142| [networking-dns.md](references/networking-dns.md) | VPC networks, subnets, routes, DNS records | Network topology, subnet analysis, route tables, DNS record sets |
143| [messaging-pubsub.md](references/messaging-pubsub.md) | Pub/Sub topics | Topic inventory, messaging topology |
144| [iam-security.md](references/iam-security.md) | IAM service accounts, roles, Secret Manager | Service account audit, role analysis, secret version tracking |
145| [monitoring-logging.md](references/monitoring-logging.md) | Monitoring dashboards, logging, saved queries | Dashboard inventory, saved query analysis |
146| [resource-management.md](references/resource-management.md) | GCP projects, regions, organizational hierarchy | Project inventory, region distribution, hierarchy mapping |
147| [resource-ownership.md](references/resource-ownership.md) | Resource ownership, GCP labels, organizational structure | Label-based grouping, project-level summaries, chargeback |
148
149---
150
151## Best Practices
152
153### Configuration Parsing
1541. Always parse `gcp.object` with JSON parser: `parse gcp.object, "JSON:gcpjson"`
1552. Access primary resource attributes via `gcpjson[configuration][resource][...]`
1563. Access extended properties via `gcpjson[configuration][additionalAttributes][...]`
1574. Check for null values after parsing with `isNotNull()`
158
159### GCP Hierarchy
1601. Organization → Folder → Project → Region/Zone
1612. Use `gcp.project.id` as the primary scoping filter
1623. Use `gcp.organization.id` for cross-project queries
1634. Use `gcp.region` and `gcp.zone` for location-based analysis
164
165### Entity Naming
1661. Entity types follow the `GCP_<SERVICE_API>_<RESOURCE>` format
1672. Service API maps to the Google API domain with underscores replacing dots and hyphens
1683. Use specific entity types (avoid `"GCP_*"` wildcards when possible)
169
170### Labels
1711. GCP labels must be accessed via backtick syntax: `` `tags:gcp_labels` ``
1722. Use `isNotNull(`tags:gcp_labels`)` for label-based filtering
1733. Track label coverage with summarize operations
174
175### Relationship Traversal
1761. Use `"*"` as the relationship name — GCP entities do not have named relationship types
1772. Use `fieldsKeep` to maintain important fields through traversal
1783. Access traversal history with `dt.traverse.history[-N]`
1794. Complex topologies may require multiple traverse operations
180
181---
182
183## Limitations and Notes
184
185### Smartscape Limitations
186- Smartscape data reflects the most recent scan; there may be a delay between GCP changes and Dynatrace visibility
187- Not all GCP services are represented as entity types
188- Some configuration fields may be null depending on resource setup
189- Resource discovery depends on GCP integration configuration
190
191### GCP-Specific Notes
192- GCP labels must be accessed via backtick syntax: `` `tags:gcp_labels` ``
193- GCP entities use `"*"` for relationship traversal (no named relationship types)
194- GCP object configuration requires parsing with `parse gcp.object, "JSON:gcpjson"`
195- Configuration fields nest under `gcpjson[configuration][resource][...]` (differs from AWS pattern)
196
197### General Tips
198- Filter early by project and region for better performance
199- Use `isNotNull()` and `isNull()` for graceful null handling
200- Combine project and region filters for large environments
201- Use `countDistinct()` for unique resource counts
202- Limit results with `| limit N` during exploration