For a comprehensive overview of the topic, you can read the full post at the following link. Below is a brief summary of Morten's key points:
Maintaining azure diagnostic policies can be a bit of a slog, as existing approach often have a splattering of hardcoded values that need to be cared for.
With this in mind, I tried to look at the problem and come up with a better way of organizing the content of these policies.
Put all metric and log categories as parameters, and if any changes to these occur. One only need to edit and add/remove categories from a parameter in the given policy.
New diagnostic policy for azure service, is much easier using the framework below. Only need to edit and add service type (<serviceType>) and metric/log categories supported for service.
Not needing to delete assignment to update policy definition when changes to metric/log category occurs.
Comentarios