Azure / Azure/azure-powershell

[Feature]: Make Get-AzDiagnosticSettings work.

Open
#19,249 3 comments 0 reactions 1 assignee Claimed by @VeryEarly View on GitHub
act-observability-squad customer-reported feature-request Monitor - Diagnostic Settings
Dominant language
C#
Stars
4.8k
Forks
4.3k
Avg merge
2d 17h
Merged PRs (30d)
51

Description

### Make Get-AzDiagnosticSettings work.

Get-AzDiagnosticSettings produces unreliable results.

1. Create any Azure resource, e.g. Key Vault
2. Set the Diagnostic settings to stream export to more than one destination, e.g. Log Analytics + Storage Account

![image](https://user-images.githubusercontent.com/57439630/184974630-20dae45c-601b-4b02-ae98-b1f9e9b20b0a.png)

3. Have each diagnostic setting export different logs/metrics, e.g. export to Log Analytics:
![image](https://user-images.githubusercontent.com/57439630/184974948-fa567eb8-7765-4b21-aea5-c3f2a1656891.png)

and export to Storage Account:
![image](https://user-images.githubusercontent.com/57439630/184975148-9cbe0462-afbf-4b04-879d-47954cfaf33f.png)

4. Execute `Get-AzDiagnosticSetting -ResourceId "/subscriptions/foo/resourceGroups/1-28909b0d-playground-sandbox/providers/Microsoft.KeyVault/vaults/bar"`, returns:

![image](https://user-images.githubusercontent.com/57439630/184976616-c0d2f1a2-2a18-4695-9d19-ba93846d9834.png)

How am I supposed to interpret this results ?

### Proposed implementation details (optional)

Have the cmdlet return the diagnostic settings for each export type.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.