# Azure Monitor

Follow the steps below to configure a service so as to extract its related alert data from Azure monitor.

Squadcast will then process this information to create incidents for this service as per your preferences.

### Using Azure Monitor as an Alert Source

1. Navigate to **Services** -> **Service Overview** -> select or search for your Service. Expand the accordion -> In the Alert Sources section, click **Add**.

<figure><img src="https://1574591692-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8TaWz01jmUJl58p4ZVel%2Fuploads%2Fgit-blob-4fbd74e7ca0b30173c47a1d58ed6a0804a0465aa%2FAlert_Sources.png?alt=media&#x26;token=aaca6610-9d18-4dd4-9cf5-320042f326f1" alt="How to configure Azure Monitor integration in Squadcast" width="563"><figcaption></figcaption></figure>

2\. Select **Azure Monitor.** Copy the displayed **Webhook URL** to [configure](#create-squadcast-webhook-in-azure) it within **Azure Monitor**. Finish by clicking **Add Alert Source** -> **Done**.

<figure><img src="https://1574591692-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8TaWz01jmUJl58p4ZVel%2Fuploads%2Fgit-blob-7d99bbb1e6e1c683be61f378a0e7db638566f812%2FAzure%20Monitor.png?alt=media&#x26;token=b4bc5439-010e-4cdc-bd40-5cabb6948787" alt="Steps to add Azure Monitor integration to a service in Squadcast" width="563"><figcaption></figcaption></figure>

{% hint style="warning" %} <mark style="color:orange;">**Important**</mark>**:**

When an alert source turns <mark style="color:green;">Active</mark>, it’ll show up under Configured Alert Sources. You can either generate a test alert from the integration or wait for a real-time alert to be generated by the Alert Source.\
\
An Alert Source is <mark style="color:green;">active</mark> if there is a recorded incident via that Alert Source for the Service.
{% endhint %}

### Create Squadcast Webhook in Azure

Login to your Azure account select your virtual machine. Under **Monitoring**, go to **Alerts**.

Then go to **Manage Actions** → **Add Action groups** → **Creatre action group** (Test grp or Squadcast webhook alerts) by selecting **Action type** as **Webhook**. Paste the squadcast webhook url from the previous step and make sure **Enable the common alert schema** toggle switch is turned on.

<figure><img src="https://1574591692-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8TaWz01jmUJl58p4ZVel%2Fuploads%2Fgit-blob-693dc29d4c9d485b4a2e177525c84336caeb3217%2Fazure_2.png?alt=media&#x26;token=3217a1a6-8764-47c0-853d-3eddaf9c0e26" alt="Creating Squadcast Webhook in Azure: Configure webhook action group with Squadcast URL in Azure Alerts under Monitoring for virtual machine" width="563"><figcaption></figcaption></figure>

Go back to **Alerts** window and click **New Alert**. Specify Resource, Condition and under **Actions** select the action group (Test grp or Squadcast webhook alerts) you just made. Provide alert rule Name, Description and **Create Alert**.

<figure><img src="https://1574591692-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8TaWz01jmUJl58p4ZVel%2Fuploads%2Fgit-blob-be72cad52524a3448ab8f5ba0a83784960920256%2Fazure_3.png?alt=media&#x26;token=129227ff-49fd-441c-bc24-30ee9c533ad5" alt="Creating Azure Alert with Squadcast Webhook: Specify resource, condition, and select the action group. Provide name, description, and create the alert" width="563"><figcaption></figcaption></figure>

Now whenever an alert is triggered by Azure Monitor, an incident will be created automatically in Squadcast.

The Azure Monitor integration comes with an **Auto-Resolve** feature, meaning that whenever the alerts gets resolved in Azure, the incident will automatically get resolved in Squadcast as well.

*Have any questions?* [*Ask the community*](https://community.squadcast.com/view/home)*.*
