-
Notifications
You must be signed in to change notification settings - Fork 102
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
[BUG] Alerting not honouring PUT method #69
Comments
Comment by skkosuri-amzn Thanks for creating this issue. |
Comment by aditjind Hi @thenom According to the latest RFC7231, the PUT method definition states that:
Since the ID for the monitors the plugin creates via POST method has the ID generated randomly (the document ID for the monitor document), we think this change would break the contract. Let me know your thoughts. |
Looks like it can be implemented like notifications API https://opensearch.org/docs/latest/observing-your-data/notifications/api/#create-channel-configuration via specify as monitor_id in POST request. It is important for me because i now do some automantin for monitors management (it's to hard deal with too many monitors via UI). |
Issue by thenom
Friday Jul 17, 2020 at 15:33 GMT
Originally opened as opendistro-for-elasticsearch/alerting#228
Describe the bug
Cannot PUT a new monitor with a specified ID for a non-existant monitor:
Results in:
Is there any reason for this as this means that a search is required before hand to find if it exists in the cluster and then to perform a second call (either POST or PUT) based on the results of the search. I am just in the process of setting up OpenDistro so not sure if this issue appears elsewhere.
https://tools.ietf.org/html/rfc2616#section-9.6
If this method was allowed as stated then this would remove that extra step in automation and you could just overwrite the monitor. I initially thought this might have been to inject the additional fields that appear in the monitor after the initial POST but this cant be the case because you still inject those fields during subsequent PUT operations when providing an existing _id.
Thanks,
The text was updated successfully, but these errors were encountered: