如何使用 python azurerm sdk 查找 azure vm cpu 利用率统计信息
How to find an azure vm cpu utilization statistics, using python azurerm sdk
我无法使用 azurerm python sdk 找到 azurerm 的 cpu 利用率。
@Ramani,我不知道有什么 Azure SDK for Python 的 API 可以直接获取 Azure VM CPU 利用率数据,甚至是 Azure REST API。
但是,有一种方法可以帮助您获取包括 CPU 利用率在内的 VM 诊断数据,请参见下文。
- 您需要参考文章Microsoft Azure Virtual Machine Monitoring with Azure Diagnostics Extension to save the diagnostic data into Azure Table Storage if you are using Windows VM. For Linux VM, please see the article Use the Linux Diagnostic Extension to monitor the performance and diagnostic data of a Linux VM。
- 然后,您可以通过工具
AzureStorageExplorer
, and get these data using Python SDK for Azure Table Storage查看诊断数据,过滤您需要的数据。
我无法使用 azurerm python sdk 找到 azurerm 的 cpu 利用率。
@Ramani,我不知道有什么 Azure SDK for Python 的 API 可以直接获取 Azure VM CPU 利用率数据,甚至是 Azure REST API。
但是,有一种方法可以帮助您获取包括 CPU 利用率在内的 VM 诊断数据,请参见下文。
- 您需要参考文章Microsoft Azure Virtual Machine Monitoring with Azure Diagnostics Extension to save the diagnostic data into Azure Table Storage if you are using Windows VM. For Linux VM, please see the article Use the Linux Diagnostic Extension to monitor the performance and diagnostic data of a Linux VM。
- 然后,您可以通过工具
AzureStorageExplorer
, and get these data using Python SDK for Azure Table Storage查看诊断数据,过滤您需要的数据。