无法在新的Azure AZ 2.0 Powershell模块中列出警报

时间:2019-05-19 14:28:22

标签: azure azure-monitoring

我已经部署了多资源度量标准(新)警报来监视我所有VM的CPU。目前,我的订阅中有两个打开的Monitor警报(状态:已发射)。

alerts fired in portal

问题是,当我尝试通过Azure AZ模块从PC检索打开的警报时,我不断收到相同的消息,但是没有任何输出(尽管我可以在门户中看到警报):

WARNING: 5:01:06 PM - *** The namespace for all the model classes will change from
Microsoft.Azure.Management.Monitor.Management.Models to Microsoft.Azure.Management.Monitor.Models in future releases.
WARNING: 5:01:06 PM - *** The namespace for output classes will be uniform for all classes in future releases to make
it independent of modifications in the model classes.
WARNING: [Get-AzAlertHistory] Parameter deprecation: The DetailedOutput parameter will be deprecated in a future
breaking change release.

我无法使用任何Get-AzAlertHistory cmdlet检索警报历史记录:

PS C:\Users\Administrator> Get-AzAlertHistory
WARNING: 5:15:08 PM - *** The namespace for all the model classes will change from
Microsoft.Azure.Management.Monitor.Management.Models to Microsoft.Azure.Management.Monitor.Models in future releases.
WARNING: 5:15:08 PM - *** The namespace for output classes will be uniform for all classes in future releases to make
it independent of modifications in the model classes.
WARNING: [Get-AzAlertHistory] Parameter deprecation: The DetailedOutput parameter will be deprecated in a future
breaking change release.
PS C:\Users\Administrator> Get-AzAlertHistory -Caller Microsoft.Insights/alertRules
WARNING: 5:15:38 PM - *** The namespace for all the model classes will change from
Microsoft.Azure.Management.Monitor.Management.Models to Microsoft.Azure.Management.Monitor.Models in future releases.
WARNING: 5:15:38 PM - *** The namespace for output classes will be uniform for all classes in future releases to make
it independent of modifications in the model classes.
WARNING: [Get-AzAlertHistory] Parameter deprecation: The DetailedOutput parameter will be deprecated in a future
breaking change release.
PS C:\Users\Administrator> Get-AzAlertHistory -Status Fired
WARNING: 5:16:04 PM - *** The namespace for all the model classes will change from
Microsoft.Azure.Management.Monitor.Management.Models to Microsoft.Azure.Management.Monitor.Models in future releases.
WARNING: 5:16:04 PM - *** The namespace for output classes will be uniform for all classes in future releases to make
it independent of modifications in the model classes.
WARNING: [Get-AzAlertHistory] Parameter deprecation: The DetailedOutput parameter will be deprecated in a future
breaking change release. 

当前的az.monitor模块是否有问题?

0 个答案:

没有答案