Giter Club home page Giter Club logo

automate-alerts-using-arm-templates's Introduction

Automate-Alerts-Using-ARM-Templates

Here is the description on how and why to use this script.

Have you ever had the tedious task of creating multiple alerts for all of the resources in your subscription? Let me tell you is really time consuming to create them from scratch one by one.

I have a PowerShell Script that can Target and Create specific metric alerts for the resources you define inside of the script. First make sure you have imported the following modules into PowerShell:

  • AzureRM
  • AzureRM.Insights

Next, lets create two JSON files, one will be parameters.json and the other template.json, lets put them in a local folder.

Now this portion of the code targets only Virtual Machines, but if you want to target additional resource types. Follow this link to view all the supported metrics for Azure Monitor, choose the resource type and metric and give all the desired changes inside of the script.

Change this line: $VMColl = Get-AzureRmResource -ResourceType "YOUR DESIRED RESOURCE" | Select-Object -Property ResourceId,Name

Supported Metrics and Resources: https://docs.microsoft.com/en-us/azure/azure-monitor/platform/alerts-metric-near-real-time

Now let’s see the progress in real time!

After the script finishes go to the Deployments section of the resource group you defined, you will see each individual job being deployed.

To run this script you will first need to use the parameters and template JSON files to deploy using the PS Script mentioned.

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.