Centralized logging to Log Analytics? #72
Replies: 4 comments
-
This is a very cool idea and certainly possible. It is outside of the scope of LSUClient to integrate this as a built-in feature, but you can push any of the data you get back from LSUClient to Azure Monitor yourself with the API calls in the article you linked. Unfortunately I have not had the chance to do much with Azure Monitor yet myself so I personally cannot help you with that. If you have a small working example, maybe we can add it to the docs which are also built from a public repository here on GitHub. There is already a simple example of logging in the best-practices article: https://github.com/jantari/LSUClient-docs/blob/main/content/docs/topics/best-practices.md#3-write-a-logfile so this would fit in there I think. |
Beta Was this translation helpful? Give feedback.
-
I got a small start at least :) Not really sur how to get the write-* outputs to a json object so it could be sent to the log analytics workspace. |
Beta Was this translation helpful? Give feedback.
-
Updated the script above with more logging. |
Beta Was this translation helpful? Give feedback.
-
I've enabled the GitHub "Discussions" feature for this repository and moved this issue over here so it can stay open indefinitely, separate from actual issue reports, and everyone who's interested in this topic can kind of follow along or contribute how they're approaching this. |
Beta Was this translation helpful? Give feedback.
-
Describe the solution you'd like
Centralize logging to a Log Analytics workspace.
Describe alternatives you've considered
Save to fileserver
Additional context
https://wintellisys.com/store-custom-logs-in-azure-log-analytics-workspace-using-powershell/
Beta Was this translation helpful? Give feedback.
All reactions