Azure python sdk for VM Resource Monitoring - python

I can retrieve the VM state by using Azure python sdk. Now I tried to get the VMs resource usage [ CPU, bandwith, disk ]. But unable to find the option for it.
Someone please share the link if its available,.

We don't have full-packaged support for that currently. I suggest you to follow this issue on the Python SDK Github account:
https://github.com/Azure/azure-sdk-for-python/issues/555
It's on the close roadmap.
(I'm the guy in charge of the Python SDK at MS)

Related

Is there a way to check on past Pivot Cloud Foundry (PCF) CLI buildpacks?

I'm currently attempting to stop utilizing a web proxy which allows internet access from an AWS Virtual Private Cloud as it won't be in use anymore soon. I also use the internet access to fetch data from an API endpoint which has past buildpack data such as the version and name of the buildpack itself. (https://buildpacks.cloudfoundry.org/#/buildpacks) General information is that I'm currently using python and AWS to do what I am doing.
Despite my research, I haven't been able to find such a CLI command which allows me to get this data without usage of this PCF API. Is there any way to do this without internet access?

Azure monitor when to use Azure monitor query client library and when to use monitor management client library from Azure Monitor Python SDK?

I read through the microsoft documentation about the Azure monitor Python SDK. and I found it pretty unclear what the differences between the azure.mgmt.monitor and the azure-monitor-query python SDK libraries. the only thing I found is that the query client is only able to make GET calls. but the management client is also able to make a GET call for the metrics. I need to query metrics from a virtual machine running in microsoft azure. But I find it rather unclear which of the two libraries should be used. I think I need the query client because I only need to get data from azure I will never have to post data. And there isn't really any third party documentation. So does anyone have any clue which one should be used for which purposes?
Link To official documentation of the query and management client:
https://learn.microsoft.com/en-us/python/api/overview/azure/monitor?view=azure-python

How to get Azure VM uptime/runtime (time in running status) with Azure Python SDK

Is it any way to get how long time a Azure VM have been in running status (uptime/runtime) with use of the Azure Python SDK?
A code example would be verry helpfull.
Or any hint om where I should look to find out how to do this.
Br. Rune
As I known, there is not an existing API to get the uptime value using Azure Python SDK for Azure VM. There is a feedback about uptime which you can follow up for this feature.
Per my experience, a workaround way is that you can install some third-party libraries like uptime in Python on Azure VM to get the system uptime value to publish it via HTTP or sending to other Azure stores on schedule, then you can call or retrieve to get it when you need.
Hope it helps.

Does the azure python sdk support the azure resource manager api?

I'm new to azure, I see that a new api/abstraction has been released called Azure Resource Manger, which will superceed older azure service management :
I was trying to spin up an instance using the azure python sdk, but I see the sdk still using the older concepts (afinity groups, virtual networks, hosted services). There is no mention of resource groups. Are this supported? If not when will this be added to the sdk?
Per my experience, currently Python SDK doesn't provide packages for new Azure Resource Manager APIs while it provides components, i.e. ServiceManagement, Storage, and ServiceBus. Please feel free to submit your ideas and feedback on https://github.com/Azure/azure-sdk-for-python/issues.
You might want to take a look at the azure-mgmt collection of packages, which use the new Resource Manager APIs.

python library which can be used for vSphere WS SDK

I am looking for a python library which can be used for accessing vSphere WS SDK. I have came across two which are having non GPL license:
psphere - https://github.com/jkinred/psphere
pysphere - https://code.google.com/p/pysphere/
Has anybody used these in production. I do not want these for test automation but for a product which could go on a scale of upto 25K VMs.
I saw this post Python - VMWare vSphere (WEB SDK) - SUDS. But there he seems to be using it for test automation only. Also I am not only looking for VM operations but also other objects like Host, Cluster, PortGroup, vDS etc.
Regards,
Litty
VMware has published an initial release of their vSphere SDK for Python two weeks ago: pyVmomi
I don't know psphere or pysphere but I've used Suds to access the vSphere Web Services. Worked pretty well.
The vSphere WS API is SOAP based and,to the best of my knowledge, exposes everything that's possible via vCenter. It's a bit tricky sometimes, but you can do it.
I don't know what you try to achieve but you should be able to do it with Suds. Of course, you'd have to familiarize yourself with the API: vSphere Web Services SDK
At the moment, we're playing around a bit with vCenter Orchestrator. It's a nice tool (since 5.0). Maybe that's an option for you, too.

Categories

Resources