Azure-Automation | Azure Automation Runbooks | DevOps library
kandi X-RAY | Azure-Automation Summary
kandi X-RAY | Azure-Automation Summary
Azure Automation Runbooks.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of Azure-Automation
Azure-Automation Key Features
Azure-Automation Examples and Code Snippets
Community Discussions
Trending Discussions on Azure-Automation
QUESTION
I am planning to have an automation account
which will contain runbooks
and automation account variables
. The number of runbook and variables will increase in time, automatically.
How many runbook and automation account variable can an azure automation account contain? Is there a limitation for that?
I have checked here but couldn't find anything related to runbook
and automation account variable
number.
Any idea?
...ANSWER
Answered 2021-Apr-29 at 06:21Here is another post which can answer your question. It mentioned that "From what the Automation team has explained to me if the limit is not set in the quota doc located here then the limit does not exist or it is high enough that they have never ran into a customer hitting a limit. "
The content of the doc is same with what you provided in your question, I think you just need to refer to this document.
QUESTION
I am trying to install az powershell modules from my automation runbook with powershell script. But i am failing to do that. I have tried the solution in a similar topic which is here but it didn't work for me. The code is below:
...ANSWER
Answered 2021-Jan-07 at 16:29Check this MS recommended PS script to update modules in Automation account. It's reference is given here: Use the update runbook to update a specific module version.
Script:
QUESTION
I'm adapting a powershell script I have at work for use in Azure-automation, which outputs 3 different CSV files. I'm trying to avoid having to create a DB and send the information there since it would require a changing the script too much, and its quite complex. Does anyone know if there's a way to just send the 3 files to some kind of folder in Azure? Or maybe another solution that wouldn't require messing too much with the script? Sorry if it is a dumb question, I'm not very familiar with Azure yet.
...ANSWER
Answered 2020-Feb-13 at 19:55Probably the easiest option is to continue writing the file as you are now, then after the file is written have your Powershell code upload it to Blob storage using Set-AzureStorageBlobContent. See https://savilltech.com/2018/03/25/writing-to-files-with-azure-automation/ for an example.
You can read more about using Powershell to upload to blob storage, including all the steps you need to create the storage account and container, at https://docs.microsoft.com/en-us/azure/storage/blobs/storage-quickstart-blobs-powershell.
QUESTION
I'm brand new to automation, and am trying to get a runbook to connect to a sql database and run a stored procedure. The problem is, the code I'm using (adapted from https://azure.microsoft.com/en-us/blog/azure-automation-your-sql-agent-in-the-cloud/) is not asking for the server and credentials parameters when I try to test it. The test window says, "No input parameters."
Here is my (genericized) code:
...ANSWER
Answered 2019-Sep-14 at 19:11It says no input parameters because AFAIK you are not providing runbook the required input credentials properly. You would have to do that by using Get-AutomationPSCredential cmdlet. I haven't done end-to-end testing but most probably you may follow this link to accomplish your requirement.
Hope this helps!
QUESTION
Trying to invoke two webhooks that I've defined on a runbook in an azure automation account.
I can run the webhook through powershell, and it works, but i'm having trouble getting it to run. Below is the code i'm using
...ANSWER
Answered 2018-Dec-07 at 02:18Please use the code below. It works at my side, just reference the jquery lib(You can also download it to local and then reference it):
QUESTION
I'm trying to wire up Scaleset VMs to the Azure Automation DSC server using the DSC extension. This is not exposed via the Portal, but from this documentation it seems that it should be possible though templates and powershell cmd line.
I have the boiled things down to the following snippet (with sensitive vars masked):
...ANSWER
Answered 2018-Oct-11 at 08:45I've managed to get the Add-AzureRmVmssExtension
as part of a New-AzureRmVmss
powershell pipeline flow. I needed to make two changes:
1) to not encode the $setting
and $protectedSetting
hashtables as Json - my original snippet was using ConvertTo-Json
on the hashtable to get string json. In my defence, the documentation for those params indicates: "Specifies private configuration for the extension, as a string.". I will file a documentation bug.
2) (and this I think is the main reason), I updated the TypeHandlerVersion
to 2.76 which is the current latest version - copy-paste from an Internet example gave me 2.24. I'm gonna see if I can get away with not specifying the version at all - I would always want the latest.
QUESTION
I'm trying to create Alert Rules with ARM Template. However when I deploy the example found in documentation it reports success but doesn't seem to create any alerts. The template I'm using is the same as in documentation at it is:
...ANSWER
Answered 2018-May-10 at 09:09 {
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0",
"parameters": {
"workspaceName": {
"type": "string",
"metadata": {
"Description": "Name of Log Analytics workspace"
}
},
"workspaceregionId": {
"type": "string",
"metadata": {
"Description": "Region of Log Analytics workspace"
}
},
"actiongroup": {
"type": "string",
"metadata": {
"Description": "List of action groups for alert actions separated by semicolon"
}
}
},
"variables": {
"SolutionName": "SolutionTest",
"SolutionVersion": "1.0",
"SolutionPublisher": "SolutionTesters",
"ProductName": "SolutionTest1",
"LogAnalyticsApiVersion": "2017-03-03-preview",
"MySearch": {
"displayName": "Processor over 70%",
"query": 'Perf | where ObjectName=="Processor" and CounterName=="% Processor Time" and CounterValue>70',
"category": "Samples",
"name": "Samples-Count of data"
},
"MyAlert": {
"Name": "[toLower(concat('myalert-',uniqueString(resourceGroup().id, deployment().name)))]",
"DisplayName": "Processor over 70%",
"Description": "Processor alert. Fires when 3 error records found over hour interval.",
"Severity": "Critical",
"ThresholdOperator": "gt",
"ThresholdValue": 3,
"Schedule": {
"Name": "[toLower(concat('myschedule-',uniqueString(resourceGroup().id, deployment().name)))]",
"Interval": 15,
"TimeSpan": 60
},
"MetricsTrigger": {
"TriggerCondition": "Consecutive",
"Operator": "gt",
"Value": 3
},
"ThrottleMinutes": 60,
"AzNsNotification": {
"GroupIds": [
"[parameters('actiongroup')]"
],
"CustomEmailSubject": "Sample alert for processor query"
}
}
},
"resources": [
{
"name": "[concat(variables('SolutionName'), '[' ,parameters('workspacename'), ']')]",
"location": "[parameters('workspaceRegionId')]",
"tags": { },
"type": "Microsoft.OperationsManagement/solutions",
"apiVersion": "2015-11-01-preview",
"dependsOn": [
"[resourceId('Microsoft.OperationalInsights/workspaces/savedSearches', parameters('workspacename'), variables('MySearch').Name)]",
"[resourceId('Microsoft.OperationalInsights/workspaces/savedSearches/schedules', parameters('workspacename'), variables('MySearch').Name, variables('MyAlert').Schedule.Name)]",
"[resourceId('Microsoft.OperationalInsights/workspaces/savedSearches/schedules/actions', parameters('workspacename'), variables('MySearch').Name, variables('MyAlert').Schedule.Name, variables('MyAlert').Name)]",
],
"properties": {
"workspaceResourceId": "[resourceId('Microsoft.OperationalInsights/workspaces', parameters('workspacename'))]",
"referencedResources": [
],
"containedResources": [
"[resourceId('Microsoft.OperationalInsights/workspaces/savedSearches', parameters('workspacename'), variables('MySearch').Name)]",
"[resourceId('Microsoft.OperationalInsights/workspaces/savedSearches/schedules', parameters('workspacename'), variables('MySearch').Name, variables('MyAlert').Schedule.Name)]",
"[resourceId('Microsoft.OperationalInsights/workspaces/savedSearches/schedules/actions', parameters('workspacename'), variables('MySearch').Name, variables('MyAlert').Schedule.Name, variables('MyAlert').Name)]"
]
},
"plan": {
"name": "[concat(variables('SolutionName'), '[' ,parameters('workspaceName'), ']')]",
"Version": "[variables('SolutionVersion')]",
"product": "[variables('ProductName')]",
"publisher": "[variables('SolutionPublisher')]",
"promotionCode": ""
}
},
{
"name": "[concat(parameters('workspaceName'), '/', variables('MySearch').Name)]",
"type": "Microsoft.OperationalInsights/workspaces/savedSearches",
"apiVersion": "[variables('LogAnalyticsApiVersion')]",
"dependsOn": [ ],
"tags": { },
"properties": {
"etag": "*",
"query": "[variables('MySearch').query]",
"displayName": "[variables('MySearch').displayName]",
"category": "[variables('MySearch').category]"
}
},
{
"name": "[concat(parameters('workspaceName'), '/', variables('MySearch').Name, '/', variables('MyAlert').Schedule.Name)]",
"type": "Microsoft.OperationalInsights/workspaces/savedSearches/schedules/",
"apiVersion": "[variables('LogAnalyticsApiVersion')]",
"dependsOn": [
"[concat('Microsoft.OperationalInsights/workspaces/', parameters('workspaceName'), '/savedSearches/', variables('MySearch').Name)]"
],
"properties": {
"etag": "*",
"interval": "[variables('MyAlert').Schedule.Interval]",
"queryTimeSpan": "[variables('MyAlert').Schedule.TimeSpan]",
"enabled": true
}
},
{
"name": "[concat(parameters('workspaceName'), '/', variables('MySearch').Name, '/', variables('MyAlert').Schedule.Name, '/', variables('MyAlert').Name)]",
"type": "Microsoft.OperationalInsights/workspaces/savedSearches/schedules/actions",
"apiVersion": "[variables('LogAnalyticsApiVersion')]",
"dependsOn": [
"[concat('Microsoft.OperationalInsights/workspaces/', parameters('workspaceName'), '/savedSearches/', variables('MySearch').Name, '/schedules/', variables('MyAlert').Schedule.Name)]"
],
"properties": {
"etag": "*",
"Type": "Alert",
"Name": "[variables('MyAlert').DisplayName]",
"Description": "[variables('MyAlert').Description]",
"Severity": "[variables('MyAlert').Severity]",
"Threshold": {
"Operator": "[variables('MyAlert').ThresholdOperator]",
"Value": "[variables('MyAlert').ThresholdValue]",
"MetricsTrigger": {
"TriggerCondition": "[variables('MyAlert').MetricsTrigger.TriggerCondition]",
"Operator": "[variables('MyAlert').MetricsTrigger.Operator]",
"Value": "[variables('MyAlert').MetricsTrigger.Value]"
}
},
"Throttling": {
"DurationInMinutes": "[variables('MyAlert').ThrottleMinutes]"
},
"AzNsNotification": {
"GroupIds": "[variables('MyAlert').AzNsNotification.GroupIds]",
"CustomEmailSubject": "[variables('MyAlert').AzNsNotification.CustomEmailSubject]"
}
}
}
]
}
QUESTION
In azure automation, when you define a webhook for a runbook the headers of the request are passed to the runbook via the WEBHOOKDATA
input parameter. For python workbooks, the parameter is passed as first argument to the script.
For example, here is a runbook:
...ANSWER
Answered 2018-Mar-23 at 20:17actually I think that your problem is a malformed JSON string. Notice that your string does not have quotes:
QUESTION
I have done all the steps of the following tutorial to have a runbook for automating index and statistic maintenance:
I was able to complete all the tutorial without errors, but when I execute the runbook, it returns me an error:
...ANSWER
Answered 2018-Feb-27 at 02:30Follow that blog, I reproduced your error.
You can deploy sqlserver module via this page:
Here is my runbook:
QUESTION
I have MVC website in which I have called Runbook from Webhook Uri but now I want to pass input parameters to runbook. Following code I wrote to call runbook and pass parameters but parameters are going in Webhookdata instead of going as inputs.
...ANSWER
Answered 2018-Feb-23 at 06:55I got answer. We have to use that webhook-data to fetch out input parameters. Check code below to get input parameters from runbook script.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install Azure-Automation
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page