Load Balanced Umbraco AWS
# help-with-umbraco
t
Hi, I am trying to run Umbraco in AWS under a Load Balanced environment for the front-end. I am planning on using the back-end to access all logs and have no back-office functionality for the front-end. However, my back-office is in one Elastic Container Service Cluster (1 Task tho) while my front-end is in a separate cluster (with 4 Tasks), so I do not believe I can have them mounted to the same volume to write to. I would like to know if it is possible to use the Directory key in [Logging settings](https://docs.umbraco.com/umbraco-cms/reference/configuration/loggingsettings) to read from a url instead of a volume so that the back-office can read from a single location while I use the Sink feature of Serilog to have both clusters write to the same place
Anyone?
hello?
m
our approach is to
Copy code
json
"Serilog": {
  "MinimumLevel": {
    "Default": "Information"
  },
  "WriteTo": [
    {
      "Name": "Async",
      "Args": {
        "configure": [
          {
            "Name": "Seq",
            "Args": {
              "apiKey": "XXXXX",
              "restrictedToMinimumLevel": "Information"
            }
          }
        ]
      }
    },
    {
      "Name": "UmbracoFile",
      "Args": {
        "RestrictedToMinimumLevel": "Fatal"
      }
    }
  ]
},
So filebased logging is restricted.. and then add a centralised external log, for us via SEQ.. (adding
<PackageReference Include="Serilog.Sinks.Seq" Version="8.0.0" />
) With https://datalust.co/ GUI/server setup for great log reporting etc.. but no reason why you can't use any centralised log store supported by serilog sinks.. https://github.com/serilog/serilog/wiki/provided-sinks
l
Personally it sounds like a bad idea to have a file based logging system with many instances writing to it. In Azure we simply use application insights for instance.
m
yep.. and there is a serilog sink for that too! https://github.com/serilog-contrib/serilog-sinks-applicationinsights
l
Yeah, we use that one 🙂
Copy code
json
    "Serilog": {
        "Using": [ "Serilog.Sinks.ApplicationInsights" ],
        "MinimumLevel": {
            "Default": "Information"
        },
        "WriteTo": [
            {
                "Name": "ApplicationInsights",
                "Args": {
                    "connectionString": "***",
                    "telemetryConverter": "Serilog.Sinks.ApplicationInsights.TelemetryConverters.TraceTelemetryConverter, Serilog.Sinks.ApplicationInsights"
                }
            }
        ]
    },
m
Have used it once or twice.. I seem to remember it creates logs as
type=trace
though so nothing shows on the info graphs in the azure portal backoffice , failed requests etc...
t
this is super helpful! thank you so much
15 Views