question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

az monitor diagnostic-settings list does not return diagnostic settings for Log Analytics workspaces

See original GitHub issue

This is autogenerated. Please review and update as needed.

Describe the bug

Command Name az monitor diagnostic-settings list

Errors: Command does not return any diagnostic settings, even though a diagnostic setting can be observed in Azure Portal. Command result:

{
  "value": []
}

Portal: image

To Reproduce:

Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.

  • Create a Log Analytic workspace
  • Add a diagnostic setting to Log Analytic workspace
  • az monitor diagnostic-settings list --resource {} --resource-group {} --resource-type Microsoft.OperationalInsights/workspaces

Expected Behavior

Command should return all defined diagnostic settings for Azure Log Analytic workspace.

For example, works fine for AKS:

{
  "value": [
    {
      "eventHubAuthorizationRuleId": null,
      "eventHubName": null,
      "id": "/subscriptions/{...}/resourcegroups/{...}/providers/microsoft.containerservice/managedclusters/{...}/providers/microsoft.insights/diagnosticSettings/diag-aks",
      "identity": null,
{...snip...}

Environment Summary

Windows-10-10.0.19042-SP0
Python 3.10.4
Installer: MSI

azure-cli 2.36.0 *

Extensions:
application-insights 0.1.14
azure-firewall 0.13.0
log-analytics 0.2.2
resource-graph 2.1.0

Dependencies:
msal 1.17.0
azure-mgmt-resource 20.0.0

Additional Context

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:3
  • Comments:9 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
yonzhancommented, Oct 6, 2022

Will be shipped on October 12th

0reactions
yonzhancommented, Nov 22, 2022

already shipped

Read more comments on GitHub >

github_iconTop Results From Across the Web

az monitor diagnostic-settings | Microsoft Learn
List the diagnostic settings categories for the specified resource. az monitor ... Name or ID of the Log Analytics workspace to send diagnostic...
Read more >
Enable Diagnostic Logs for the Supported Resources
If the monitor diagnostic-settings list command output returns an empty array, i.e. [], as shown in the example above, there are no diagnostic...
Read more >
Finding Diagnostic Settings Configuration for Azure ...
Current destinations include Log Analytics workspace, Event Hubs, ... the latest AZ and AZ Monitor PowerShell module installed, log in with ...
Read more >
Get Azure Monitor diagnostic setting facts.
azure/credentials, or log in before you run your tasks or playbook with az login . Authentication is also possible using a service principal...
Read more >
Deploy Diagnostic Settings for Network Security Groups to ...
Deploy-Diagnostics-NetworkSecurityGroups - Deploys the diagnostic settings for Network Security Groups to stream to a Log Analytics workspace when any ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found