{"revision":"c10276e953456835cdbb1f3a60d58ae1980be353","document":{"id":30420,"path":"it-operations-management/event-management/event-collection-MicrosoftAzure.md","title":"Event collection from Microsoft Azure Monitor","bundle":null,"doc_type":null,"release":"australia","body":"\n# Event collection from Microsoft Azure Monitor\n\nThe MID WebServer Event Collector enables you to collect JSON formatted event messages sent from the Microsoft Azure portal.\n\n## Before you begin\n\nEnsure that the Event Management Connectors \\(sn\\_em\\_connector\\) plugin is installed on the ServiceNow AI Platform instance.\n\nEnsure that you:\n\n-   Deploy and start the MID Server. See [MID Server configuration](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/servicenow-platform/c_MIDServerConfiguration.md) .\n-   Configure and start the MID Web Server. See [Configure the MID Web Server extension](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/it-operations-management/event-management/configure-mid-web-server-extension.md).\n-   Configure and start the MID WebService Event Collector. See [Configure the MID WebService Event Collector Context](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/it-operations-management/event-management/configure-em-context-extension.md).\n\nRole required: evt\\_mgmt\\_admin\n\n## About this task\n\nOn the Azure portal, alert correlation rules are defined through the **Correlate alerts** setting within Alert Processing Rules. When **Correlate alerts** is assigned on the Azure portal, the Azure Monitor alerts received on the ServiceNow® instance within 60 minutes are grouped using tag based alert clustering.\n\nJSON formatted event messages are sent from Microsoft Azure. The MID Server transforms the collected event messages by parsing them using the TransformEvents\\_MidAzureMonitor script include, located here: **Event Management** &gt; **Integrations** &gt; **PushConnectors**. In the Push Connectors page, click **Azure Monitor Mid Push Connector**.\n\nThe default format of the URL to push event messages from Microsoft Azure to the MID Server is `http://<MID_Web_Server_User>:<MID_Web_Server_Password>@<MID_Server_IP>:<MID_Web_Server_Port>/api/mid/em/inbound_event?Transform=TransformEvents_MidAzureMonitor`.\n\n|Variable|Description|\n|--------|-----------|\n|MID\\_Server\\_IP|IP address of the MID Web Server Extension.|\n|MID\\_Web\\_Server\\_Port|Listening port of the MID Web Server Extension.|\n|MID\\_Web\\_Server\\_User|Username for the MID Web Server Extension.|\n|MID\\_Web\\_Server\\_Password|Password of the user of the MID Web Server.|\n\nThe following procedure describes the collection of JSON formatted event messages using basic authentication.\n\n## Procedure\n\n1.  In the Azure Monitor Portal, verify that the MID Server IP is accessible from the Azure portal and the MID rest point is accessible from Microsoft Azure.\n\n2.  Install the MID Server on an Azure VM, provide the Azure VM public address in the URL, and allow the mid\\_web\\_Server\\_port in **Azure VM** &gt; **Networking Settings** &gt; **Inbound port rules**.\n\n3.  Create an action group with a webhook and provide the rest endpoint as `http://<MID_Web_Server_User>:<MID_Web_Server_Password>@<MID_Server_IP>:<MID_Web_Server_Port>/api/mid/em/inbound_event?Transform=TransformEvents_MidAzureMonitor`\n\n    **Note:** For more information about adding a webhook to an action group, see [Create and manage action groups in the Azure portal](https://docs.microsoft.com/en-us/azure/azure-monitor/alerts/action-groups) on the Microsoft documentation site.\n\n4.  In the Webhook section, make sure **Yes** is selected for the **Enable the common alert schema** option.\n\n5.  Navigate to **Alerts** &gt; **Manage Alert Rules**.\n\n6.  Add the action group with the webhook to an alert rule.\n\n\n## What to do next\n\nIf you want to send alert state changes on the ServiceNow instance from the ServiceNow alerts to the Azure Portal, you need to enable the Azure Monitor Bi-directional connector. For more information, see [Configure Azure Monitor Bi-directional connector](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/it-operations-management/event-management/configure-azure-bi-directional-connector.md).\n\n**Parent Topic:**[Integrate with push connectors](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/it-operations-management/event-management/configure-listener-transform-script.md)\n\n"}}