Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upPOST valid JSON object to alertmanager #1694
Comments
This comment has been minimized.
This comment has been minimized.
|
|
fabxc
added
dependency/external
priority/P1
labels
Jun 1, 2016
This comment has been minimized.
This comment has been minimized.
|
For my understanding, is it a bad design pattern for the top-level type of a transferred API value to a JSON array instead of an object? For later extensibility I guess? |
This comment has been minimized.
This comment has been minimized.
|
Well, for browsers it was always considered bad practice due to security concerns (http://flask.pocoo.org/docs/0.10/security/#json-security). Plus extensibility as you said. I'm in favor of fixing that. We can make Alertmanager accept both for a while. |
This comment has been minimized.
This comment has been minimized.
|
Exactly, I would say that extensibility is the biggest benefit. The only reason we came across this was that in our application we were playing with the idea of receiving the alerts directly from prometheus instead of letting the alert-manager manage the aggregates. |
This comment has been minimized.
This comment has been minimized.
|
We should really resolve this for 1.0.0. |
fabxc
added this to the v1.0.0 milestone
Jun 28, 2016
This comment has been minimized.
This comment has been minimized.
|
I'm unsure on this, tending towards migration path for a month or so. |
This comment has been minimized.
This comment has been minimized.
|
That brings the question of which direction the migration path should go and how exactly it would look like. |
This comment has been minimized.
This comment has been minimized.
|
It has to be on the AM side accepting both, otherwise we'd be talking a flag on the Prometheus side. |
This comment has been minimized.
This comment has been minimized.
|
Discussed this some more. As we might have to make adjustments with subsequent AM versions, I'll remove this from the 1.0.0 milestone. For Prometheus <> AM communication it works fine. The custom use case is something we want to support but rare enough currently, that it doesn't justify the hassle of supporting 3 different protocols for talking to AM in the end. |
fabxc
removed this from the v1.0.0 milestone
Jul 3, 2016
brian-brazil
added
priority/P3
component/notify
kind/cleanup
priority/P2
and removed
dependency/external
priority/P1
priority/P3
labels
Jul 14, 2017
brian-brazil
added this to the v2.x milestone
Jul 14, 2017
gouthamve
added
the
dev-2.0
label
Jul 27, 2017
This comment has been minimized.
This comment has been minimized.
|
@brian-brazil why on the 2.x milestone? This first needs AM changes, which would accept both for a while anyway. |
This comment has been minimized.
This comment has been minimized.
|
It's on 2.x as if we're going to fix it we'll need breaking changes, so we need to decide if they're going to be in 2.x. As it stands 3.x seems more likely, but I wanted to put it on the table. |
This comment has been minimized.
This comment has been minimized.
|
As it's not an atomic change to one component and hasn't caused practical problems so far, let's put it off. |
diogogmt commentedMay 31, 2016
The notifier.send function posts an array of alerts to the alert manager which is not a valid JSON object.
The format being posted is:
Instead of: