GCP Compute Engine¶
Collect Metrics for GCP Compute Engine virtual machines, including CPU, memory, disk, and network resources
Configuration¶
Install Func¶
It is recommended to activate the TrueWatch integration - Extensions - DataFlux Func (Automata): all prerequisites are automatically installed. Please proceed with the script installation.
For self-deploying Func, refer to Self-deploying Func
Install Script¶
-
Log in to the Func console, click on 【Script Market】, and enter the TrueWatch script market. Search for
integration_gcp_gce
. -
Click 【Install】, then input the relevant parameters: account file name, Target Principal, and account name.
-
Click 【Deploy Startup Script】, the system will automatically create a
Startup
script set and configure the corresponding startup scripts. -
After enabling, you can see the corresponding automatic trigger configuration in 「Manage / Automatic Trigger Configuration」. Click 【Execute】 to immediately run it once without waiting for the scheduled time. After a short while, you can check the execution task records and corresponding logs.
Verification¶
- In 「Manage / Automatic Trigger Configuration」, confirm if the corresponding task has the automatic trigger configuration. You can also check the task records and logs for any anomalies.
- In TrueWatch, check if asset information exists in 「Infrastructure / Custom」.
- In TrueWatch, check if there are corresponding monitoring data in 「Metrics」.
Metrics¶
gcp_gce_instance
¶
Metric | Original Metric | Description | Unit |
---|---|---|---|
firewall_dropped_bytes_count | firewall/dropped_bytes_count | Number of bytes dropped by the firewall | Bytes |
firewall_dropped_packets_count | firewall/dropped_packets_count | Number of packets dropped by the firewall | Packets |
instance_cpu_guest_visible_vcpus | instance/cpu/guest_visible_vcpus | Number of virtual CPUs visible to the guest in the instance | CPU count |
instance_cpu_reserved_cores | instance/cpu/reserved_cores | Number of reserved CPU cores in the instance | Cores |
instance_cpu_scheduler_wait_time | instance/cpu/scheduler_wait_time | CPU scheduler wait time in the instance | Seconds |
instance_cpu_usage_time | instance/cpu/usage_time | CPU usage time in the instance | Seconds |
instance_cpu_utilization | instance/cpu/utilization | CPU utilization in the instance | Percentage |
instance_disk_average_io_latency | instance/disk/average_io_latency | Average I/O latency of the instance disk | Milliseconds |
instance_disk_average_io_queue_depth | instance/disk/average_io_queue_depth | Average I/O queue depth of the instance disk | Queue depth |
instance_disk_max_read_bytes_count | instance/disk/max_read_bytes_count | Maximum read bytes of the instance disk | Bytes |
instance_disk_max_read_ops_count | instance/disk/max_read_ops_count | Maximum read operations of the instance disk | Count |
instance_disk_max_write_bytes_count | instance/disk/max_write_bytes_count | Maximum write bytes of the instance disk | Bytes |
instance_disk_max_write_ops_count | instance/disk/max_write_ops_count | Maximum write operations of the instance disk | Count |
instance_disk_performance_status | instance/disk/performance_status | Performance status of the instance disk | Status code |
instance_disk_provisioning_iops | instance/disk/provisioning/iops | Provisioned IOPS of the instance disk | IOPS |
instance_disk_provisioning_size | instance/disk/provisioning/size | Provisioned size of the instance disk | Bytes |
instance_disk_provisioning_throughput | instance/disk/provisioning/throughput | Provisioned throughput of the instance disk | Bytes/second |
instance_disk_read_bytes_count | instance/disk/read_bytes_count | Read bytes of the instance disk | Bytes |
instance_disk_read_ops_count | instance/disk/read_ops_count | Read operations of the instance disk | Count |
instance_disk_write_bytes_count | instance/disk/write_bytes_count | Write bytes of the instance disk | Bytes |
instance_disk_write_ops_count | instance/disk/write_ops_count | Write operations of the instance disk | Count |
instance_integrity_early_boot_validation_status | instance/integrity/early_boot_validation_status | Early boot validation status of the instance integrity | Status code |
instance_integrity_late_boot_validation_status | instance/integrity/late_boot_validation_status | Late boot validation status of the instance integrity | Status code |
instance_memory_balloon_ram_size | instance/memory/balloon/ram_size | RAM size of the instance memory balloon | Bytes |
instance_memory_balloon_ram_used | instance/memory/balloon/ram_used | RAM used by the instance memory balloon | Bytes |
instance_memory_balloon_swap_in_bytes_count | instance/memory/balloon/swap_in_bytes_count | Swap-in bytes of the instance memory balloon | Bytes |
instance_memory_balloon_swap_out_bytes_count | instance/memory/balloon/swap_out_bytes_count | Swap-out bytes of the instance memory balloon | Bytes |
instance_network_received_bytes_count | instance/network/received_bytes_count | Received bytes of the instance network | Bytes |
instance_network_received_packets_count | instance/network/received_packets_count | Received packets of the instance network | Packets |
instance_network_sent_bytes_count | instance/network/sent_bytes_count | Sent bytes of the instance network | Bytes |
instance_network_sent_packets_count | instance/network/sent_packets_count | Sent packets of the instance network | Packets |
instance_uptime | instance/uptime | Uptime of the instance | Seconds |
instance_uptime_total | instance/uptime_total | Total uptime of the instance | Seconds |
gcp_vpc_network
¶
Metric | Original Metric | Description | Unit |
---|---|---|---|
quota_instances_per_vpc_network_limit | quota/instances_per_vpc_network/limit | Quota limit of instances per VPC network | Instances |
quota_instances_per_vpc_network_usage | quota/instances_per_vpc_network/usage | Quota usage of instances per VPC network | Instances |
quota_static_routes_per_vpc_network_limit | quota/static_routes_per_vpc_network/limit | Quota limit of static routes per VPC network | Routes |
quota_static_routes_per_vpc_network_usage | quota/static_routes_per_vpc_network/usage | Quota usage of static routes per VPC network | Routes |
quota_subnet_ranges_per_peering_group_limit | quota/subnet_ranges_per_peering_group/limit | Quota limit of subnet ranges per peering group | Ranges |
quota_subnet_ranges_per_peering_group_usage | quota/subnet_ranges_per_peering_group/usage | Quota usage of subnet ranges per peering group | Ranges |
gcp_compute_operation_type
¶
Metric | Original Metric | Description | Unit |
---|---|---|---|
quota_concurrent_global_concurrent_operations_limit | quota/concurrent/global_concurrent_operations/limit | Quota limit of concurrent global concurrent operations | Operations |
quota_concurrent_global_concurrent_operations_usage | quota/concurrent/global_concurrent_operations/usage | Quota usage of concurrent global concurrent operations | Operations |
Objects¶
The collected GCP Compute Engine object data structure can be viewed in 「Infrastructure - Custom」.
[{
"fields": {
"disks": "",
"labels": "{\"goog-ops-agent-policy\": \"v2-x86-template-1-4-0\"}",
"machine_info": "",
"message": "",
"network_interfaces": "",
"scheduling": "",
"service_accounts": "",
"status": "RUNNING",
"tags": "{\"fingerprint\": \"42WmSpBxxxx=\"}"
},
"measurement": "gcp_gce_instance",
"tags": {
"account_name": "liujuan",
"cloud_provider": "gcp",
"instance_id": "41419888103617xxxx",
"instance_name": "instance-20250402-xxxx",
"instance_type": "e2-medium",
"name": "//compute.googleapis.com/projects/df-func-453606/zones/us-central1-c/instances/instance-20250402-xxxx",
"project_id": "df-func-453606",
"project_name": "df-func",
"public_ipaddress": "xx.xx.xx.xx",
"region_id": "us-central1",
"resource_name": "//compute.googleapis.com/projects/df-func-453606/zones/us-central1-c/instances/instance-20250402-xxxx",
"zone": "us-central1-c"
}
}]
Note: The fields in
tags
andfields
may change with subsequent updatesTip 1: The
account_name
value is the name and serves as the unique identifier. ```