Reputation: 2062
Method:
az monitor diagnostic-settings create --resource $resourceId -n $name --event-hub $eventHub --logs '[ { "category": "WorkflowRuntime", "enabled": true, "retentionPolicy": { "enabled": false, "days": 0 } } ]' --metrics '[ { "category": "WorkflowRuntime", "enabled": true, "retentionPolicy": { "enabled": false, "days": 0 } } ]
Expectation
Creates a Diagnostic setting for the specified resource as identified by the resourceId
Actual
(BadRequest) Metric category 'WorkflowRuntime' is not supported, supported categories are: 'Capacity;Transaction'.
Upvotes: 0
Views: 944
Reputation: 23141
According to the error, the resource does not have the log category. In fact, the different resource type has different log categories. For more details, please refer to here.
If you want to get available categories for one resource, you can use the following command
az monitor diagnostic-settings categories list --resource <resource id>
Upvotes: 1