简体   繁体   English

在Azure中收集Service Fabric群集日志

[英]Collect Service Fabric Cluster logs in Azure

I am new to Service Fabric Cluster and I am trying to collect logs from my cluster in Azure. 我是Service Fabric群集的新手,正在尝试从Azure群集中收集日志。

Basically, I have an event source "XXXXX" defined in ServiceEventSource.cs. 基本上,我在ServiceEventSource.cs中定义了一个事件源“ XXXXX”。 Locally, when I add this source to the ETW Providers in the Diagnostics Events view in VS2015, it shows correctly the logs. 在本地,当我将此源添加到VS2015的“诊断事件”视图中的ETW提供程序时,它将正确显示日志。

In Azure, I am unable to collect any logs. 在Azure中,我无法收集任何日志。 When I created my cluster, 5 storage accounts have been added but I am unable to see logs in the stored blobs. 创建群集时,已添加了5个存储帐户,但无法在存储的Blob中看到日志。 I tried to edit the template.json file based on this article . 我试图根据本文编辑template.json文件。 I added an entry in EtwEventSourceProviderConfiguration : 我在EtwEventSourceProviderConfiguration添加了一个条目:

"EtwEventSourceProviderConfiguration": [
     {
         "provider": "Microsoft-ServiceFabric-Actors",
         "scheduledTransferKeywordFilter": "1",
         "scheduledTransferPeriod": "PT5M",
         "DefaultEvents": {
             "eventDestination": "ServiceFabricReliableActorEventTable"
         }
     },
     {
        "provider": "Microsoft-ServiceFabric-Services",
        "scheduledTransferPeriod": "PT5M",
        "DefaultEvents": {
          "eventDestination": "ServiceFabricReliableServiceEventTable"
         }
     },
     {
        "provider": "XXXXX",
        "scheduledTransferPeriod": "PT5M",
        "DefaultEvents": {
          "eventDestination": "ServiceFabricReliableServiceEventTable"
         }
     }
],

Then I deployed this modified template but I am still unable to collect logs. 然后,我部署了此修改后的模板,但仍然无法收集日志。

Any help would be very appreciated ! 任何帮助将不胜感激! Thanks 谢谢

I finally found the logs in Azure. 我终于在Azure中找到了日志。

The destination is specified in the template : "eventDestination": "ServiceFabricReliableServiceEventTable" and this is stored in a table in a storage account specified in the template too. 目标在模板中指定: "eventDestination": "ServiceFabricReliableServiceEventTable" ,该目标也存储在模板中指定的存储帐户的表中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM