Parameterize the metric label name for alertmanager version info

This issue has been tracked since 2022-10-04.

In /internal/verprobe/verprobe.go, karma is looking for the metric alertmanager_build_info to extract the version of the Alertmanager.
Grafana Mimir has fork Alertmanager and rename the metric: mimir_build_info{branch="HEAD",goversion="go1.17.8",revision="65344e2",version="2.2.0"}
So karma is not able to find the original metric:
{"level":"error","error":"alertmanager_build_info{version=...} metric is not exported from alertmanger","alertmanager":"default","message":"Error while discovering version"}

A simple change to support the alertmanager of Mimir, could be to add a parameter to karma to be able to change the metric name to search for.

prymitive wrote this answer on 2022-10-09

I don't think it would be as simple as you claim. mimir_build_info you pasted shows version 2.2.0, while alertmanager is at 0.24.0. There's no alertmanager 2.2.0.

The whole reason there is version detection in the first place was because different alertmanager releases would expose a slightly different API schema and version string was the only way to know how to read it.

dquagebeur wrote this answer on 2022-10-09

Yes there probably has some differences. I'll make some test if I manage to build the project.

dquagebeur wrote this answer on 2022-10-09

You're right. Mimir has rewrite many uri path, so there is probably a complete support for Mimir to implement (requests & responses). So I close this issue.

More Details About Repo
Owner Name prymitive
Repo Name karma
Full Name prymitive/karma
Language TypeScript
Created Date 2018-09-09
Updated Date 2023-03-17
Star Count 1921
Watcher Count 33
Fork Count 166
Issue Count 2

YOU MAY BE INTERESTED

Issue Title Created Date Updated Date