Azure 认知搜索使用情况监控
我有多个 Azure 认知搜索服务,分布在不同的订阅中。我想监控每个服务的使用情况,应包括:
- 存储:当前/配额号
- 。索引:当前/配额
- 号索引器:当前/配额
- 号数据源:当前/配额
,因为我可以通过 Azure 门户中的“概述/使用情况”窗格或通过 Management RestAPI 访问它们。
我想将此数据推送到 Grafana 监控,但我遇到了一些问题:
- 我无法从 Metrics 中获取此类数据
- 诊断设置不允许导出此类数据(仅有的指标和操作日志)
由于可以通过 RestAPI 访问使用数据,我正在考虑创建 Function App,它将 ping 每个搜索服务以收集数据,然后将其推送到 Log Analytics,然后我可以在 Grafana 中使用它。也许我可以为每个订阅拥有一个功能应用程序,并使用 RBAC 授予对搜索服务的访问权限,但我仍然不喜欢让一个应用程序可以访问多个搜索服务。
除了使用函数应用程序之外,如何将数据从 RestAPI 推送到 Log Analytics/Grafana?
I have multiple Azure Cognitive Search services, distributed among different subscriptions. I would like to monitor the usage of each service, what should include:
- storage: current/quota
- no. indexes: current/quota
- no. indexers: current/quota
- no. data sources: current/quota
as I can access them through Overview/Usage pane in Azure portal or through Management RestAPI.
I would like to push this data to Grafana monitoring but I have some problems around that:
- I am not able to fetch this type of data from Metrics
- diagnostic settings does not allow to export this type of data (only metrics and operation logs)
Since it's possible to access the usage data through RestAPI I was thinking about creating Function App, that will ping each search service to collect the data and then push it to Log Analytics, which I can then use in Grafana. Maybe I can have one function app per subscription and use RBAC to grant access to search services, but still I don't like to have one app that have access to multiple search services.
How can I push the data from RestAPI to Log Analytics/Grafana other than using a function app?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
截至目前,除了通过附加功能将此数据推送到目的地之外,似乎没有其他选择。
As of now, it looks like there is no other option other than pushing this data via additional function to your destination.
使用指向搜索服务资源的 Grafana JSON API 数据源。
使用以下设置。将其他所有内容保留为默认值。
然后您可以从返回的 JSON 中获取您想要的值。
例如,用于索引总数的字段是 $.counters.indexesCount.usage
Use the Grafana JSON API data source pointed at the search service resource.
Use the following settings. Leave everything else at the default.
You can then get the values you want from the returned JSON.
E.g. the field to use for the total number of indexes is $.counters.indexesCount.usage