- This runbook will stop an ARM VM in response to an Azure alert trigger
- Input is alert data with information needed to identify which VM to stop.
- The runbook must be called from an Azure alert via a webhook
- Latest version of Az module should be added to the automation account
- Managed Identity should be enabled and contributor access to the automation account should be given
stop-azure-vm-on-alert's Introduction
stop-azure-vm-on-alert's People
stop-azure-vm-on-alert's Issues
Wrong value assigned to ResourceName
Hi,
I'm using this runbook to stop a VM when is running for more than X time. I have a log query alert to check the started time of the VM and the runbook configured to Stop the VM. When the alert fires the runbook is not stopping the VM.
When the webook calls the runbook I see that there is a wrong assingnement of the values on the variables.
This is what I see on the output logs:
schemaId: azureMonitorCommonAlertSchema
status: Fired
resourceType: /
resourceName: x-xxx-xxxx-xxx-xxxx-xxx (resourceGroupName) instead of VM name
resourceGroupName: x-xxx-xxxx-xxx-xxxx-xxx (resourceGroupName)
subscriptionId: yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyy
The resource name is getting the resource group name. I belive this is the cause for the runbook to fail?
How can I correct this issue? Should I add other alert schemaId?
Appreciate the help.
Thanks,
PF
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.