资源不支持创建警报规则指标 [英] Creating Alert Rules metric is not supported for resource

查看:61
本文介绍了资源不支持创建警报规则指标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试创建带有指标"\ LogicalDisk(_Total)\%Free Space"的规则时, ,那么我有一个错误:
Add-AzureRmMetricAlertRule:异常类型:ErrorResponseException,消息:资源'/subscriptions/xxxxxxxxxxxx/xxxxxxx/xxxxxx'不支持度量标准'\ Processor(_Total)\%Processor Time'.如果这是访客代理指标,请确保 您已经成功配置了诊断扩展,并能够在Azure门户中查看指标.,代码:UnsupportedMetric,状态代码
:BadRequest,原因短语:错误请求
在第1行:char:1
+ Add-AzureRmMetricAlertRule-名称DiskSpacetest-位置XXXXXX ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          :CloseError:(:) [Add-AzureRmMetricAlertRule],PSInvalidOperationException
    + FullyQualifiedErrorId:Microsoft.Azure.Commands.Insights.Alerts.AddAzureRmMetricAlertRuleCommand

但是,对于百分比CPU",指标可能没有其他问题.

When I try to create a rule with a metric "\LogicalDisk(_Total)\%Free Space" , then I have an error:
Add-AzureRmMetricAlertRule : Exception type: ErrorResponseException, Message: The metric '\Processor(_Total)\% Processor Time' is not supported for resource '/subscriptions/xxxxxxxxxxxx/xxxxxxx/xxxxxx'. If this is a guest agent metric, please make sure that you have successfully configured the diagnostics extension and that you are able to see the metric in the Azure Portal., Code: UnsupportedMetric, Status code
:BadRequest, Reason phrase: Bad Request
At line:1 char:1
+ Add-AzureRmMetricAlertRule -Name DiskSpacetest -Location XXXXXX ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : CloseError: (:) [Add-AzureRmMetricAlertRule], PSInvalidOperationException
    + FullyQualifiedErrorId : Microsoft.Azure.Commands.Insights.Alerts.AddAzureRmMetricAlertRuleCommand

But with the "Percentage CPU" metric there is no such problem. Probably with this type of metrics need to work by another way?

推荐答案

您好,SIDERMANN,您必须提供指标名称为"

Hi SIDERMANN, you must have provided the metric name as "\LogicalDisk(_Total)\%Free Space" instead of providing it as "\LogicalDisk(_Total)\% Free Space". Provide it correctly (with required spaces) and then the issue should be resolved.

为便于说明,您也可以参考以下屏幕截图.

For illustration you may refer below screenshots as well.


这篇关于资源不支持创建警报规则指标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆