
Under Operating System, select the type of Operating system that you're currently using. Select the Region in which you want to create the function app. Select the version of the Runtime stack in Version. In Publish, select the mode of publishing, either Code or Docker Container. Under Instance details, do the following:. Under Project Details, select the Subscription for which you want to create the Function app and the Resource Group to contain the app. In the Basics tab, enter the following values:
Select Create to open the Create Function App screen. In the Azure portal, search for function app in All services and select it. To create an Azure function to process the alert and create a packet capture, follow these steps:
Creates an alert rule on a virtual machine and configures the alert rule to call the Azure function. Creates an Azure function that starts a packet capture.
We also create a function to call Network Watcher. To automate this process, we create and connect an alert on our VM to trigger when the incident occurs.
The packet capture file is uploaded to a storage account for review and diagnosis. The packet capture runs on the VM and collects data. Your Azure function processes the alert and starts a Network Watcher packet capture session. The following workflow that takes place when an alert is triggered: This scenario assumes that you have an existing instance of Network Watcher and a resource group with a valid Virtual machine. You can take steps to return the virtual machine to its original state. When an alert is triggered, the packet-level data helps to analyze why the outgoing traffic has increased. Similarly, you can create alerts for any condition. In this example, your VM has more outgoing traffic than usual and you want to be alerted. An existing virtual machine in the same region as Network Watcher with the Windows extension or Linux virtual machine extension. If you don't already have one, create an instance of Network Watcher. An existing instance of Network Watcher. The latest version of Azure PowerShell. To learn how to migrate to the Az PowerShell module, see Migrate Azure PowerShell from AzureRM to Az. See Install Azure PowerShell to get started. We recommend that you use the Azure Az PowerShell module to interact with Azure.