GCP Compute Engine

Compute Engine is the infrastructure-as-a-service component of Google Cloud - virtual machine instances running on the infrastructure Google runs its own products on.

Available solutions

Zabbix version 7.4 7.2 7.0 6.4 6.0
Source: templates/cloud/gcp

GCP Compute Engine Instance by HTTP

Overview

This template is designed to monitor Google Cloud Platform Compute Engine instances by Zabbix.

Requirements

Zabbix version: 7.4 and higher.

Tested versions

This template has been tested on:

  • GCP Compute Engine

Configuration

Zabbix should be configured according to the instructions in the Templates out of the box section.

Setup

This template will be automatically connected to discovered entities with all their required parameters pre-defined.

Macros used

Name Description Default
{$GCP.DATA.TIMEOUT}

A response timeout for an API.

15s
{$GCP.TIME.WINDOW}

Time interval for the data requests.

Supported usage type:

1. The default update interval for most of the items.

2. The minimal time window for the data requested in the Monitoring Query Language REST API request.

5m
{$GCP.PROXY}

Sets HTTP proxy value. If this macro is empty then no proxy is used.

{$HTTP.TLS.VERIFY}

TLS certificate verification for script items: "none" - disabled, "peer" - verify the certificate chain and expiration, "full" - full verification. Any other value enables full verification. To override the setting for this template only, define the macro with the context "GCP Compute Engine Instance", e.g. {$HTTP.TLS.VERIFY:"GCP Compute Engine Instance"}.

full
{$GCE.DISK.NAME.MATCHES}

The filter to include GCP Compute Engine disks by namespace.

.*
{$GCE.DISK.NAME.NOT_MATCHES}

The filter to exclude GCP Compute Engine disks by namespace.

CHANGE_IF_NEEDED
{$GCE.DISK.DEV_TYPE.MATCHES}

The filter to include GCP Compute Engine disks by device type.

.*
{$GCE.DISK.DEV_TYPE.NOT_MATCHES}

The filter to exclude GCP Compute Engine disks by device type.

CHANGE_IF_NEEDED
{$GCE.DISK.STOR_TYPE.MATCHES}

The filter to include GCP Compute Engine disks by storage type.

.*
{$GCE.DISK.STOR_TYPE.NOT_MATCHES}

The filter to exclude GCP Compute Engine disks by storage type.

CHANGE_IF_NEEDED
{$GCE.CPU.UTIL.MAX}

GCP Compute Engine instance CPU utilization threshold.

95
{$GCE.RAM.UTIL.MAX}

GCP Compute Engine instance RAM utilization threshold.

90

Items

Name Description Type Key and additional info
Metrics get

GCP Compute Engine metrics get in raw format.

Script gcp.gce.metrics.get

Preprocessing

  • Check for not supported value: any error

    ⛔️Custom on fail: Discard value

Firewall: Dropped packets

Count of incoming packets dropped by the firewall.

Dependent item gcp.gce.firewall.dropped_packets_count

Preprocessing

  • JSON Path: $.dropped_packets_count

Firewall: Dropped bytes

Count of incoming bytes dropped by the firewall.

Dependent item gcp.gce.firewall.dropped_bytes_count

Preprocessing

  • JSON Path: $.dropped_bytes_count

Guest visible vCPUs

Number of vCPUs visible inside the guest.

For many GCE machine types, the number of vCPUs visible inside the guest is equal to the compute.googleapis.com/instance/cpu/reserved_cores metric.

For shared-core machine types, the number of guest-visible vCPUs differs from the number of reserved cores.

For example, e2-small instances have two vCPUs visible inside the guest and 0.5 fractional vCPUs reserved.

Therefore, for an e2-small instance, compute.googleapis.com/instance/cpu/guest_visible_vcpus has a value of 2 and compute.googleapis.com/instance/cpu/reserved_cores has a value of 0.5.

Dependent item gcp.gce.cpu.guest_visible_vcpus

Preprocessing

  • JSON Path: $.guest_visible_vcpus

Reserved vCPUs

Number of vCPUs reserved on the host of the instance.

Dependent item gcp.gce.cpu.reserved_cores

Preprocessing

  • JSON Path: $.reserved_cores

Scheduler wait time

Wait time is the time a vCPU is ready to run, but unexpectedly not scheduled to run.

The wait time returned here is the accumulated value for all vCPUs.

The time interval for which the value was measured is returned by Monitoring in whole seconds as start_time and end_time.

This metric is only available for VMs that belong to the e2 family or to overcommitted VMs on sole-tenant nodes.

Dependent item gcp.gce.cpu.scheduler_wait_time

Preprocessing

  • JSON Path: $.scheduler_wait_time

    ⛔️Custom on fail: Discard value

CPU usage time

Delta vCPU usage for all vCPUs, in vCPU-seconds.

To compute the per-vCPU utilization fraction, divide this value by (end-start)*N, where end and start define this value's time interval and N is compute.googleapis.com/instance/cpu/reserved_cores at the end of the interval.

This value is reported by the hypervisor for the VM and can differ from agent.googleapis.com/cpu/usage_time, which is reported from inside the VM.

Dependent item gcp.gce.cpu.usage_time

Preprocessing

  • JSON Path: $.usage_time

CPU utilization

Fractional utilization of allocated CPU on this instance.

This metric is reported by the hypervisor for the VM and can differ from agent.googleapis.com/cpu/utilization, which is reported from inside the VM.

Dependent item gcp.gce.cpu.utilization

Preprocessing

  • JSON Path: $.utilization

  • Custom multiplier: 100

Memory size

Total VM memory size.

This metric is only available for VMs that belong to the e2 family; returns empty value for different instance types.

Dependent item gcp.gce.memory.ram_size

Preprocessing

  • JSON Path: $.ram_size

    ⛔️Custom on fail: Discard value

Memory used

Memory currently used in the VM.

This metric is only available for VMs that belong to the e2 family; returns empty value for different instance types.

Dependent item gcp.gce.memory.ram_used

Preprocessing

  • JSON Path: $.ram_used

    ⛔️Custom on fail: Discard value

Memory usage percentage

Memory usage Percentage.

This metric is only available for VMs that belong to the e2 family; returns empty value for different instance types.

Dependent item gcp.gce.memory.ram_pused

Preprocessing

  • JSON Path: $.ram_pused

    ⛔️Custom on fail: Discard value

VM swap in

The amount of memory read into the guest from its own swap space.

This metric is only available for VMs that belong to the e2 family; returns empty value for different instance types.

Dependent item gcp.gce.memory.swap_in_bytes_count

Preprocessing

  • JSON Path: $.swap_in_bytes_count

    ⛔️Custom on fail: Discard value

VM swap out

The amount of memory written from the guest to its own swap space.

This metric is only available for VMs that belong to the e2 family; returns empty value for different instance types.

Dependent item gcp.gce.memory.swap_out_bytes_count

Preprocessing

  • JSON Path: $.swap_out_bytes_count

    ⛔️Custom on fail: Discard value

Network: Received bytes

Count of bytes received from the network without load-balancing.

Dependent item gcp.gce.network.lb.received_bytes_count.false

Preprocessing

  • JSON Path: $.received_bytes_count.false

Network: Received bytes: Load-balanced

Whether traffic was received by an L3 loadbalanced IP address assigned to the VM.

Traffic that is externally routed to the VM's standard internal or external IP address, such as L7 loadbalanced traffic, is not considered to be loadbalanced in this metric.

The value is empty when load-balancing is not used.

Dependent item gcp.gce.network.lb.received_bytes_count.true

Preprocessing

  • JSON Path: $.received_bytes_count.true

    ⛔️Custom on fail: Discard value

Network: Received packets

Count of packets received from the network without load-balancing.

Dependent item gcp.gce.network.lb.received_packets_count.false

Preprocessing

  • JSON Path: $.received_packets_count.false

Network: Received packets: Load-balanced

Whether traffic was received by an L3 loadbalanced IP address assigned to the VM.

Traffic that is externally routed to the VM's standard internal or external IP address, such as L7 loadbalanced traffic, is not considered to be loadbalanced in this metric.

The value is empty when load-balancing is not used.

Dependent item gcp.gce.network.lb.received_packets_count.true

Preprocessing

  • JSON Path: $.received_packets_count.true

    ⛔️Custom on fail: Discard value

Network: Sent bytes

Count of bytes sent over the network without load-balancing.

Dependent item gcp.gce.network.lb.sent_bytes_count.false

Preprocessing

  • JSON Path: $.sent_bytes_count.false

Network: Sent bytes: Load-balanced

Whether traffic was received by an L3 loadbalanced IP address assigned to the VM.

Traffic that is externally routed to the VM's standard internal or external IP address, such as L7 loadbalanced traffic, is not considered to be loadbalanced in this metric.

The value is empty when load-balancing is not used.

Dependent item gcp.gce.network.lb.sent_bytes_count.true

Preprocessing

  • JSON Path: $.sent_bytes_count.true

    ⛔️Custom on fail: Discard value

Network: Sent packets

Count of packets sent over the network without load-balancing.

Dependent item gcp.gce.network.lb.sent_packets_count.false

Preprocessing

  • JSON Path: $.sent_packets_count.false

Network: Sent packets: Load-balanced

Whether traffic was received by an L3 loadbalanced IP address assigned to the VM.

Traffic that is externally routed to the VM's standard internal or external IP address, such as L7 loadbalanced traffic, is not considered to be loadbalanced in this metric.

The value is empty when load-balancing is not used.

Dependent item gcp.gce.network.lb.sent_packets_count.true

Preprocessing

  • JSON Path: $.sent_packets_count.true

    ⛔️Custom on fail: Discard value

Network: Mirrored bytes

The count of mirrored bytes.

Dependent item gcp.gce.network.mirrored_bytes_count

Preprocessing

  • JSON Path: $.mirrored_bytes_count

Network: Mirrored packets

The count of mirrored packets.

Dependent item gcp.gce.network.mirrored_packets_count

Preprocessing

  • JSON Path: $.mirrored_packets_count

Network: Mirrored packets dropped: Out of quota

The count of mirrored packets dropped.

Reason - out of quota.

Dependent item gcp.gce.network.mirr_dropped_packets.out_of_quota

Preprocessing

  • JSON Path: $.out_of_quota

Network: Mirrored packets dropped: Unknown

The count of mirrored packets dropped.

Reason - unknown.

Dependent item gcp.gce.network.mirr_dropped_packets.unknown

Preprocessing

  • JSON Path: $.unknown

Network: Mirrored packets dropped: Invalid

The count of mirrored packets dropped.

Reason - invalid.

Dependent item gcp.gce.network.mirr_dropped_packets.invalid

Preprocessing

  • JSON Path: $.invalid

Integrity: Early boot validation status

The validation status of early boot integrity policy.

Empty value if integrity monitoring isn't enabled.

Dependent item gcp.gce.integrity.early_boot_validation_status

Preprocessing

  • JSON Path: $.early_boot_validation_status

    ⛔️Custom on fail: Discard value

  • JavaScript: The text is too long. Please see the template.

Integrity: Late boot validation status

The validation status of late boot integrity policy.

Empty value if integrity monitoring isn't enabled.

Dependent item gcp.gce.integrity.late_boot_validation_status

Preprocessing

  • JSON Path: $.late_boot_validation_status

    ⛔️Custom on fail: Discard value

  • JavaScript: The text is too long. Please see the template.

Instance uptime

Elapsed time since the VM was started, in seconds.

Dependent item gcp.gce.instance.uptime

Preprocessing

  • JSON Path: $.uptime_total

Instance state

GCP Compute Engine instance state.

HTTP agent gcp.gce.instance.state

Preprocessing

  • JSON Path: $.status

    ⛔️Custom on fail: Set value to: 10

  • JavaScript: The text is too long. Please see the template.

  • Discard unchanged with heartbeat: 10m

Disks get

Disk entities and metrics related to a particular instance.

Script gcp.gce.disks.get

Preprocessing

  • Check for not supported value: any error

    ⛔️Custom on fail: Discard value

Triggers

Name Description Expression Severity Dependencies and additional info
GCP Compute Engine Instance: High CPU utilization

The CPU utilization is too high. The system might be slow to respond.

min(/GCP Compute Engine Instance by HTTP/gcp.gce.cpu.utilization,15m) >= {$GCE.CPU.UTIL.MAX} Average Manual close: Yes
GCP Compute Engine Instance: High memory utilization

RAM utilization is too high. The system might be slow to respond.

min(/GCP Compute Engine Instance by HTTP/gcp.gce.memory.ram_pused,15m) >= {$GCE.RAM.UTIL.MAX} Average
GCP Compute Engine Instance: Instance is in suspended state

The VM is in a suspended state. You can resume the VM or delete it.

last(/GCP Compute Engine Instance by HTTP/gcp.gce.instance.state) = 7 Info Manual close: Yes
GCP Compute Engine Instance: The instance is in repairing state

The VM is being repaired.
Repairing occurs when the VM encounters an internal error or the underlying machine is unavailable due to maintenance.
During this time, the VM is unusable.

last(/GCP Compute Engine Instance by HTTP/gcp.gce.instance.state) = 4 Warning Manual close: Yes
GCP Compute Engine Instance: The instance is in terminated state

The VM is stopped. You stopped the VM, or the VM encountered a failure.

last(/GCP Compute Engine Instance by HTTP/gcp.gce.instance.state) = 5 Average Manual close: Yes
GCP Compute Engine Instance: Failed to get the instance state

Failed to get the instance state.
Check access permissions to GCP API or service account.

last(/GCP Compute Engine Instance by HTTP/gcp.gce.instance.state) = 10 Average Manual close: Yes

LLD rule GCP Compute Engine: Physical disks discovery

Name Description Type Key and additional info
GCP Compute Engine: Physical disks discovery

GCP Compute Engine: Physical disks discovery.

Dependent item gcp.gce.phys.disks.discovery

Preprocessing

  • Discard unchanged with heartbeat: 3h

Item prototypes for GCP Compute Engine: Physical disks discovery

Name Description Type Key and additional info
Disk [{#GCE.DISK.NAME}]: Raw data

Data in raw format for the disk with the name [{#GCE.DISK.NAME}].

Dependent item gcp.gce.quota.single.raw[{#GCE.DISK.NAME}]

Preprocessing

  • JSON Path: $[?(@.disk_name == "{#GCE.DISK.NAME}")].metrics.first()

Disk [{#GCE.DISK.NAME}]: Read bytes

Count of bytes read from [{#GCE.DISK.NAME}] disk.

Dependent item gcp.gce.disk.read_bytes_count[{#GCE.DISK.NAME}]

Preprocessing

  • JSON Path: $.read_bytes_count

Disk [{#GCE.DISK.NAME}]: Read operations

Count of read IO operations from [{#GCE.DISK.NAME}] disk.

Dependent item gcp.gce.disk.read_ops_count[{#GCE.DISK.NAME}]

Preprocessing

  • JSON Path: $.read_ops_count

Disk [{#GCE.DISK.NAME}]: Write bytes

Count of bytes written to {#GCE.DISK.NAME}] disk.

Dependent item gcp.gce.disk.write_bytes_count[{#GCE.DISK.NAME}]

Preprocessing

  • JSON Path: $.write_bytes_count

Disk [{#GCE.DISK.NAME}]: Write operations

Count of write IO operations to [{#GCE.DISK.NAME}] disk.

Dependent item gcp.gce.disk.write_ops_count[{#GCE.DISK.NAME}]

Preprocessing

  • JSON Path: $.write_ops_count

Articles and documentation

+ Propose new article

No se encuentra la integración que necesitas?