GCP Cloud Run

This template is designed to monitor Google Cloud Platform Cloud Run services using Zabbix.

Available solutions

Zabbix version 8.0
Download

GCP Cloud Run Service by HTTP

Overview

This template is designed to monitor Google Cloud Platform Cloud Run services using Zabbix.

Requirements

Zabbix version: 8.0 and higher.

Tested versions

This template has been tested on:

  • GCP Cloud Run

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.PROJECT.ID}

GCP project ID.

{$GCP.DATA.TIMEOUT}

Response timeout for API.

15s
{$GCP.TIME.WINDOW}

Time interval for data requests.

Supported usage types:

- Default update interval for most items.

- Minimal time window for data requested in Monitoring Query Language REST API request.

5m
{$GCP.PROXY}

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

{$GCP.CPU.UTIL.MAX}

GCP Cloud Run container instance CPU utilization threshold.

90
{$GCP.MEMORY.UTIL.CRIT}

GCP Cloud Run container instance memory utilization threshold.

90
{$GCP.CONCURRENT.REQUEST.MAX}

GCP Cloud Run max concurrent request threshold.

80
{$GCP.HTTP.FAIL.MAX.WARN}

The maximum number of HTTP request failures for trigger expression.

5
{$GCP.REQUEST.LATENCY.WARN}

Maximum of request latency in milliseconds for trigger expression.

100

Items

Name Description Type Key and additional info
Get container utilization

Raw data of utilization container.

HTTP agent gcp.run.utilization.get

Preprocessing

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

Container CPU utilization

Container CPU utilization in percentage distribution across all container instances.

Dependent item gcp.run.cpu.utilization

Preprocessing

  • JSON Path: $..cpu.first()

    ⛔️Custom on fail: Discard value

  • Custom multiplier: 100

Container memory utilization

Container memory utilization distribution across all container instances.

Dependent item gcp.run.memory.utilization

Preprocessing

  • JSON Path: $..memory.first()

    ⛔️Custom on fail: Discard value

  • Custom multiplier: 100

Max concurrent requests

Distribution of the maximum number of concurrent requests being served by each container instance over a minute.

Dependent item gcp.run.concurrent.request

Preprocessing

  • JSON Path: $..requests.first()

    ⛔️Custom on fail: Discard value

Get request

Number of requests reaching the service.

HTTP agent gcp.run.request.get

Preprocessing

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

Requests 2xx per second

Number of 2xx requests reaching the service.

Dependent item gcp.run.request.2xx.rate

Preprocessing

  • JSON Path: $.[?(@.label_value == '2xx')].value.first()

    ⛔️Custom on fail: Discard value

Requests 3xx per second

Number of 3xx requests reaching the service.

Dependent item gcp.run.request.3xx.rate

Preprocessing

  • JSON Path: $.[?(@.label_value == '3xx')].value.first()

    ⛔️Custom on fail: Discard value

Requests 4xx per second

Number of 4xx requests reaching the service.

Dependent item gcp.run.request.4xx.rate

Preprocessing

  • JSON Path: $.[?(@.label_value == '4xx')].value.first()

    ⛔️Custom on fail: Discard value

Requests 5xx per second

Number of 5xx requests reaching the service.

Dependent item gcp.run.request.5xx.rate

Preprocessing

  • JSON Path: $.[?(@.label_value == '5xx')].value.first()

    ⛔️Custom on fail: Discard value

Get HTTP response traffic

Raw data socket and HTTP response traffic.

HTTP agent gcp.run.http.traffic.get

Preprocessing

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

Internet sent bytes per second

Outgoing response traffic, in bytes. Traffic is sent over network type internet.

Dependent item gcp.gce.internet.sent_bytes.rate

Preprocessing

  • JSON Path: $.[?(@.label_value == 'internet')].sent_bytes.first()

Internet received bytes per second

Incoming request traffic, in bytes. Traffic is received over network type internet.

Dependent item gcp.run.internet.received_bytes.rate

Preprocessing

  • JSON Path: $.[?(@.label_value == 'internet')].received_bytes.first()

Private sent bytes per second

Outgoing response traffic, in bytes. Traffic is sent over network type private.

Dependent item gcp.gce.private.sent_bytes.rate

Preprocessing

  • JSON Path: $.[?(@.label_value == 'private')].sent_bytes.first()

Private received bytes per second

Incoming request traffic, in bytes. Traffic is received over network type private.

Dependent item gcp.run.private.received_bytes.rate

Preprocessing

  • JSON Path: $.[?(@.label_value == 'private')].received_bytes.first()

Google sent bytes per second

Outgoing response traffic, in bytes.

For responses returned through Google Cloud load balancers, response traffic is classified as google.

Dependent item gcp.gce.google.sent_bytes.rate

Preprocessing

  • JSON Path: $.[?(@.label_value == 'google')].sent_bytes.first()

Google received bytes per second

Incoming request traffic, in bytes. Traffic is received over network type google.

Dependent item gcp.run.google.received_bytes.rate

Preprocessing

  • JSON Path: $.[?(@.label_value == 'google')].received_bytes.first()

Get latency

Raw data of request latencies.

HTTP agent gcp.run.latency.get

Preprocessing

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

Request latencies

Distribution of request times in milliseconds reaching the service.

Dependent item gcp.run.request.latency

Preprocessing

  • JSON Path: $.request_latencies_percentile

    ⛔️Custom on fail: Discard value

  • Custom multiplier: 0.001

End-to-end request latency

Distribution of request latencies in milliseconds measured from when the request enters Google Cloud's network to when Cloud Run sends the response.

Dependent item gcp.run.e2e.latency

Preprocessing

  • JSON Path: $.e2e_latencies_percentile

    ⛔️Custom on fail: Discard value

  • Custom multiplier: 0.001

Ingress to region request latency

Distribution of request latencies in milliseconds measured from when the request enters Google Cloud's network to when the request reaches the cloud region.

Dependent item gcp.run.ingress.region.latency

Preprocessing

  • JSON Path: $.ingress_to_region_percentile

    ⛔️Custom on fail: Discard value

  • Custom multiplier: 0.001

Routing request latency

Distribution of request latencies in milliseconds measured from when the request reaches the cloud region to when the request reaches Cloud Run.

Dependent item gcp.run.routing.request.latency

Preprocessing

  • JSON Path: $.routing_percentile

    ⛔️Custom on fail: Discard value

  • Custom multiplier: 0.001

Pending request latency

Distribution of request latencies in milliseconds measured from when the request reaches Cloud Run to when the request is sent to an instance. Includes time spent waiting for a slot on an existing instance, or for a new instance to start (startup latency).

Dependent item gcp.run.pending.request.latency

Preprocessing

  • JSON Path: $.pending_percentile

    ⛔️Custom on fail: Discard value

  • Custom multiplier: 0.001

User execution request latency

Distribution of request latencies in milliseconds measured from when the request reaches a running instance to when it exits. Only includes time spent in the user container.

Dependent item gcp.run.user_execution.request.latency

Preprocessing

  • JSON Path: $.user_execution_percentile

    ⛔️Custom on fail: Discard value

  • Custom multiplier: 0.001

Response egress request latency

Distribution of response latencies in milliseconds measured from when the container finished processing the request to when Cloud Run sends the response.

Dependent item gcp.run.response_egress.request.latency

Preprocessing

  • JSON Path: $.response_egress_percentile

    ⛔️Custom on fail: Discard value

  • Custom multiplier: 0.001

Get container instance count

Raw data of container instances that exist for the service.

HTTP agent gcp.run.container.count.get

Preprocessing

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

Active container instance count

Number of active container instances for the service.

Dependent item gcp.run.active.container.count

Preprocessing

  • JSON Path: $.[?(@.state == 'active')].value.first()

    ⛔️Custom on fail: Discard value

Idle container instance count

Number of idle container instances for the service.

Dependent item gcp.run.idle.container.count

Preprocessing

  • JSON Path: $.[?(@.state == 'idle')].value.first()

    ⛔️Custom on fail: Discard value

Billable instance time

Total billable time (time multiplied by number of running containers).

HTTP agent gcp.run.billable.instance.time

Preprocessing

  • JSON Path: $.timeSeriesData..pointData..values..doubleValue.first()

    ⛔️Custom on fail: Discard value

Triggers

Name Description Expression Severity Dependencies and additional info
GCP Cloud Run Service: High CPU utilization

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

min(/GCP Cloud Run Service by HTTP/gcp.run.cpu.utilization,15m) >= {$GCP.CPU.UTIL.MAX} Average Manual close: Yes
GCP Cloud Run Service: High memory utilization

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

min(/GCP Cloud Run Service by HTTP/gcp.run.memory.utilization,15m) >= {$GCP.MEMORY.UTIL.CRIT} Average
GCP Cloud Run Service: Concurrent requests too high

Fires when concurrent requests exceed the threshold {$GCP.CONCURRENT.REQUEST.MAX}%.

min(/GCP Cloud Run Service by HTTP/gcp.run.concurrent.request,15m) >= {$GCP.CONCURRENT.REQUEST.MAX} Warning Manual close: Yes
GCP Cloud Run Service: Too many HTTP request failures

Too many requests failed on service with the 5xx HTTP code.

min(/GCP Cloud Run Service by HTTP/gcp.run.request.5xx.rate,5m)>{$GCP.HTTP.FAIL.MAX.WARN} Warning
GCP Cloud Run Service: Request latency is too high

Fires when latency exceeds the threshold {$GCP.REQUEST.LATENCY.WARN}ms.

min(/GCP Cloud Run Service by HTTP/gcp.run.request.latency,5m)>{$GCP.REQUEST.LATENCY.WARN} Warning Manual close: Yes
GCP Cloud Run Service: No active container instances

There are no active container instances for the service. This may indicate that the service is not receiving traffic or there is an issue with scaling.

max(/GCP Cloud Run Service by HTTP/gcp.run.active.container.count,15m)=0 Warning Manual close: Yes

Articles and documentation

+ Propose new article

Не нашли то, что искали?