# Health Check

You can monitor the health of SCEPman using

* the [Health check feature of the Azure App Services](#health-check-in-azure-app-services)  (recommended) or
* a [3rd party monitoring tool](https://docs.scepman.com/azure-configuration/health-check/using-3rd-party-monitoring).

## Health Check in Azure App Services

{% hint style="info" %}
New SCEPman installations add the Health Check automatically during installation, starting with SCEPman 2.11. If you have installed SCEPman before this, you can add the health check manually using the guidance below.&#x20;
{% endhint %}

You may configure the health check feature and corresponding alerting for the App Service to get a direct notification in case your SCEPman instance is no longer responsive.

### Configure Health Check

1. Navigate to your **App Service** and on the left side scroll down to **Health check**
2. Now you can **Enable** the Health check, as probing **path** enter the following: **/probe**
3. Now you can click on **Save**, but keep in mind that **this will restart your App Service**

![Enable Health check](https://2535731700-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LoGejQeUQcw7lqnQ3WX%2Fuploads%2Fgit-blob-3c837746f832366bfd5abc27e41eba5ebe0f2cbe%2F2022-12-27%2013_04_05.png?alt=media)

### Configure Alerting

To get an alert from our health check we need to configure alert rules in our App Service.

1. Navigate to your **App Service** and on the left side scroll down to **Alerts**
2. Click on **Create alert rule**
3. In your new alert rule, you will be automatically redirected to **Add condition**
4. Select a signal logic. Search for **Health check status**

![Create alert rule](https://2535731700-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LoGejQeUQcw7lqnQ3WX%2Fuploads%2Fgit-blob-76f2206998eb07b7e055761bf29c5daf79fcc287%2F2022-12-27%2012_13_22.png?alt=media)

5. Configure the alert as specified below:

| **Threshold**        | Static     |
| -------------------- | ---------- |
| **Aggregation type** | Average    |
| **Operator**         | Less than  |
| **Unit**             | Count      |
| **Threshold value**  | 70         |
| **Check every**      | 5 minutes  |
| **Loopback period**  | 15 minutes |

<figure><img src="https://2535731700-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LoGejQeUQcw7lqnQ3WX%2Fuploads%2FUQoISWcPXg3UxxSwjuWK%2Fimage.png?alt=media&#x26;token=0ba717a9-c5c7-46d4-88d9-77b345c888b1" alt=""><figcaption><p>Alert rule condition</p></figcaption></figure>

6. Click on **Next: Actions**
7. Select **Create action group**

{% hint style="info" %}
If you have existing action groups, choose **Select action groups**, select an action group and move to step 14.
{% endhint %}

8. Define an **Action group name** and **Display name**

![Create action group](https://2535731700-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LoGejQeUQcw7lqnQ3WX%2Fuploads%2Fgit-blob-90be8a37b636d9eee8dc7d1d3a55a909ea3777c3%2F2022-12-27%2012_29_38.png?alt=media)

9. Next to **Notifications** and add **Notification type**
10. In the window, tick the **Email** checkbox and enter the email address you wish to receive notifications on
11. Then click on **OK**
12. Enter a **Name** for the Notification type

![Set notifications to action group](https://2535731700-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LoGejQeUQcw7lqnQ3WX%2Fuploads%2Fgit-blob-2aad32a044ba452b06fd95efb534f960269f509a%2Fscreen-shot-2021-01-19-at-11.11.40.png?alt=media)

13. After that you can click on **Review + create** and then on **Create.** You will be redirected back to **Actions** in creating the alert rule
14. Next to D**etails**, configure the following
    * **Resource group**
    * **Severity**
    * **Alert rule name**
    * Enable: **Enable upon creation**
    * Enable: **Automatically resolve alerts**

<figure><img src="https://2535731700-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LoGejQeUQcw7lqnQ3WX%2Fuploads%2FV30enHQO0XCTeiJbw7SJ%2F2023-10-23%2013_51_20-Create%20an%20alert%20rule.png?alt=media&#x26;token=51b6d634-9664-4fd8-839d-337060f1ce5e" alt=""><figcaption><p>Alert details</p></figcaption></figure>

15. Click on **Review + Create,** then **Create**

<figure><img src="https://2535731700-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LoGejQeUQcw7lqnQ3WX%2Fuploads%2FMlLdeqIoA2IqarutyTqZ%2F2023-10-23%2013_55_02-Create%20an%20alert%20rule.png?alt=media&#x26;token=dc8e6678-85f6-439a-9228-bbbe8b5b5f22" alt=""><figcaption></figcaption></figure>

16. View your existing **Alert rules** as shown

![View existing alert rules](https://2535731700-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LoGejQeUQcw7lqnQ3WX%2Fuploads%2Fgit-blob-334e32bdfdaa0de830345007109837ecf0be9814%2F2022-12-27%2012_46_42.png?alt=media)
