-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Refactoring: Extract alertmanager http cli from amtool #1035
Comments
This is somewhat intentional currently, as the Alertmanager API is likely to change (possibly in a breaking way, regarding client usage apart from the alert receiving endpoints). Separating and decoupling the code is a good idea anyways, but usage outside of this repo rather not recommended. Question is, if we're already touching this, do we also want to diverge towards grpc APIs like Prometheus? |
Code for this exists in this pr here: prometheus/client_golang#333 If you want to take over adding tests, it's basically done. |
@josedonizetti are you still working on this? If not, I can carry on. |
@simonpasquier let me know if you start, I have some time off in a month when I was planning on doing this but it would be nice not to duplicate work :) |
closed by #1278 |
Signed-off-by: Julius Volz <[email protected]>
Currently, alertmanager has no client for the existing rest API. The amtool has commands that access the API endpoints, but the client code (query, and parsing) is totally coupled to it.
Also, almost no tests exist for it.
I propose we extract the query/parsing of the API from the amtool, and expose it properly in the cli package, moving the amtool commands to a new package inside the cli (e.g.: cli/cmd).
This has lots of benefits in my opinion. Eg:
I'm willing to work on this if team/community thinks it makes sense.
@stuartnelson3 @brancz @mxinden @fabxc what you think?
The text was updated successfully, but these errors were encountered: