Overview
This guide provides guidelines on what to monitor and how to monitor an Apigee Hybrid deployment. It is intended for hybrid cluster administrators and Org admins.
If you are new to Google Cloud monitoring, please refer to Google Cloud Monitoring documentation for: Create charts with Metrics Explorer and How alerting works .
Apigee Hybrid clusters provide SLI (Service Level Indicator) metrics to help you understand how application and system services are performing at any given time. You can view a complete list of Available metrics .
Google Cloud Monitoring uses Resource Type to identify every SLI metric. There are three common Resource Types used for all Apigee Hybrid metrics.
-
k8s_container
for system level metrics. -
Proxy
for Apigee API Proxy metrics. -
Target
for Apigee API Target metrics
The Resource Types have common labels that apply to all their associated metrics. For example,
all the metrics with k8s_container
resource type have cluster_name
, pod_name
, and container_name
labels available to use, in addition to
the metrics labels. A combination of Resource Type labels and metrics labels should be used to
effectively monitor cluster health and performance.
Alert threshold: In a perfect world, alerting thresholds would be obvious and the provided documentation would list the values that should trigger alerts. In reality, it is less obvious for the Apigee to define - what is acceptable performance and what is a dangerous resource utilization of services and infrastructures. The alert threshold values will vary greatly depending on particular traffic patterns and SLO/SLA agreements.
An Alert threshold optimization and determination is an on-going process as it can change with the service and infrastructure usage. Use Warning and Critical threshold for notifications and alerting.
- Healthy : Value is less than the warning threshold .
- Concerning : Value greater than the warning threshold , but value is less than the Critical threshold .
- Critical : Value > Critical threshold .
Customers should use the tools provided to determine the optimal threshold, whether it's the Cloud Monitoring dashboards that customers can create with the PromQL provided below or the Apigee's analytics, to identify what "normal" looks like and then tune the alerts thresholds accordingly.
Hybrid cluster monitoring can be categorized into four different general groups, for example Traffic , Database , Apigee control plane , and infrastructure monitoring. The following sections describe these groups in detail:
Traffic
The Apigee Proxy and Target SLI metrics provide request/response counts and latencies for API Proxy and Targets. The Apigee Policy latency SLI metric provides policy response latencies. These SLI metrics provide coverage for monitoring the Apigee API traffic.
Request Rate
Proxy request count
Use case : Use the proxy/request_count to monitor the proxy request count. The proxy/request_count chart displays the request rate for proxies. This chart is useful to identify which Proxy is receiving a higher request rate, request rate patterns and any abnormal spike in request calls for a particular proxy. Any unexpected abnormal spike in API traffic could be a security concern around a bot or attack on API proxies. Similarly, a large drop in overall traffic cloud indicates issues with clients or connectivity from Apigee upstream components.
sum by (method) ( rate({"apigee.googleapis.com/proxy/request_count", monitored_resource="apigee.googleapis.com/Proxy"}[1m]) )
Target request count
Use case : Use the target/request_count to monitor the Apigee runtime target request count. The target/request_count chart displays the request rate received by the Apigee target. This chart may be useful to see which target is getting a higher request rate, request rate pattern and any abnormal spike in request calls for a particular target.
sum by (method, type, endpoint) ( rate({"apigee.googleapis.com/target/request_count", monitored_resource="apigee.googleapis.com/Target"}[1m]) )
Error Rate
Proxy error response count
Use case : Use the proxy/response_count to monitor the proxy error response rate. The proxy/response_count chart displays the request rate for API Proxy. This chart is useful to understand which proxy is getting a higher request error rate or any abnormal error spike in request calls for a particular proxy.
response_code != 200
response_code
, fault_code
, fault_source
, apigee_fault
,
and all Proxy
resource type labels- Total response errors = Sum of proxy/response_count with filter response_code != 200
- Total response count = Sum of proxy/response_count
sum by (method, response_code, fault_code, fault_source, apigee_fault) ( rate({"apigee.googleapis.com/proxy/response_count", monitored_resource="apigee.googleapis.com/Proxy", response_code!="200"}[1m]) )
100 * ( sum by (method, org, apigee_fault, location, resource_container, env, proxy_name, fault_code, fault_source) ({"apigee.googleapis.com/proxy/response_count", monitored_resource="apigee.googleapis.com/Proxy", response_code="500"}) / sum by (method, org, apigee_fault, location, resource_container, env, proxy_name, fault_code, fault_source) ({"apigee.googleapis.com/proxy/response_count", monitored_resource="apigee.googleapis.com/Proxy"}) ) > 5
Target error response count
Use case : Use the target/response_count to monitor the API Target error response rate. The target/response_count chart displays the request rate from API Target. This chart may be useful to identify which target is getting a higher request rate or any abnormal errors spike in request calls.
response_code != 200
- Total response errors = Sum of target/response_count with filter response_code != 200
- Total response count = Sum of target/response_count
sum by (method, type, endpoint, response_code) ( rate({"apigee.googleapis.com/target/response_count", monitored_resource="apigee.googleapis.com/Target", response_code!="200"}[1m]) )
Latencies
Proxy latencies
Use case : Use the proxy/latencies to monitor the latencies of all API proxy responses to a request. The proxy/latencies chart may be useful to identify the latency in Apigee API proxy to your overall API proxy request latency.
histogram_quantile( 0.99, sum by (le, method) ( rate({"apigee.googleapis.com/proxy/latencies/bucket", monitored_resource="apigee.googleapis.com/Proxy"}[1m]) ) )
Target latencies
Use case : Use the target/latencies to monitor the latencies of all API proxy target responses to a request. The target/latencies chart identifies the total amount of time for the Apigee API proxy target to respond to a request. This value does not include the Apigee API proxy overhead.
histogram_quantile( 0.99, sum by (le, method) ( rate({"apigee.googleapis.com/target/latencies/bucket", monitored_resource="apigee.googleapis.com/Target"}[1m]) ) )
Database
Cassandra
Apigee Cassandra database service has multiple Cassandra SLI metrics . These SLI metrics can provide comprehensive monitoring for the Apigee Cassandra service. At a minimum, along with Cassandra resource usage (CPU, Mem, and disk volume), the client's read and write request latency should be monitored for Cassandra service health.
Cassandra read request rate
Use case : The cassandra/clientrequest_rate (with scope= Read ) SLI metric provides insight into Cassandra services read request average rate at any given time. This metric helps with the understanding of clients' read request activity level trends.
scope = Read
and unit = OneMinuteRate
sum by (scope, unit) ( avg_over_time({"apigee.googleapis.com/cassandra/clientrequest_latency", monitored_resource="k8s_container", scope="Read", unit="OneMinuteRate" }[1m]) )
Cassandra write request rate
Use case : The cassandra/clientrequest_rate (with scope=Write) SLI metric provides insight into Cassandra services write request average rate at any given time. This metric helps with the understanding of clients' write request activity level trends.
scope = Read
and unit = OneMinuteRate
sum by (scope, unit) ( avg_over_time({"apigee.googleapis.com/cassandra/clientrequest_latency", monitored_resource="k8s_container", scope="Write", unit="OneMinuteRate" }[1m]) )
Cassandra read request latency
Use case : The cassandra/clientrequest_latency (with scope=Read) SLI metric provides Cassandra services read request latency (at 99th percentile, 95th percentile, or 75th percentile). These metrics help with the overall view of Cassandra performance and can indicate any changes in usage patterns or a problem manifesting itself over time.
scope = Read
and unit = 99thPercentile
sum by (scope, unit) ( avg_over_time({"apigee.googleapis.com/cassandra/clientrequest_latency", monitored_resource="k8s_container", scope="Read", unit="99thPercentile" }[1m]) )
Cassandra write request latency
Use case : The cassandra/clientrequest_latency (with scope=Write) SLI metric provides Cassandra services write request latency (at 99th percentile, 95th percentile, or 75th percentile). These metrics help with the overall view of Cassandra performance and can indicate any changes in usage patterns or a problem manifesting itself over time.
scope = Write
and unit = 99thPercentile
sum by (scope, unit) ( avg_over_time({"apigee.googleapis.com/cassandra/clientrequest_latency", monitored_resource="k8s_container", scope="Write", unit="99thPercentile" }[1m]) )
Apigee Control plane
Apigee Synchronizer service SLI metrics provide request and response counts and latencies between the Apigee control plane and the Hybrid runtime plane. Synchronizer instances running in the runtime plane are expected to poll the control plane regularly, download the contracts and make the same available to local runtime instances.
Request rate
Upstream request count
Use case : The upstream/request_count metrics indicate the number of requests made by the Synchronizer service to the Apigee control plane.
container_name = apigee-synchronizer
and type = CONTRACT
sum by (method, type, container_name) ( rate({"apigee.googleapis.com/upstream/request_count", monitored_resource="k8s_container", container_name="apigee-synchronizer", type="CONTRACT" }[1m]) )
Error rate
Upstream response count
Use case : The upstream/response_count SLI metric provides the number of responses the Synchronizer services received from the Apigee control plane. This chart may be useful to identify any connectivity or configuration issue between the Apigee Hybrid Runtime plane and Control plane.
sum by (method, response_code, type, container_name) ( rate({"apigee.googleapis.com/upstream/response_count", monitored_resource="k8s_container", container_name="apigee-synchronizer", response_code!="200" type="CONTRACT" }[1m]) )
Infrastructure
GKE and other Kubernetes platforms provide system-level SLI metrics. The SLI metrics labels can be filtered and grouped to monitor a specific container and its resource usage. To monitor the Apigee Runtime cluster infrastructure health and availability, a cluster admin can monitor the container and pod common resource use such as CPU, Mem, disk, and container restart counts. Please follow GKE documentation for more details on available metrics and labels.
The following table lists some of the services and the containers you can monitor for each service.
apigee-cassandra
apigee-runtime
apigee-synchronizer
apigee-prometheus-app
apigee-prometheus-proxy
apigee-prometheus-agg
apigee-stackdriver-exporter
Containers / Pods
Restart count
Use case : The kubernetes.io/container/restart_count system SLI metric provides the number of times a container has restarted. This chart may be useful to identify if a container is crashing/restarting frequently. The specific service container can be filtered out by metrics labels for a specific service's container monitoring.
The following shows using the kubernetes.io/container/restart_count metric for the Cassandra container. You can use this metric for any of the containers in the table above.
namespace_name = apigee
and container_name =~ .*cassandra.*
OOMKilled
,
data disk full, and configuration issues, to name a few.sum by (cluster_name, namespace_name, pod_name, container_name) ( rate({"kubernetes.io/container/restart_count", monitored_resource="k8s_container", container_name=~".*cassandra.*", namespace_name="apigee" }[1m]) )
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-09-04 UTC.