alertmanager/cli
George Robinson f69a508665
Remove metrics from compat package (#3714)
This commit removes the metrics from the compat package
in favour of the existing logging and the additional tools
at hand, such as amtool, to validate Alertmanager configurations.

Due to the global nature of the compat package, a consequence
of config.Load, these metrics have proven to be less useful
in practice than expected, both in Alertmanager and other projects
such as Mimir.

There are a number of reasons for this:

1. Because the compat package is global, these metrics cannot be
   reset each time config.Load is called, as in multi-tenant
   projects like Mimir loading a config for one tenant would reset
   the metrics for all tenants. This is also the reason the metrics
   are counters and not gauges.

2. Since the metrics are counters, it is difficult to create
   meaningful dashboards for Alertmanager as, unlike in Mimir,
   configurations are not reloaded at fixed intervals, and as such,
   operators cannot use rate to track configuration changes
   over time.

In Alertmanager, there are much better tools available to validate
that an Alertmanager configuration is compatible with the UTF-8
parser, including both the existing logging from Alertmanager
server and amtool check-config.

In other projects like Mimir, we can track configurations for
individual tenants using log aggregation and storage systems
such as Loki. This gives operators far more information than
what is possible with the metrics, including the timestamp,
input and ID of tenant configurations that are incompatible
or have disagreement.

Signed-off-by: George Robinson <george.robinson@grafana.com>
2024-02-08 09:59:03 +00:00
..
config Update gopkg.in/alecthomas/kingpin.v2 to github.com/alecthomas/kingpin/v2 2023-03-08 15:02:24 +01:00
format Update gopkg.in/alecthomas/kingpin.v2 to github.com/alecthomas/kingpin/v2 2023-03-08 15:02:24 +01:00
testdata *: bump to Go 1.17 (#2792) 2021-12-22 14:03:53 +01:00
alert.go Update gopkg.in/alecthomas/kingpin.v2 to github.com/alecthomas/kingpin/v2 2023-03-08 15:02:24 +01:00
alert_add.go Support UTF-8 label matchers: Add metrics to matchers compat package (#3658) 2024-01-05 10:21:20 +00:00
alert_query.go Support UTF-8 label matchers: Add metrics to matchers compat package (#3658) 2024-01-05 10:21:20 +00:00
check_config.go Update gopkg.in/alecthomas/kingpin.v2 to github.com/alecthomas/kingpin/v2 2023-03-08 15:02:24 +01:00
check_config_test.go *: add missing license headers 2018-05-14 17:37:13 +02:00
cluster.go Update gopkg.in/alecthomas/kingpin.v2 to github.com/alecthomas/kingpin/v2 2023-03-08 15:02:24 +01:00
config.go Update gopkg.in/alecthomas/kingpin.v2 to github.com/alecthomas/kingpin/v2 2023-03-08 15:02:24 +01:00
root.go Remove metrics from compat package (#3714) 2024-02-08 09:59:03 +00:00
routing.go Update gopkg.in/alecthomas/kingpin.v2 to github.com/alecthomas/kingpin/v2 2023-03-08 15:02:24 +01:00
silence.go Update gopkg.in/alecthomas/kingpin.v2 to github.com/alecthomas/kingpin/v2 2023-03-08 15:02:24 +01:00
silence_add.go Support UTF-8 label matchers: Add metrics to matchers compat package (#3658) 2024-01-05 10:21:20 +00:00
silence_expire.go Update gopkg.in/alecthomas/kingpin.v2 to github.com/alecthomas/kingpin/v2 2023-03-08 15:02:24 +01:00
silence_import.go use Go standard errors 2023-12-08 16:44:13 +01:00
silence_query.go Support UTF-8 label matchers: Add metrics to matchers compat package (#3658) 2024-01-05 10:21:20 +00:00
silence_update.go use Go standard errors 2023-12-08 16:44:13 +01:00
template.go Update gopkg.in/alecthomas/kingpin.v2 to github.com/alecthomas/kingpin/v2 2023-03-08 15:02:24 +01:00
template_render.go Update gopkg.in/alecthomas/kingpin.v2 to github.com/alecthomas/kingpin/v2 2023-03-08 15:02:24 +01:00
test_routing.go Support UTF-8 label matchers: Add metrics to matchers compat package (#3658) 2024-01-05 10:21:20 +00:00
test_routing_test.go Update golangci-lint and fix complaints (#2853) 2022-03-25 17:59:51 +01:00
utils.go Support UTF-8 label matchers: Add compat package with feature flag and use in amtool (#3483) 2023-10-19 12:00:01 +01:00