【问题标题】:How to forward custom logs to Azure Sentinel如何将自定义日志转发到 Azure Sentinel
【发布时间】:2021-06-21 21:57:00
【问题描述】:

我们使用 Azure Sentinel 来监控 IaaS 事件日志和 Azure 资源。作为应用程序开发人员,我想使用相同的平台来监控我们的定制应用程序。我想将自定义事件从 Azure 函数或应用服务发送到(最好)一个 HTTP 端点。例如

{
"user":"John",
"resource":"recordabc",
"result":"approved",
"time":"1 Jan 2020"
}

这可能吗,还是 Azure Sentinel 不是正确的技术?

【问题讨论】:

    标签: azure security audit azure-sentinel


    【解决方案1】:

    由于 Sentinel 使用与 Azure Monitor(或 Application Insights)相同的 Log Analytics 基础架构,因此您可以执行所有这些操作。

    有几种方法可以做到这一点:

    1. 创建一个自定义 Azure 函数,将数据提交到 Azure Sentinel 的 Log Analytics 工作区
    2. 直接从函数和应用服务调用 Log Analytics 工作区

    来自 Microsoft 的一些关于使用 Azure Functions 执行此操作的链接:

    https://docs.microsoft.com/en-us/azure/sentinel/create-custom-connector#connect-with-azure-functions

    https://zimmergren.net/log-custom-application-security-events-log-analytics-ingested-in-azure-sentinel/

    使用代码:https://github.com/Zimmergren/LogAnalytics.Client

    归结为以下步骤:

    logger.SendLogEntry(new TestEntity
    {
        Category = GetCategory(),
        TestString = $"String Test",
        TestBoolean = true,
        TestDateTime = DateTime.UtcNow,
        TestDouble = 2.1,
        TestGuid = Guid.NewGuid()
    }, "demolog").Wait();
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2019-10-08
      • 2022-08-02
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2023-01-05
      相关资源
      最近更新 更多