Azure – 通过数据工厂获取日志分析查询

huangapple go评论54阅读模式
英文:

Azure - Get Log Analtycis query trough Data Factory

问题

我正在尝试在ADF中创建一个Web活动,用于在日志分析中运行查询,并将其结果作为ADF(数据工厂)的输出。

是否可能?

我尝试生成一个ADD令牌并将其传递给Web活动:

但我收到了一个错误:

我已经授予了应用程序对Log Analytics的读取器和数据访问权限。

可以有人帮助我实现这个吗?

谢谢!

英文:

I'm trying to create a web activity in ADF to run a query in log analytics and have this result as output in ADF (Data Factory).

Is it possible ?

I tried to generate a ADD token and passed it to web Activity:
Azure – 通过数据工厂获取日志分析查询

and the url that I'm using is: https://api.loganalytics.io/v1/workspaces/[Workspace ID]/query

but I got an error:

Azure – 通过数据工厂获取日志分析查询

I already gave access to app like reader and data access to Log Analytics.

Can anyone please help me in achieving this?

Thank you!

答案1

得分: 1

我认为你需要获取令牌并在实际调用日志分析 API 时传递该令牌,这将是一个两步的工作流程。我通常在curl或postman中测试这个功能,一旦在那里成功,我就尝试在ADF中实施。

https://learn.microsoft.com/en-us/azure/azure-monitor/logs/api/access-api#client-credentials-flow

英文:

I think you have to get the bearer token and then pass that bearer token when you make the actual call to log analytics API , its going to be two step workflow . I use to test the thing in curl or postman and once it succeed there I try to implement in ADF .

https://learn.microsoft.com/en-us/azure/azure-monitor/logs/api/access-api#client-credentials-flow

huangapple
  • 本文由 发表于 2023年2月6日 19:24:49
  • 转载请务必保留本文链接:https://go.coder-hub.com/75360675.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定