manifests/collectors/Monitor/DataCollectionEndpoints.psd1
|
# # GENERATED by scripts/ConvertTo-ScoutCollectorDefinition.ps1 from Modules/Public/InventoryModules/Monitor/DataCollectionEndpoints.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 = @( 'microsoft.insights/datacollectionendpoints' ) ResourceTypeMatching = 'Grouped' AdditionalFilter = $null FilterPreamble = '' RowLoopVariable = '1' Preamble = @' $ResUCount = 1 $sub1 = $SUB | Where-Object { $_.Id -eq $1.subscriptionId } $data = $1.PROPERTIES $Tags = if(![string]::IsNullOrEmpty($1.tags.psobject.properties)){$1.tags.psobject.properties}else{'0'} # Get network access configuration $publicNetworkAccess = if ($data.networkAcls.publicNetworkAccess) { $data.networkAcls.publicNetworkAccess } else { 'Enabled' } # Get configuration access endpoint $configAccessEndpoint = if ($data.configurationAccess.endpoint) { $data.configurationAccess.endpoint } else { 'N/A' } # Get logs ingestion endpoint $logsIngestionEndpoint = if ($data.logsIngestion.endpoint) { $data.logsIngestion.endpoint } else { 'N/A' } # Get metrics ingestion endpoint $metricsIngestionEndpoint = if ($data.metricsIngestion.endpoint) { $data.metricsIngestion.endpoint } else { 'N/A' } # Get description $description = if ($data.description) { $data.description } else { 'N/A' } # Parse private link scope connections $privateLinkScopes = @() if ($data.privateLinkScopeResourceId) { $plsName = ($data.privateLinkScopeResourceId -split '/')[-1] $privateLinkScopes += $plsName } $privateLinkScopesStr = if ($privateLinkScopes.Count -gt 0) { $privateLinkScopes -join ', ' } else { 'None' } # Get failover configuration $failoverConfig = if ($data.failoverConfiguration) { "Failover: $($data.failoverConfiguration.activeLocation)" } else { 'No failover configured' } # Get immutable ID $immutableId = if ($data.immutableId) { $data.immutableId } else { 'N/A' } '@ AdditionalRowLoops = @() TagLoop = @{ Variable = 'Tag' Source = '$Tags' Preamble = '' } Fields = @( @{ Name = 'ID' Expression = '$1.id' } @{ Name = 'Subscription' Expression = '$sub1.Name' } @{ Name = 'Resource Group' Expression = '$1.RESOURCEGROUP' } @{ Name = 'DCE Name' Expression = '$1.NAME' } @{ Name = 'Description' Expression = '$description' } @{ Name = 'Location' Expression = '$1.LOCATION' } @{ Name = 'Public Network Access' Expression = '$publicNetworkAccess' } @{ Name = 'Configuration Endpoint' Expression = '$configAccessEndpoint' } @{ Name = 'Logs Ingestion Endpoint' Expression = '$logsIngestionEndpoint' } @{ Name = 'Metrics Ingestion Endpoint' Expression = '$metricsIngestionEndpoint' } @{ Name = 'Private Link Scopes' Expression = '$privateLinkScopesStr' } @{ Name = 'Failover Configuration' Expression = '$failoverConfig' } @{ Name = 'Immutable ID' Expression = '$immutableId' } @{ Name = 'Resource U' Expression = '$ResUCount' } @{ Name = 'Tag Name' Expression = '[string]$Tag.Name' } @{ Name = 'Tag Value' Expression = '[string]$Tag.Value' } ) Export = @{ WorksheetName = 'Data Collection Endpoints' TableNamePrefix = 'DataCollectionEndpointsTable_' Columns = @( 'Subscription' 'Resource Group' 'DCE Name' 'Description' 'Location' 'Public Network Access' 'Configuration Endpoint' 'Logs Ingestion Endpoint' 'Metrics Ingestion Endpoint' 'Private Link Scopes' 'Failover Configuration' 'Immutable ID' 'Resource U' ) TagColumns = @( 'Tag Name' 'Tag Value' ) TagColumnsBefore = 'Resource U' NumberFormat = '0' ConditionalText = @() } SourceCollector = 'Modules/Public/InventoryModules/Monitor/DataCollectionEndpoints.ps1' } |