[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["很难理解","hardToUnderstand","thumb-down"],["信息或示例代码不正确","incorrectInformationOrSampleCode","thumb-down"],["没有我需要的信息/示例","missingTheInformationSamplesINeed","thumb-down"],["翻译问题","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-09-04。"],[[["\u003cp\u003eThis content outlines health check methods for Apigee and Apigee hybrid, covering regional-level, environment-level, and custom proxy-based checks.\u003c/p\u003e\n"],["\u003cp\u003eRegional-level health checks assess the overall Apigee instance health within a region using the \u003ccode\u003e/healthz/ingress\u003c/code\u003e path and the \u003ccode\u003eUser-Agent: GoogleHC\u003c/code\u003e header, returning \u003ccode\u003e"Apigee Ingress is healthy"\u003c/code\u003e if successful.\u003c/p\u003e\n"],["\u003cp\u003eEnvironment-level health checks verify the status of a specific environment by prepending \u003ccode\u003e/healthz/\u003c/code\u003e to a valid proxy basepath (e.g., \u003ccode\u003e/catalog\u003c/code\u003e) and using the \u003ccode\u003eUser-Agent: GoogleHC\u003c/code\u003e header, with a \u003ccode\u003e"Server Ready"\u003c/code\u003e response indicating a healthy environment.\u003c/p\u003e\n"],["\u003cp\u003eCustom health checks allow for advanced validations through a dedicated API proxy, enabling checks based on factors like multiple environment status or target latency, but do not require the \u003ccode\u003eUser-Agent\u003c/code\u003e header.\u003c/p\u003e\n"],["\u003cp\u003eThe health check feature is available for Apigee hybrid versions 1.4 and higher, and if the health checks are made by Google Cloud load balancers then the correct user-agent header is set for you.\u003c/p\u003e\n"]]],[],null,["# Performing health checks\n\n*This page\napplies to **Apigee** and **Apigee hybrid**.*\n\n\n*View [Apigee Edge](https://docs.apigee.com/api-platform/get-started/what-apigee-edge) documentation.*\n\n\nApigee exposes health checks at different levels, which you can leverage depending upon the use case.\n\n1. **Regional-level / Apigee instance health check:** Returns the health of overall Apigee instance in a region.\n2. **Environment-level health checks:** Returns the health of a particular environment in the Apigee instance.\n3. **Custom health check through an API proxy:** For complex use cases, you can configure a dedicated API proxy as a custom health check endpoint.\n\n\u003cbr /\u003e\n\n### Performing a regional-level health check\n\nApigee offers a regional-level / Apigee instance health check to assess the overall health\nstatus of the Apigee instance in a specific region. This health check pattern, widely used by\nload balancers, determines the health status of Apigee instances and performs regional failovers.\n\nYou can perform a regional-level health check by constructing the request as follows:\n\n- Health check path: `/healthz/ingress`\n- Add request header: `User-Agent: GoogleHC`.\n\n```bash\n$ curl -H 'User-Agent: GoogleHC' https://$HOST/healthz/ingress\nApigee Ingress is healthy\n```\nwhere, `$HOST` represents the host name defined in the [Apigee environment group](https://cloud.google.com/apigee/docs/api-platform/fundamentals/environmentgroups-working-with) that is served by the load balancer. Note: This API call to determine the regional-level health check will not be counted against your overall Apigee usage. If the Apigee instance is healthy, the response `\"HTTP/2 200\"` with `\"Apigee Ingress is healthy\"` is returned.\n\n### Performing an environment-level health check\n\nApigee offers an environment-level health check to assess the health of a particular environment\nserved by the Apigee instance. This health check pattern is preferred when you want to perform\nregional failovers based on the health of certain critical/selective environments.\n\nYou can perform an environment-level health check by calling any valid API proxy in an environment\nby constructing the request as follows:\n\n- Prepend `/healthz/` to the proxy basepath.\n- Add request header: `User-Agent: GoogleHC`.\n\n\nFor example, assume that `/catalog` is a valid proxy basepath that is deployed in an\nenvironment. To do a health check, call the proxy like this: \n\n```bash\n$ curl -H 'User-Agent: GoogleHC' https://$HOST/healthz/catalog\nServer Ready\n```\nwhere, `$HOST` represents the host name defined in the [Apigee environment group](https://cloud.google.com/apigee/docs/api-platform/fundamentals/environmentgroups-working-with) that is served by the load balancer. Note: This proxy API call to determine the environment-level health check will not execute the proxy, and will not be counted against your overall Apigee usage. The basepath `/catalog` is used only for routing the API to the correct environment. If the environment is healthy, the response `\"HTTP/2 200\"` with `\"Server Ready\"` is returned.\n\n### Performing a custom health check through an API proxy\n\nIf you want to perform any additional validations, you can define custom health check logic\nin an API proxy deployed to an environment.\nFor example, you might fail the healthcheck when multiple environments are down. Or, you could\nfail the healthcheck based on target health or latency.\n\n\nIn this case, you can perform the health check by making a regular API call to that proxy.\n\n\nFor example, assume that you want to check the health of an environment called `prod`.\nDeploy an API proxy to that environment with the basepath `/healthcheck-prod`.\nTo check the health of the `prod` environment served by Apigee instance,\ncall the proxy like this: \n\n```bash\n$ curl https://$HOST/healthcheck-prod\n```\nwhere, `$HOST` represents the host name defined in the [Apigee environment group](https://cloud.google.com/apigee/docs/api-platform/fundamentals/environmentgroups-working-with) that is served by the load balancer. Note: The API calls with custom health checks will be counted against your overall Apigee usage. And, you don't need to provide the `\"User-Agent\"` header.\n\n### Usage notes\n\n**For regional-level and environment-level healthchecks:** If they are performed by the\n[Google Cloud load balancers](https://cloud.google.com/load-balancing/docs/choosing-load-balancer#summary-of-google-cloud-load-balancers),\nthe load balancer sets the correct `User-Agent` header. If your own client consumes\nthese health check API calls, you need to make sure the correct `User-Agent` is set.\n\n\n**For Apigee hybrid**: The health check feature is only available for version 1.4 and higher."]]