---
schema_version: "1"
id: 0ba79986fe9ccdc946b06a09c1aba45ffe37137bec181fd0b4c725b17c24de3c
title: Health Check Policy
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/gateway/1.13/policies-included-health-check.md
canonical_url: https://docs.mulesoft.com/gateway/1.13/policies-included-health-check
source_site: docs.mulesoft.com
content_type: documentation
content_hash: 1982baef1de811addd965719def600251b53086495c5cd7a7976d73ab34002d6
description: MuleSoft Documentation Site
release: "1.13"
latest: false
---
---
product: Omni Gateway
version: 1.13
keywords: health check, api gateway, flex gateway, gateway, policy
---

# Health Check Policy

> For the full documentation index, see: https://docs.mulesoft.com/llms.txt

<table><colgroup><col> <col></colgroup><tbody><tr><td><p><strong>Policy name</strong></p></td><td><p>Health Check</p></td></tr><tr><td><p><strong>Summary</strong></p></td><td><p>Monitors API upstream health at specific intervals</p></td></tr><tr><td><p><strong>Category</strong></p></td><td><p>Quality of Service</p></td></tr><tr><td><p><strong>First Omni Gateway version available</strong></p></td><td><p>v1.4.0</p></td></tr><tr><td><p><strong>Release Notes</strong></p></td><td><p><a href="https://docs.mulesoft.com/release-notes/gateway/policies/health-check-release-notes">Health Check Policy</a></p></td></tr><tr><td><p><strong>Returned Status Codes</strong></p></td><td><p>No return codes exist for this policy.</p></td></tr></tbody></table>

## Summary

The Health Check policy enables you to monitor an API instance’s connection to an upstream service
and sends you an email alert if the connection status changes. The Health Check policy monitors the
health of the upstream service and not the health of the API instance or Omni Gateway.

The Health Check policy monitors your API by making GET requests to the specified upstream’s base
path. You must specify a base path with a GET request. Requests are made at a fixed schedule every
minute with the first request. The first request occurs a minute after the policy is applied.
Requests made by the Health Check policy do not count as Omni Gateway API calls for pricing
purposes.

When you configure Health Check, specify a response code for the GET request that indicates a
healthy connection. For example, the status code of an active API should return 200, indicating the
API can receive connections. The platform sends an email alert when the status code is not 200.
Health Check only validates the response code, so what is returned to the endpoint is unimportant.

No logging event appears for healthy responses. Omni Gateway logs only unhealthy responses.

You can use any 1xx, 2xx, 3xx, 4xx, or 5xx response codes. However, if you expect successful
connections to your endpoints, 2xx response codes are ideal. Only a number response code is
accepted.

You are required to create an alert for the Health Check policy. Applying the policy navigates you
to the Create Alert page, where you must create an alert. For information about how to configure
your alert, visit [Using Omni Gateway API Alerts](https://docs.mulesoft.com/gateway/1.13/use-api-alerts).

> [!IMPORTANT] Applying the Health Check policy to API Instances with an outbound TLS context also
> applied causes the Health Check policy to return an unhealthy connection.

## Configuring Policy Parameters

### Omni Gateway Local Mode

The Health Check policy isn’t supported in Local Mode.

### Managed Omni Gateway and Omni Gateway Connected Mode

When you apply the policy from the UI, the following parameters are displayed:

<table><colgroup><col> <col> <col></colgroup><thead><tr><th>Element</th><th>Description</th><th>Required?</th></tr></thead><tbody><tr><td><div><div><p>Upstream URL</p></div></div></td><td><div><div><p>The full URL of the API upstream you are monitoring</p></div></div></td><td><div><div><p>Yes</p></div></div></td></tr><tr><td><div><div><p>Base path</p></div></div></td><td><div><div><p>The HTTP path of the GET method that is requested during health checks</p></div></div></td><td><div><div><p>Yes</p></div></div></td></tr><tr><td><div><div><p>Response code</p></div></div></td><td><div><div><p>The expected status code of the GET request specified in the base path. Only a number response code is accepted.</p></div></div></td><td><div><div><p>Yes</p></div></div></td></tr></tbody></table>
