Create-AzDiagPolicy

2.8

This script takes a SubscriptionID, ResourceType, ResourceGroup as parameters, analyzes the subscription or
specific ResourceGroup defined for the resources specified in $Resources, and builds a custom policy for
diagnostic metrics/logs for Event Hubs, Storage and Log Analytics as sink points for selected resource types.

Installation Options

Copy and Paste the following command to install this package using PowerShellGet More Info

Install-Script -Name Create-AzDiagPolicy

You can deploy this package directly to Azure Automation. Note that deploying packages with dependencies will deploy all the dependencies to Azure Automation. Learn More

Manually download the .nupkg file to your system's default download location. Note that the file won't be unpacked, and won't include any dependencies. Learn More

Author(s)

jbritt@microsoft.com

Copyright

Microsoft

Owners

Functions

BuildBody Get-ResourceType Add-IndexNumberToArray New-LogArray New-MetricArray Update-LogAnalyticsJSON Update-EventHubJSON Update-StorageJSON Parse-ResourceType Validate-JSON New-PolicyInitiative Format-JSON Create-Hash

Dependencies

This script has no dependencies.

Release Notes

May 05, 2021 2.8
Update
* Adding the ability to leverage a dedicated table (instead of AzureDiagnostics) for resourceTypes that support it
Reference Link: https://docs.microsoft.com/en-us/azure/azure-monitor/essentials/resource-manager-diagnostic-settings#diagnostic-setting-for-recovery-services-vault
THANK YOU Eric Golpe (Principal Cloud Solution Architect) - Microsoft for leaning in and driving this change on behalf of a customer requirement.
Note: Utilize -Dedicated switch to enable.  This will be a blanket configuration for all policies and will only enable for those resourceTypes that
support it.  Otherwise, the default will be AzureDiagnostics table

Version History

Version Downloads Last updated
2.8 (current version) 23 5/25/2021