karma: Don't work with the latest version api (v2) alertmanager

Hi!

In new version of alertmanager API version will be changed to v2. URI /api/v1/ will no longer work. And dashboard not work - request to http://alertmanager:9093/api/v1/alerts/groups failed with 404 Not Found

docker image for test prometheus/alertmanager:master

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Reactions: 15
  • Comments: 39 (22 by maintainers)

Commits related to this issue

Most upvoted comments

https://github.com/prometheus/alertmanager/pull/1791 got merged, I need to finish refactoring needed to put the support for it in, should be done in a few days

I managed to test changes from https://github.com/prometheus/alertmanager/pull/1791 and it all looks good. But I need to do a fair amount of refactoring to add support for the new API, so it will take me a few days. Should be ready soon

My plan is to release 0.17.0 next week. Thanks for your patience throughout all of this.

v0.34 was released today - https://github.com/prymitive/karma/releases/tag/v0.34 Binaries and docker image should get published in an hour or so

Merged, alertmanager >=0.17.0 should be supported, now we need to wait for that release

Got mostly working PR - #644, just need a few finishing touches. I think that I’ll need to drop v1 support in some not too distant future, that will allow me to cleanup lots of ugly code I have.

I’m confused. The release notes for 0.16.0 say:

API v1 will be removed with Alertmanager release v0.18.0.

Shouldn’t that mean that Karma should continue to work with v0.16.x, v0.17.x?

I guess that the changelog isn’t 100% accurate. What it means is that the entire api v1 is planned to be remove in v0.18, but some parts of v1 were already removed (https://github.com/prometheus/alertmanager/pull/1525)

[CHANGE] Remove `api/v1/alerts/groups` GET endpoint (#1508)

Raised prometheus/alertmanager#1712 to re-add groups to the api

karma

prom/alertmanager:master (v0.17.0) lmierzwa/karma:v0.33

sh-4.2# curl http://alertmanager:9093/api/v1/alerts/groups 404 page not found sh-4.2# curl http://alertmanager:9093/api/v2/alerts/groups []

it won’t work with alertmanager >= 0.16.0 since the API endpoint used by karma got remove in that version and there is currently no alternative with the same information we’re waiting on prometheus/alertmanager#868 to be resolved for this ticket to be unblocked

Thanks, I think that the work for prometheus/alertmanager#868 will enrich the API with enough information to effectively solve this issue here, so I’ll just wait for that to happen. Let me know if there’s anything I can help with.

I’m afraid you need intimate knowledge of the Alertmanager codebase to do so. @stuartnelson3 told me, https://github.com/prometheus/alertmanager/issues/868 is an easy fix, if you have that knowledge. Now we only need to make him do it. (And yes, that is the plan once he is back from vacations.)

Hi there,

this is Max, maintainer of Alertmanager and developer of the Alertmanager API v2.

which is ok, it just means that we still need to track support for it per alertmanager release, rather than api version.

Yes, sadly we can not guarantee that there will never ever be any breaking changes withing the API v2, but not introducing any breaking changes within the major version is very much a goal.

It should be easier to add v2 support, since the client can be generated, I’ll need to look into that.

Let me know how that goes. I am happy to help.