PowerShellを使用して既存のAzureストレージアカウントの診断を有効にするにはどうすればよいですか?PowerShellコマンドを使用してAzureストレージアカウントの診断を有効にする
あなたは
PowerShellを使用して既存のAzureストレージアカウントの診断を有効にするにはどうすればよいですか?PowerShellコマンドを使用してAzureストレージアカウントの診断を有効にする
あなたは
あなたは現在の設定を変更するコマンドレットセットAzureStorageServiceMetricsPropertyを使用して、ストレージアカウント内のストレージメトリックを設定するには、PowerShellを使用することができますありがとうございました。
例1:あなたはブロブ、テーブル、キューのログの下に有効にしたい場合は、コマンドレットセットAzureStorageServiceLoggingPropertyを使用することができますenable Blob metrics
:
$context = New-AzureStorageContext -StorageAccountName <your storageacount name>
Set-AzureStorageServiceMetricsProperty -MetricsType Minute -ServiceType Blob -MetricsLevel ServiceAndApi -RetentionDays 5 -Context $context
私はこのような診断を可能に現在の設定を変更します。
例2:あなただけのストレージアカウントで診断ログの保存を有効にする場合:
更新:
$context = New-AzureStorageContext -StorageAccountName <your storageacount name>
Set-AzureStorageServiceLoggingProperty -ServiceType Queue -Context $context -LoggingOperations read,write,delete -RetentionDays 5
私はこのようなキューのログを有効に次のコマンドを使用します。
Set-AzureRmDiagnosticSetting -ResourceId [your resource id] -StorageAccountId [your storage account id] -Enabled $true
はこれを参照、セットAzureRmDiagnosticSetting詳細については、こちらをご覧ください:
docs.microsoft.com/en-us/powershell/module/azurerm.insights/set-azurermdiagnosticsetting?view=azurermps-4.3.1
こんにちはウェイン、お返事ありがとうございます。あなたが提供したコマンドはSMコマンドレットです。私はPowershellでAzure RMのコマンドを探しています。私が新しいAzure Storage Accountを作成すると、デフォルトでDiagnosticsが有効になっていることがわかりました。しかし、既存のストレージアカウントが既に作成されている場合は、ストレージアカウント – Amruta
のアップデートや診断を有効にするpowershellコマンドはありません。これらのスクリプトはすべてAzure RM powershellコマンドレットです。このドキュメントのSet-AzureStorageServiceMetricsPropertyの詳細については、https://docs.microsoft.com/en-us/powershell/module/azure.storage/set-azurestorageservicemetricsproperty?view = azurermps-4.3.1 –
を参照してください。Set-このドキュメントのAzureStorageServiceLoggingProperty:https://docs.microsoft.com/en-us/azure/storage/common/storage-e2e-troubleshooting –