当Azure Log Analytics获得新行时,写入SQL表

发布于 2025-01-25 21:43:31 字数 151 浏览 2 评论 0原文

你好互联网上的好人,我需要你的智慧。
我想写入SQL表中的一些来自Azure Log Analytics的结果,我找不到答案,但是当将新行写入日志时,是否有任何选择触发函数或过程?
此外,还有任何过滤选项,例如,只有带有特定值的行才会触发该函数/过程?
多谢 :)

Hello good people over the internet, I need your wisdom.
I want to write to SQL table some results from Azure Log Analytics, I couldn't find an answer but is there any option to trigger a function or a procedure when new row is written to the logs?
Also is there any filter option for example only row with a specific values will trigger that function/procedure?
Thanks a lot :)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

念三年u 2025-02-01 21:43:31

我不确定您要实现的目标,但是如果您捕获了DDL事件之类的东西。您可以转到Log Analytics工作区,然后登录并编写一个KQL查询以选择所需的数据,然后创建一个新的警报规则。

AzureDiagnostics //table where all audits are stored
| where Category == "SQLSecurityAuditEvents" 
| where statement_s has "alter user" //SWAP STRING YOU WANT TO SEARCH IN STATEMENTS(QUERY)
| where statement_s !has "alter table" //SWAP STRING YOU DO NOT WANT TO SEARCH IN STATEMENTS(QUERY)
| where database_principal_name_s != "DB_USER" //EXCLUDE SINGLE USER

I am not sure what you are trying to achieve but if you what something like DDL events captured. You can go to Log Analytics Workspace then Logs and write a KQL query to select data you need, and then create a new alert rule.

AzureDiagnostics //table where all audits are stored
| where Category == "SQLSecurityAuditEvents" 
| where statement_s has "alter user" //SWAP STRING YOU WANT TO SEARCH IN STATEMENTS(QUERY)
| where statement_s !has "alter table" //SWAP STRING YOU DO NOT WANT TO SEARCH IN STATEMENTS(QUERY)
| where database_principal_name_s != "DB_USER" //EXCLUDE SINGLE USER
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文