-
Notifications
You must be signed in to change notification settings - Fork 1
Remove POST /api/v1/alerts #11
base: master
Are you sure you want to change the base?
Conversation
bcc3906
to
e1994ed
Compare
Another update on this PR: we actually (or might not) need POST on /alerts, if so, I will update the PR to remove it altogether |
e1994ed
to
6d95560
Compare
I'm a bit unsure about this one. While I know we don't plan to introduce routing for the first release, I think it'd benefit us to use routing, even if we just create one route per alert. This allows us to model everything in the context of routes so we can introduce them seamlessly later. WDYT? |
Agree on leaving it, even if you serve a HTTP 501 (NOT IMPLEMENTED) for the time being. |
6d95560
to
fd65c70
Compare
@owen-d I have updated this PR to add receivers to POST /alerts instead based on the discussion in slack (not converting receivers on rules to routes but instead explicitly pass the receivers while alerting). (Note that this POST is only for reference and not implemented in the first iteration) |
I'm not sure this needs to be in the API. Grafana managed alerts will have an alerting channel tied to them initially, but this is in the rule config. I don't think we need to extend the alert endpoint with this field because the only caller would be Grafana itself, which does not need to use an http API, but can instead do this in process. Can't we just leave this out of the |
Yes, that is the plan, the API is not required to be implemented now. The plan was to have this struct in place so that we can align the interface onto something (so that the rule evaluation knows in what structure to send the alert). If it will cause confusion with the API, I can remove it from here and have the struct only in the notifier code. |
Signed-off-by: Ganesh Vernekar <cs15btech11018@iith.ac.in>
fd65c70
to
a3d42ca
Compare
While we are working on https://docs.google.com/document/d/1ExiSoTrIKN_6fsWUj20trbaIXJfFfp--lwTu2mLNzcs/edit#, I have added
default_receiver
for config andreceiver
for posting alerts since we won't have the routes in the first iteration.