Azure Microsoft Insights API 2016-09-01收集指标时出错 [英] Azure Microsoft Insights API 2016-09-01 Error while collecting Metrics

查看:42
本文介绍了Azure Microsoft Insights API 2016-09-01收集指标时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

请帮助我了解为什么最近几天Azure Microsoft Insights API 2016-09-01出现以下错误{ "code": "BadRequest", "message": "only conditions of the form '<name> eq <value>' are allowed, where <name> = 'timeGrain', 'startTime', 'endTime', 'name.value', 'aggregationType', 'debugRegion' : ( name.value eq 'Disk Write Bytes' ) and timeGrain eq duration'PT5M' and startTime eq 2017-10-25T13:27:49.620 0000 and endTime eq 2017-10-25T13:32:49.620 0000 " } 几天前它工作正常旧的工作网址---> https://management.azure.com/subscriptions/452529bb-083b-411a-a5c2-30c735222/resourceGroups/Preprod2-Resource-Group/providers/Microsoft.Compute/virtualMachines/mw-mcs-test3/providers/microsoft.insights/metrics?api-version=2016-09-01&$filter=%28+name.value+eq+%27Disk+Write+Operations%2FSec%27+or++name.value+eq+%27Percentage+CPU%27+or++name.value+eq+%27Network+In%27+or++name.value+eq+%27Network+Out%27+or++name.value+eq+%27Disk+Read+Operations%2FSec%27+or++name.value+eq+%27Disk+Read+Bytes%27+or++name.value+eq+%27Disk+Write+Bytes%27++%29+and+timeGrain+eq+duration%27PT5M%27+and+startTime+eq+2017-05-26T10%3A52%3A28.475%2B0000+and+endTime+eq+2017-05-26T10%3A57%3A28.476%2B0000+

Please help me to understand why from last few days Azure Microsoft Insights API 2016-09-01 is giving the following error{ "code": "BadRequest", "message": "only conditions of the form '<name> eq <value>' are allowed, where <name> = 'timeGrain', 'startTime', 'endTime', 'name.value', 'aggregationType', 'debugRegion' : ( name.value eq 'Disk Write Bytes' ) and timeGrain eq duration'PT5M' and startTime eq 2017-10-25T13:27:49.620 0000 and endTime eq 2017-10-25T13:32:49.620 0000 " } few days back it was working fine Old working URL---> https://management.azure.com/subscriptions/452529bb-083b-411a-a5c2-30c735222/resourceGroups/Preprod2-Resource-Group/providers/Microsoft.Compute/virtualMachines/mw-mcs-test3/providers/microsoft.insights/metrics?api-version=2016-09-01&$filter=%28+name.value+eq+%27Disk+Write+Operations%2FSec%27+or++name.value+eq+%27Percentage+CPU%27+or++name.value+eq+%27Network+In%27+or++name.value+eq+%27Network+Out%27+or++name.value+eq+%27Disk+Read+Operations%2FSec%27+or++name.value+eq+%27Disk+Read+Bytes%27+or++name.value+eq+%27Disk+Write+Bytes%27++%29+and+timeGrain+eq+duration%27PT5M%27+and+startTime+eq+2017-05-26T10%3A52%3A28.475%2B0000+and+endTime+eq+2017-05-26T10%3A57%3A28.476%2B0000+

新的无效网址---> https://management.azure.com/subscriptions/452529bb-083b-411a-a5c2-30c735222/resourceGroups/MWatchLab-dev-kafka-bridge-oldcore-357248/providers/Microsoft.Compute/virtualMachines/dev-kafka-bridge-oldcore/providers/microsoft.insights/metrics?api-version=2016-09-01&$filter=%28+name.value+eq+%27Disk+Write+Operations%2FSec%27+or++name.value+eq+%27Percentage+CPU%27+or++name.value+eq+%27Network+In%27+or++name.value+eq+%27Network+Out%27+or++name.value+eq+%27Disk+Read+Operations%2FSec%27+or++name.value+eq+%27Disk+Read+Bytes%27+or++name.value+eq+%27Disk+Write+Bytes%27++%29+and+timeGrain+eq+duration%27PT5M%27+and+startTime+eq+2017-10-26T05%3A28%3A34.919%2B0000+and+endTime+eq+2017-10-26T05%3A33%3A34.919%2B0000+

New not working URL--->https://management.azure.com/subscriptions/452529bb-083b-411a-a5c2-30c735222/resourceGroups/MWatchLab-dev-kafka-bridge-oldcore-357248/providers/Microsoft.Compute/virtualMachines/dev-kafka-bridge-oldcore/providers/microsoft.insights/metrics?api-version=2016-09-01&$filter=%28+name.value+eq+%27Disk+Write+Operations%2FSec%27+or++name.value+eq+%27Percentage+CPU%27+or++name.value+eq+%27Network+In%27+or++name.value+eq+%27Network+Out%27+or++name.value+eq+%27Disk+Read+Operations%2FSec%27+or++name.value+eq+%27Disk+Read+Bytes%27+or++name.value+eq+%27Disk+Write+Bytes%27++%29+and+timeGrain+eq+duration%27PT5M%27+and+startTime+eq+2017-10-26T05%3A28%3A34.919%2B0000+and+endTime+eq+2017-10-26T05%3A33%3A34.919%2B0000+

请帮助我解决此问题,这在我的生产环境中引起了巨大的问题.

Please help me fix this its is causing huge issues in my production environment.

推荐答案

较早地支持了+and+timeGrain+eq+duration%27PT5M%27+and+startTime+eq+2017-05-26T10%3A52%3A28.475%2B0000+and+endTime+eq+2017-05-26T10%3A57%3A28.476%2B0000+的问题(即在Java中,我正在使用SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss. SSSZ)),但如今我不这样做了,他们已经删除了%2B0000,因此只有它可以工作+and+timeGrain+eq+duration%27PT5M%27+and+startTime+eq+2017-05-26T10%3A52%3A28.475+and+endTime+eq+2017-05-26T10%3A57%3A28.476(所以现在我已更改为SimpleDateFormat(" yyyy-MM-dd'T'HH:mm:ss.SSS))

The issue was earlier +and+timeGrain+eq+duration%27PT5M%27+and+startTime+eq+2017-05-26T10%3A52%3A28.475%2B0000+and+endTime+eq+2017-05-26T10%3A57%3A28.476%2B0000+ was supported (i.e in java i was using SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSZ")) but i dono nowadays they have removed %2B0000 so only this will work +and+timeGrain+eq+duration%27PT5M%27+and+startTime+eq+2017-05-26T10%3A52%3A28.475+and+endTime+eq+2017-05-26T10%3A57%3A28.476 (so now i have changed to SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS"))

这篇关于Azure Microsoft Insights API 2016-09-01收集指标时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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