-
Notifications
You must be signed in to change notification settings - Fork 3k
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
az monitor diagnostic-settings create will not accept same json as returned by show for 'logs' #2913
Comments
@vishrutshah it looks like the UX here could use improvement.
|
No disagreement with @tjprescott comments, my issue was more: If it's going to take json for the settings, it should at least accept the same json as input that is output by the same command. |
@nneul agreed. |
@nneul Thanks for reporting this issue. Yes we agree that it should take the logs. I see that you mentioned that you have to stip out Meanwhile, I am working on fixing the issues to take the same json as input. 👍 Thanks again for reporting the issue. |
Yes, using retention_policy proceeds without error. |
@nneul Closing the bug as PR is merged in. Could please use the nightly tomorrow and let us know whether things are good on you end or not. Appreciate your help. |
Confirmed that this is now working. Thank you! |
Environment summary
Install Method: How did you install the CLI? (e.g. pip, interactive script, apt-get, Docker, MSI, nightly)
Answer here: script
CLI Version: What version of the CLI and modules are installed? (Use
az --version
)Answer here: 2.0.3
OS Version: What OS and version are you using?
Answer here: Ubuntu 16.04 x64
Shell Type: What shell are you using? (e.g. bash, cmd.exe, Bash on Windows)
Answer here: bash
Description
The input to logs option for monitor create won't accept the logs array as returned by 'az monitor diagnostics-settings show' - you have to strip out the 'retentionPolicy' elements. This seems incorrect.
Example in my case:
It fails with:
The text was updated successfully, but these errors were encountered: