-
Notifications
You must be signed in to change notification settings - Fork 194
Description
Hey,
currently I get regular errors because probing for the version of the alertmanager fails. The alertmanager endpoint that I am using does not expose metrics to me. I'd like to avoid these error logs if possible to not have static 'accepted' errors cluttering the logs.
Any ideas what could be done to avoid those error logs that are created here?
karma/internal/alertmanager/models.go
Lines 85 to 93 in ccd14cb
| source, err := am.reader.Read(url, am.HTTPHeaders) | |
| if err != nil { | |
| log.Error(). | |
| Err(err). | |
| Str("alertmanager", am.Name). | |
| Str("uri", am.SanitizedURI()). | |
| Msg("Request failed") | |
| return "" | |
| } |
My ideas:
Change log level: Since there is a default behavior implemented that assumes the latest version would it be okay to change the log level from error to warning (or info)?
Option to overwrite the version manually: Offer a config field like alertmanager_version to the object of the servers (https://github.com/prymitive/karma/blob/main/docs/CONFIGURATION.md#alertmanagers) list to directly set the version manually and then skip the probeVersion function.