我们的服务将大量自定义事件和指标写入 App Insights。 使用人工智能门户,我们可以进行复杂的查询并查看漂亮的图表,但我想从门户外部访问数据。 Azure Application Insights REST API 页面 ( https://dev.applicationinsights.io ) 声称这些 API 可用于执行此类任务,但我无法使它们工作 - 同样,我想查询自定义事件和指标,而不是标准事件和指标。 有人有例子吗? 例如,这是我们的一个查询:
customEvents
| where name startswith "Monitor.Xxxxxxx"
| summarize count() by bin(timestamp, 1min)
| order by timestamp desc
最佳答案
原来我使用了错误的AppId/Key;一旦我插入正确的,我就可以使用 API Explorer。
关于azure - 使用 Azure Application Insights REST API (https ://dev. applicationinsights.io) 读取自定义事件/指标,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43150973/