azure-sdk

Monitoring using Azure Linux Diagnostics

不羁岁月 提交于 2019-12-12 04:58:23
问题 I am trying to enable Linux Diagnostics for individual disks attached to the VM. I am referring to this link (https://docs.microsoft.com/en-us/azure/virtual-machines/linux/diagnostic-extension) I am using this CLI azure vm extension set vmturbo DiagnosticTest LinuxDiagnostic Microsoft.Azure.Diagnostics '3.0' --private-config-path PrivateConfig.json --public-config-path PublicConfig.json -v And this is how PrivateConfig.json looks like { "storageAccountName" : “XXXXXXXXXX”,

Azure Python SDK- Spinup VM with cloud-init

自作多情 提交于 2019-12-11 17:43:00
问题 I'm trying to spin up VM with cloud-init using Azure SDK. Script is based on this example: https://github.com/Azure-Samples/virtual-machines-python-manage/blob/master/example.py I have added following: with open(cloudinit, "r") as cl: clcont=cl.read() # CUSTOM_DATA=base64.b64encode(clcont.encode('utf-8')).decode('ascii') CUSTOM_DATA=clcont Next in the function create_vm_parameters added: 'custom-data': CUSTOM_DATA I have tried following examples: passed base64, base64 ascii decoded as well as

How to run azure function deployed on portal manually via Kudu Api dynamically?

戏子无情 提交于 2019-12-11 11:33:14
问题 I have a time trigger azure function deployed on portal. It runs daily at 10:00 am. However, there is now a requirement that function should also be invoked and run on some other time dynamically as well. I know how to set the trigger in function.json file dynamically via Kudu Api using the steps in answer mentioned here. So using those steps, I can set the trigger for the next minute and run the function. But this isn't real-time, this seems a workaround. Isn't there any direct way to invoke

Azure API Throttling

谁说胖子不能爱 提交于 2019-12-11 07:06:29
问题 I am trying to get a list of all Storage Accounts present in my Azure subscription but I am getting a throttling error. com.microsoft.azure.CloudException: Status code 429, {"error":{"code":"ResourceCollectionRequestsThrottled","message":"Operation 'Microsoft.Storage/storageAccounts/read' failed as server encountered too many requests. Please try after '17' seconds. Tracking Id is 'e982a894-0f3e-4291-a9b3-e147c18f8f60'."}} The request prior to this request prints there are 13869 more

How to get public IP of Azure VM using Azure SDK

烂漫一生 提交于 2019-12-11 01:34:38
问题 For a specific VM, I want to be able to retrieve the public IP address. I know how to get all public IP addresses for a resource group, I also know how to get a nic-id for a specific VM - but I can't figure out how to connect the two. This is what I have: var resourceGroupName = "My-Resource-Group"; var vmName = "MyVM"; var subscriptionId = "bzz-bzz-bzz-bzz-bzz-bzz"; var tenantId = "bar-bar-bar-bar-bar-bar"; string clientId = "foo-foo-foo-foo-foo-foo"; string clientSecret =

Using authentication token in azure sdk fluent

寵の児 提交于 2019-11-29 18:44:44
问题 To authenticate with Azure in azure sdk fluent nuget, there is a method that uses client id and secret as below var azureCredentials = new AzureCredentials(new ServicePrincipalLoginInformation { ClientId = "ClientId", ClientSecret = "ClientSecret" }, "tenantId", AzureEnvironment.AzureGlobalCloud); Is there any interface where authentication token (JWT) can be used instead of using client id and secret while creating IAzure in the below code? _azure = Azure .Configure() .WithLogLevel

How Storage API can be used to get Azure Classic VM metrics?

蹲街弑〆低调 提交于 2019-11-29 17:09:25
Can we collect metrics for Azure Classic VM using Storage API or is there any other way to get the metrics for Azure Classic VM please suggest. To get the Azure VM metrics from a Azure Storage Service, you need to enable Diagnostics and configure the Storage Account on Azure portal. After that, you will find that multi tables will be created to store the metrics. The tables are with the following naming conventions: WADMetrics : Standard prefix for all WADMetrics tables PT1H or PT1M : Signifies that the table contains aggregate data over 1 hour or 1 minute P10D : Signifies the table will