[Monitor] cannot create diagnostics-settings
See original GitHub issueInstalled via apt.
In my command below, $group_name
, $diagnostics_name
and $eventhub_name
are all short (single-segment) names. $eh_authzrule_id
and $storage_account_id
are full resource paths (aka ids). I tried alternate combinations of short and long names too and still get the same error, I think it’s something intrinsic to building the request payload.
Here’s the command and trimmed debug output:
az monitor diagnostic-settings create \
--name $diagnostics_name \
--event-hub $eventhub_name \
--event-hub-rule $eh_authzrule_id \
--resource $storage_account_id
Event: CommandInvoker.OnPostCommandTableCreate [<function add_id_parameters at 0x7fad87aa5620>]
Event: CommandInvoker.OnCommandTableLoaded []
Event: CommandInvoker.OnPreParseArgs [<function _documentdb_deprecate at 0x7fad878e90d0>]
Event: CommandInvoker.OnPostParseArgs [<function OutputProducer.handle_output_argument at 0x7fad88a929d8>, <function CLIQuery.handle_query_parameter at 0x7fad88ab1510>, <function handler at 0x7fad87820598>]
usage: az monitor diagnostic-settings create [-h] [--verbose] [--debug]
[--output {json,jsonc,table,tsv}]
[--query JMESPATH] --name NAME
<snip>
az monitor diagnostic-settings create: error: 'Namespace' object has no attribute 'event_hub_name'
Issue Analytics
- State:
- Created 5 years ago
- Comments:9 (7 by maintainers)
Top Results From Across the Web
Diagnostic settings in Azure Monitor - Microsoft Learn
To create or update diagnostic settings by using the Azure Monitor REST API, see Diagnostic settings.
Read more >Cannot create diagnostic settings for a subscription #12213
When trying to create diagnostic settings for a subscription, the command fails. Error seem to indicate that a resource group is required, but ......
Read more >azurerm_monitor_diagnostic_set...
Manages a Diagnostic Setting for an existing Resource. ... Specifies the name of the Diagnostic Setting. Changing this forces a new resource to...
Read more >Configure Diagnostic Setting Categories - Trend Micro
An Azure Monitor diagnostic setting controls how the diagnostic logs are exported. When a diagnostic setting is created using the Azure Portal, ...
Read more >Diagnostic Setting captures appropriate categories
Go to Azure Monitor · Click Activity log · Click on Diagnostic settings · Click on Edit Settings for the diagnostic settings entry...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
In codebase. It will show up in the next release (check: https://github.com/Azure/azure-cli/milestone/38). If you want to use it right now, you can use the edge build (https://github.com/azure/azure-cli/#edge-builds).
I’ll take a look today.