[英]How to send Azure costs and usage data to log analytics workspace or directly to azure metrics?
I need to build a dashboard which will visuallize the usage and cost of many azure subscriptions.我需要构建一个仪表板,以可视化许多 azure 订阅的使用情况和成本。 accounts, departments.
账户,部门。 My plan was:
我的计划是:
Problem is with step 1, I dont know how to send the data that is 'behind' the Azure Cost Analysis view, to the log analytics workspace.问题出在第 1 步,我不知道如何将 Azure 成本分析视图“背后”的数据发送到日志分析工作区。 I thought of two solutions:
我想到了两个解决方案:
Both solutions seems to me a bit 'overkilling' - is there a more direct approach to send the cost analysis data to log analytics workspace?这两种解决方案在我看来都有点“矫枉过正”——是否有更直接的方法将成本分析数据发送到日志分析工作区? If there is no option such as that, I would be happy to know how would you suggest moving the exported data from the storage account to the log analytics, or do you have some other idea?
如果没有这样的选择,我很高兴知道您建议如何将导出的数据从存储帐户移动到日志分析,或者您有其他想法吗?
Thank you!谢谢!
I believe a direct approach is currently not available but I see this feature request raised in UserVoice / feedback forum for the same requirement.我相信目前还没有直接的方法,但我看到在 UserVoice / 反馈论坛中针对相同的要求提出了此功能请求。 If interested, you may upvote it because in general the responsible Azure product / feature team would triage / start checking feasibility and prioritizing a received feedback based on various factors like number of votes a feedback receives, feasibility, open prioritized backlog items, etc.
如果有兴趣,您可以投票,因为通常负责的 Azure 产品/功能团队将根据各种因素(例如反馈收到的票数、可行性、打开优先级积压项目等)对收到的反馈进行分类/开始检查可行性并确定收到的反馈的优先级。
I would suggest you to fetch the data from azure cost & billing API and send that data to Log Analytics from a REST API client by using the HTTP Data Collector API. I would suggest you to fetch the data from azure cost & billing API and send that data to Log Analytics from a REST API client by using the HTTP Data Collector API. For more information and illustration with examples, refer this Azure document.
有关更多信息和示例说明,请参阅此Azure 文档。 Or else if you want to fetch the data from azure cost & billing API and store it in a machine then you may go with custom logs.
或者,如果您想从 azure 成本和计费 API 中获取数据并将其存储在机器中,那么您可以使用自定义日志 go 获取数据。 For more information w.r.t it, refer this Azure document.
有关 w.r.t 的更多信息,请参阅此Azure 文档。
Other related references:其他相关参考:
Hope this helps!希望这可以帮助! Cheers!
干杯!
The only native solution is, to schedule from the Costs-Blade an export of the Costs as CSV into a StorageAccount.唯一的本机解决方案是,从成本刀片安排将成本作为 CSV 导出到 StorageAccount。 If you want to load the Data into a Log-Analytics-Workspace, Azure Automation and a scheduled Script would work.
如果您想将数据加载到日志分析工作区,Azure 自动化和预定脚本将起作用。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.