manifests/collectors/Monitor/AppInsightsProactiveDetection.psd1
|
# # GENERATED by scripts/ConvertTo-ScoutCollectorDefinition.ps1 from Modules/Public/InventoryModules/Monitor/AppInsightsProactiveDetection.ps1 (AB#5660). # Field expressions are copied verbatim from the original collector and evaluate in an # equivalent scope -- see docs/design/decisions/declarative-collectors.md. # Review before trusting; regenerate rather than hand-patch if the source collector changes. # @{ ResourceTypes = @( 'AZSC/ARMChild/AppInsightsProactiveDetection' ) ResourceTypeMatching = 'Grouped' AdditionalFilter = $null FilterPreamble = '' RowLoopVariable = '1' Preamble = @' $ai = $Resources | Where-Object { $_.id -eq $1.PARENTID } | Select-Object -First 1 $sub1 = $SUB | Where-Object { $_.Id -eq $1.subscriptionId } $ResUCount = 1 '@ AdditionalRowLoops = @() TagLoop = $null Fields = @( @{ Name = 'App Insights Name' Expression = '$ai.NAME' } @{ Name = 'Subscription' Expression = '$sub1.Name' } @{ Name = 'Resource Group' Expression = '$ai.RESOURCEGROUP' } @{ Name = 'Rule Name' Expression = 'if ($1.Name) { $1.Name } else { ''N/A'' }' } @{ Name = 'Display Name' Expression = 'if ($1.RuleDefinitions.DisplayName) { $1.RuleDefinitions.DisplayName } else { ''N/A'' }' } @{ Name = 'Enabled' Expression = 'if ($1.Enabled) { ''Yes'' } else { ''No'' }' } @{ Name = 'Send Email to Sub Owners' Expression = 'if ($1.SendEmailsToSubscriptionOwners) { ''Yes'' } else { ''No'' }' } @{ Name = 'Custom Emails' Expression = 'if ($1.CustomEmails) { $1.CustomEmails -join ''; '' } else { ''None'' }' } @{ Name = 'Last Updated' Expression = 'if ($1.LastUpdatedTime) { ([datetime]$1.LastUpdatedTime).ToString(''yyyy-MM-dd'') } else { ''N/A'' }' } @{ Name = 'Resource U' Expression = '$ResUCount' } @{ Name = 'Tag Name' Expression = '''''' } @{ Name = 'Tag Value' Expression = '''''' } ) Export = @{ WorksheetName = 'App Insights ProactiveDetection' TableNamePrefix = 'AIProDetTable_' Columns = @( 'App Insights Name' 'Subscription' 'Resource Group' 'Rule Name' 'Display Name' 'Enabled' 'Send Email to Sub Owners' 'Custom Emails' 'Last Updated' 'Resource U' ) TagColumns = @() TagColumnsBefore = $null NumberFormat = '0' ConditionalText = @() } SourceCollector = 'Modules/Public/InventoryModules/Monitor/AppInsightsProactiveDetection.ps1' } |