-
Notifications
You must be signed in to change notification settings - Fork 3.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New-AzDataCollectionRule. does not create DCR endoints (logs& Metrics) #25727
Comments
Ran into this as well today, I'm pretty sure because it is still using the |
Is there any way we can force the API version except going again to Invoke-RestMethod... |
@ChristopheLux I made a custom one that uses the newer API version and I still didn't see the endpoint getting populated, so I'm not sure what's going on, I was going to open a ticket and report back. EDIT: https://gist.github.com/JustinGrote/22c4963f7eb5af08399c26cbf60bc3ae |
OK, I think I figured it out. As of the API spec, there is an ingestion endpoint example where you have to specify the kind as "Direct", note there is a typo, there's an extraneous space in this. Even though the specs for the Kind parameter say only I updated my script to specify the kind as Direct, and now I got ingestionEndpoints populated. "endpoints": {
"logsIngestion": "https://xxxx-westus3.logs.z1.ingest.monitor.azure.com",
"metricsIngestion": "https://xxx-westus3.metrics.z1.ingest.monitor.azure.com"
}, |
With some more experimentation in regards to These appear to be undocumented with a quick google search other than Linux and Windows, these do come back via the 2022 API,
and the endpoints can ONLY be seen with the 2023 API. |
Very nice job...I wasn't able to work on this today |
@JustinGrote |
yeah but in my initial testing it doesn't seem to populate endpoints unless the API version is 2023 for the PUT, I'm testing that now. |
OK based on this testing with my custom cmdlet: New-JAzDataCollectionRule @testDcrParams -Name 'TestRule2023Direct' -ApiVersion '2023-03-11'
New-JAzDataCollectionRule @testDcrParams -Name 'TestRule2022Direct' -ApiVersion '2022-06-01'
New-JAzDataCollectionRule @testDcrParams -Name 'TestRule2022DirectReplace' -ApiVersion '2022-06-01'
New-JAzDataCollectionRule @testDcrParams -Name 'TestRule2022DirectReplace' -ApiVersion '2023-03-11' #Overwrites previous
#Additional custom attempt of 2023 API but with Kind not specified at all. Findings
Pretty annoying the DCR docs don't mention that Kind: Direct is required So currently getting DCR endpoints populated is not possible until the API rev gets bumped on this command, you have to use my custom workaround script. I'll updated it and relink |
@isra-fel the DataCollectionRule.Autorest needs a bump to 2023-03-11 to resolve this issue. |
Great findings 👍 |
Description
Hello
Contrary to ARM deployment the DCR logs and metrics endpoints are not generated when created a new DRC with PowerShell
Issue script & Debug output
Environment data
Module versions
Error output
No response
The text was updated successfully, but these errors were encountered: