-
Notifications
You must be signed in to change notification settings - Fork 173
Open
Description
I have just set up structured logging in Log Analytics using Serilog's most recent plugin.
As part of that, you have to follow a guide showing you how to use the Log Ingestion API.
The steps are roughly
- Create a Data Collection Rule (DCR) driven table in your log analytics workspace.
- Create and assign it a DCR, which itself references to a Data Collection Endpoint (DCE).
- Both the table and the DCR need an example of the JSON blob which will be sent, and the DCR needs to specify which column is the timestamp.
- The DCR needs to assign the Monitoring Metrics Publisher role to the identity used to push logs. The guide shows using an EntraId app but it actually supports System Identity now.
- The app needs to load the DCE endpoint and DCR immutable id / stream name into config for the Serilog plugin to use.
I had to do all of these steps in the portal as I couldn't find Farmer support for them, although I may have missed it.
There is a guide to deploying with ARM.
I think we would need the abilities to
- Create a DCR, which can automatically create its DCE if using ARM to deploy.
- Add a DCR driven table in the LogAnalytics builder, referencing the DCR resource.
- Supply the JSON template strings to the DCR Data Source and Log Analytics table schema, and the Timestamp field name to the DCR for the Transformation mapping
- Assign the MonitoringMetricPublisher role to the web app's SystemIdentity in the DCR builder
- Pluck out the DCR / DCE app settings we need and load them into the web app.
This is another one I am happy to pick up and have a go at if it sounds like I am on the right track? :)
Metadata
Metadata
Assignees
Labels
No labels