GithubHelp home page GithubHelp logo

azure-samples / network-watcher-alert-triggered-packet-capture Goto Github PK

View Code? Open in Web Editor NEW
4.0 18.0 4.0 33 KB

The repository contains code and deployment templates for an Azure Function that processes and Azure Monitor Alert and triggers a packet capture using Network Watcher on the VM that triggered the Alert.

License: MIT License

C# 78.69% PowerShell 21.31%

network-watcher-alert-triggered-packet-capture's Introduction

services platforms author
network-watcher
dotnet
mattreatMSFT

Use Network Watcher and Azure Functions to process VM alerts and intiate a packet capture

In this sample we show how you can programmatically initiate a packet capture using Network Watcher and Azure Functions. This sample utilizes the Azure Management Libraries for .NET

Deploy the Azure Function using an ARM template

The AlertPacketCapture branch contains a working version of the deployment template, tailored for a real version of a function that processes Azure Monitor Alerts and triggers a subsequent packet capture on the resource that fired the alert.

Deploy to Azure

Overview

The steps to fully implement the Azure Network Watcher Alert Packet Capture Connector are:

  • Gather the settings below - the function requires a service principle in order to authenticate to Azure Resource Manager(ARM).
  • Click the "Deploy to Azure" button below.
  • Authenticate to the Azure Portal (if necessary)
  • Fill in the form with the setting values
  • Wait a few minutes for the function to be created and deployed
  • Configure Alerts on the appropriate VM resource and provide the URL of the the function. Example http://samplefunction/api/AlertPacketCapture

Settings

  • AppName - this is the name of the function app. In the Azure Portal, this is the name that will appear in the list of resources.
    Example: MyNSGApp
  • appServicePlanTier - "Free", "Shared", "Basic", "Standard", "Premium", "PremiumV2"
    Example: Standard
  • appServicePlanName - depends on tier, for full details see "Choose your pricing tier" in the portal on an App service plan "Scale up" applet.
    Example: For standard tier, "S1", "S2", "S3" are options for plan name
  • appServicePlanCapacity - how many instances do you want to set for the upper limit?
    Example: For standard tier, S2, set a value from 1 to 10
  • githubRepoURL - this is the URL of the repo that contains the function app source. You would put your fork's address here.
    Example: https://github.com/Azure-Samples/network-watcher-alert-triggered-packet-capture
  • githubRepoBranch - this is the name of the branch containing the code you want to deploy.
    Example: master
  • PacketCaptureStorageAccount - this is the name of the storage account where packet captures will be saved Example: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{storageAccountName}
  • ClientId - this is the clientId of the Service Principle used to authenticate to Azure Resource Manager Example: 00000000-0000-0000-0000-000000000000
  • ClientKey - this is the client key associated with the service princple Example: 00000000-0000-0000-0000-000000000000
  • TenantId - this is the Azure Active Directory TenantId Example: 00000000-0000-0000-0000-000000000000

network-watcher-alert-triggered-packet-capture's People

Contributors

daweins avatar mattreatmsft avatar microsoftopensource avatar msftgits avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

network-watcher-alert-triggered-packet-capture's Issues

[Action Needed] This repo is inactive

This GitHub repository has been identified as a candidate for archival

This repository has had no activity in more than [x amount of time]. Long periods of inactivity present security and code hygiene risks. Archiving will not prevent users from viewing or forking the code. A banner will appear on the repository alerting users that the repository is archived.

Please see https://aka.ms/sunsetting-faq to learn more about this process.

Action

✍️

❗**If this repository is still actively maintained, please simply close this issue. Closing an issue on a repository is considered activity and the repository will not be archived.🔒

If you take no action, this repository is still inactive 30 days from today it will be automatically archived..

Need more help? 🖐️

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.