-
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
Do not register compat metrics in amtool #3713
Merged
gotjosh
merged 1 commit into
prometheus:main
from
grobinson-grafana:grobinson/no-metrics-in-amtool
Feb 7, 2024
Merged
Do not register compat metrics in amtool #3713
gotjosh
merged 1 commit into
prometheus:main
from
grobinson-grafana:grobinson/no-metrics-in-amtool
Feb 7, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
There is no need to register these metrics in amtool, so use compat.NewMetrics(nil) instead of compat.RegisteredMetrics. Signed-off-by: George Robinson <george.robinson@grafana.com>
grobinson-grafana
force-pushed
the
grobinson/no-metrics-in-amtool
branch
from
February 7, 2024 03:37
862b69a
to
c8bde64
Compare
gotjosh
approved these changes
Feb 7, 2024
grobinson-grafana
added a commit
to grafana/mimir
that referenced
this pull request
Feb 7, 2024
This commit does the same as we did for amtool in prometheus/alertmanager#3713. There is no need to register these metrics, so we use compat.NewMetrics(nil) instead of compat.RegisteredMetrics.
4 tasks
gotjosh
pushed a commit
to grafana/mimir
that referenced
this pull request
Feb 7, 2024
This commit does the same as we did for amtool in prometheus/alertmanager#3713. There is no need to register these metrics, so we use compat.NewMetrics(nil) instead of compat.RegisteredMetrics.
beatkind
pushed a commit
to beatkind/mimir
that referenced
this pull request
Feb 13, 2024
This commit does the same as we did for amtool in prometheus/alertmanager#3713. There is no need to register these metrics, so we use compat.NewMetrics(nil) instead of compat.RegisteredMetrics.
dimitarvdimitrov
added a commit
to grafana/mimir
that referenced
this pull request
Feb 13, 2024
* feat(helm): Adding KEDA autoscaling support * fix: update changelog * feat(helm): Porting the changes from #6971 into helm chart * feat: Adding better changelog & values documentation outlining the experimental state of the feature, using the same autoscaling rules & behaviours as jsonnet, only supporting newest version of KEDA * fix: Remove duplicate query field, add base url in CHANGELOG.md * helm: align grpc server connection lifetime settings with jsonnet (#7269) * helm: align grpc server connection lifetime settings with jsonnet Co-authored-by: Marco Pracucci <marco@pracucci.com> Signed-off-by: Vladimir Varankin <vladimir.varankin@grafana.com> * helm: rebuild tests Signed-off-by: Vladimir Varankin <vladimir.varankin@grafana.com> --------- Signed-off-by: Vladimir Varankin <vladimir.varankin@grafana.com> Co-authored-by: Marco Pracucci <marco@pracucci.com> * querymiddleware: Fix race condition in shardActiveSeriesMiddleware (#7290) * querymiddleware: race condition in shardActiveSeriesMiddleware s2.Writer is not goroutine-safe to reuse between concurrent requests. Signed-off-by: Vladimir Varankin <vladimir.varankin@grafana.com> * querymiddleware: remove flaky ResponseBodyStreamed test from shardActiveSeriesMiddleware --------- Signed-off-by: Vladimir Varankin <vladimir.varankin@grafana.com> * version: add UserAgent() (#7264) Update pkg/util/version/info.go Update pkg/mimirtool/client/client.go Signed-off-by: Vladimir Varankin <vladimir.varankin@grafana.com> Co-authored-by: Andy Asp <90626759+andyasp@users.noreply.github.com> * helm: remove -server.grpc.keepalive.max-connection-idle from common config (#7298) Signed-off-by: Vladimir Varankin <vladimir.varankin@grafana.com> * Compactor: export estimated number of compaction jobs based on bucket-index (#7299) * Compute number of compaction jobs from bucket index and export it via cortex_bucket_index_compaction_jobs metric. Signed-off-by: Peter Štibraný <pstibrany@gmail.com> * Add PR number. Signed-off-by: Peter Štibraný <pstibrany@gmail.com> * Remove unused parameter name. Signed-off-by: Peter Štibraný <pstibrany@gmail.com> * Make linter happy. Signed-off-by: Peter Štibraný <pstibrany@gmail.com> * Address review feedback. Signed-off-by: Peter Štibraný <pstibrany@gmail.com> * Fix tests. Signed-off-by: Peter Štibraný <pstibrany@gmail.com> --------- Signed-off-by: Peter Štibraný <pstibrany@gmail.com> * Add KubePersistentVolumeFillingUp runbook (#7297) * Add KubePersistentVolumeFillingUp runbook Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com> Signed-off-by: Marco Pracucci <marco@pracucci.com> * Added CHANGELOG entry Signed-off-by: Marco Pracucci <marco@pracucci.com> * Fixed linter Signed-off-by: Marco Pracucci <marco@pracucci.com> --------- Signed-off-by: Marco Pracucci <marco@pracucci.com> Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com> * Internal: remove unnecessary parameter to NoCompactionMarkFilter (#7301) * Remove unnecessary parameter to NewNoCompactionMarkFilter. Signed-off-by: Peter Štibraný <pstibrany@gmail.com> * Remove unnecessary parameter to NewNoCompactionMarkFilter. Signed-off-by: Peter Štibraný <pstibrany@gmail.com> --------- Signed-off-by: Peter Štibraný <pstibrany@gmail.com> * Name query metrics for easier discovery (#7302) Changes the way query metrics are named to make them easier to search for. Signed-off-by: Nick Pillitteri <nick.pillitteri@grafana.com> * fix(deps): update module github.com/aws/aws-sdk-go to v1.50.11 (#7288) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * fix(deps): update module github.com/klauspost/compress to v1.17.6 (#7291) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * chore(deps): update anchore/sbom-action action to v0.15.8 (#7286) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * chore(deps): update grafana/agent docker tag to v0.39.2 (#7287) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * chore(deps): update grafana/grafana docker tag to v10.3.1 (#7292) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * fix(deps): update module github.com/failsafe-go/failsafe-go to v0.4.4 (#7289) Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Chore: removed unused parameter from GenerateBlockFromSpec() (#7303) * Chore: removed unused parameter from GenerateBlockFromSpec() Signed-off-by: Marco Pracucci <marco@pracucci.com> * Removed unused variables Signed-off-by: Marco Pracucci <marco@pracucci.com> --------- Signed-off-by: Marco Pracucci <marco@pracucci.com> * Update mimir-prometheus (#7293) * Update mimir-prometheus Signed-off-by: Marco Pracucci <marco@pracucci.com> * Do not shard histogram_avg() Signed-off-by: Marco Pracucci <marco@pracucci.com> * Re-vendored Signed-off-by: Marco Pracucci <marco@pracucci.com> * Fix TestBucketStore_Series_ShouldQueryBlockWithOutOfOrderChunks Signed-off-by: Marco Pracucci <marco@pracucci.com> * Fix TestGroupCompactE2E Signed-off-by: Marco Pracucci <marco@pracucci.com> * Fixed TestMultitenantCompactor_OutOfOrderCompaction Signed-off-by: Marco Pracucci <marco@pracucci.com> * Reworked TestBucketStore_Series_ShouldQueryBlockWithOutOfOrderChunks Signed-off-by: Marco Pracucci <marco@pracucci.com> * Simplify TestBucketStore_Series_ShouldQueryBlockWithOutOfOrderChunks Signed-off-by: Marco Pracucci <marco@pracucci.com> * Use filepath.Join() instead of hardcoding path separator Signed-off-by: Marco Pracucci <marco@pracucci.com> --------- Signed-off-by: Marco Pracucci <marco@pracucci.com> * Release mimir-distributed Helm chart 5.3.0-weekly.276 (#7294) * Update mimir-distributed chart to 5.2.0-weekly.276 * Update version to 5.3.0 Signed-off-by: Dimitar Dimitrov <dimitar.dimitrov@grafana.com> --------- Signed-off-by: Dimitar Dimitrov <dimitar.dimitrov@grafana.com> Co-authored-by: grafanabot <grafanabot@grafana.com> Co-authored-by: Dimitar Dimitrov <dimitar.dimitrov@grafana.com> * Open circuit breakers on timeouts and per-instance limit errors only (#7310) * Open circuit breakers on timeouts and per-instance limit errors only Signed-off-by: Yuri Nikolic <durica.nikolic@grafana.com> * Update CHANGELOG Signed-off-by: Yuri Nikolic <durica.nikolic@grafana.com> --------- Signed-off-by: Yuri Nikolic <durica.nikolic@grafana.com> * Get rid of iterators.chunkIterator and iterators.chunkMergeIterator (#7313) * Get rid of iterators.chunkIterator and iterators.chunkMergeIterator Signed-off-by: Yuri Nikolic <durica.nikolic@grafana.com> * Fixing review findings Signed-off-by: Yuri Nikolic <durica.nikolic@grafana.com> --------- Signed-off-by: Yuri Nikolic <durica.nikolic@grafana.com> * Compactor: Language fixes (#7315) Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com> * Do not register compat metrics in mimirtool (#7314) This commit does the same as we did for amtool in prometheus/alertmanager#3713. There is no need to register these metrics, so we use compat.NewMetrics(nil) instead of compat.RegisteredMetrics. * Compactor: Un-export symbols that don't need to be exported (#7317) Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com> * Circuit breakers: add client.ErrCircuitBreakerOpen type (#7324) Signed-off-by: Yuri Nikolic <durica.nikolic@grafana.com> * Add mimirpb.CIRCUIT_BREAKER_OPEN error cause (#7330) * Add mimirpb.CIRCUIT_BREAKER_OPEN error cause Signed-off-by: Yuri Nikolic <durica.nikolic@grafana.com> * Fixing review findings Signed-off-by: Yuri Nikolic <durica.nikolic@grafana.com> --------- Signed-off-by: Yuri Nikolic <durica.nikolic@grafana.com> * store-gateway: remove cortex_bucket_store_blocks_loaded_by_duration (#7309) * store-gateway: remove cortex_bucket_store_blocks_loaded_by_duration The PR which added this metric 6074, the motivation was to help detect compactors which are falling behind. There is another metric `cortex_bucket_store_series_blocks_queried` added by jhalterman in 7112 which serves better the purpose of detecting uncompacted blocks. The reason is that it has an explicit label for uncompacted blocks, and it also is more sensitive to recent blocks (assuming those are queried much more often than old uncompacted blocks). Signed-off-by: Dimitar Dimitrov <dimitar.dimitrov@grafana.com> * Add CHANGELOG.md entry Signed-off-by: Dimitar Dimitrov <dimitar.dimitrov@grafana.com> * Update CHANGELOG.md Co-authored-by: Nick Pillitteri <56quarters@users.noreply.github.com> * Update code comment Signed-off-by: Dimitar Dimitrov <dimitar.dimitrov@grafana.com> --------- Signed-off-by: Dimitar Dimitrov <dimitar.dimitrov@grafana.com> Co-authored-by: Nick Pillitteri <56quarters@users.noreply.github.com> * ruler: don't retry on non-retriable error (#7216) * ruler: don't retry on non-retriable error Fix 6609 Signed-off-by: Vladimir Varankin <vladimir.varankin@grafana.com> * Update CHANGELOG.md Co-authored-by: Dimitar Dimitrov <dimitar.dimitrov@grafana.com> --------- Signed-off-by: Vladimir Varankin <vladimir.varankin@grafana.com> Co-authored-by: Dimitar Dimitrov <dimitar.dimitrov@grafana.com> * Update Alertmanager to f69a508 (#7332) * Update Alertmanager to f69a508 This commit updates Alertmanager to f69a508. The compat package metrics are removed, and the tests are updated to check that logs are emitted instead. * Fix lint * Fix lint again * Use strings.Trim instead of subslice * Remove integration test TestAlertmanagerMatchersMetrics * Fix lint * Prevent configurations with WebhookURLFile This commit updates the validation rules to prevent Alertmanager configurations for Discord and Microsoft Teams from using WebhookURLFile. * Add additional checks and tests for HTTPConfig * Fix missing nil check * Check for embedded HTTPConfig is not needed * Helm: add ruler specific service account (#7132) * Helm: add ruler specific service account Signed-off-by: QuantumEnigmaa <thibaud@giantswarm.io> * add suggestions from review Signed-off-by: QuantumEnigmaa <thibaud@giantswarm.io> * disable ruler sa by default * add rolebinding to ruler sa Signed-off-by: QuantumEnigmaa <thibaud@giantswarm.io> * remove trailing space Signed-off-by: QuantumEnigmaa <thibaud@giantswarm.io> * update handling of ruler sa name Signed-off-by: QuantumEnigmaa <thibaud@giantswarm.io> * add doc comment for ruler sa name Signed-off-by: QuantumEnigmaa <thibaud@giantswarm.io> --------- Signed-off-by: QuantumEnigmaa <thibaud@giantswarm.io> * frontend/transport: log non-2xx replies from downstream as non-successful (#7296) Signed-off-by: Vladimir Varankin <vladimir.varankin@grafana.com> * querymiddleware: Pool snappy writer in shard activity series (#7308) * querymiddleware: pool snappy writer in shard activity series Signed-off-by: Vladimir Varankin <vladimir.varankin@grafana.com> * test concurrent requests in shard active series --------- Signed-off-by: Vladimir Varankin <vladimir.varankin@grafana.com> * Helm: make PSP configurable (#7190) * Helm: make PSP configurable Signed-off-by: QuantumEnigmaa <thibaud@giantswarm.io> * fix changelog Signed-off-by: QuantumEnigmaa <thibaud@giantswarm.io> * fix psp rendering Signed-off-by: QuantumEnigmaa <thibaud@giantswarm.io> * Update operations/helm/charts/mimir-distributed/CHANGELOG.md --------- Signed-off-by: QuantumEnigmaa <thibaud@giantswarm.io> Co-authored-by: Dimitar Dimitrov <dimitar.dimitrov@grafana.com> * Helm - Templatable host for gateway ingress/route (#7218) * feat: added host templating for gateway ingress * feat: added host templating for gateway route * fix: missing ctx ref * Revert "fix: missing ctx ref" This reverts commit cf956fb. * fix: missing ctx ref * ci: ran make build-helm-tests * updated CHANGELOG.md * fix: re-ordered changelog * feat: added templating to global ingress * fix: added templating to host rules * docs: values.yaml examples * test: rebuild tests according to examples --------- Co-authored-by: Dimitar Dimitrov <dimitar.dimitrov@grafana.com> * [Docs] Update migrate-from-single-zone-with-helm.md (#7327) * Update migrate-from-single-zone-with-helm.md Fix typo beaching->breaching. * Update changelog * Always sort labels in distributors (#7326) * Always sort labels in distributors Previously, disabling metric relabelling would also disable label sorting. Fixes #7320 * Update comment about sorting * Update CHANGELOG * Do not check for ingester ring state before creating TSDB, or compacting / shipping blocks (#7322) * Do not check for ingester ring state before creating TSDB, or compacting / shipping blocks Signed-off-by: Marco Pracucci <marco@pracucci.com> * Removed unused param Signed-off-by: Marco Pracucci <marco@pracucci.com> --------- Signed-off-by: Marco Pracucci <marco@pracucci.com> * Compactor: String format compaction plan as comma separated blocks (#7321) * Compactor: Format directories as comma separated string Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com> * Compactor: string format plan as comma separated blocks Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com> * Harmonize log message field names Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com> --------- Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com> * Add a lifetime manager for Vault authentication tokens (#7337) * Initial renewal implementation * Add metrics and integration test to test token renewal * remove unneeeded comment * Update CHANGELOG.md * Use promauto * address comments * Use global const for Vault image * Add failure metric * Update metrics * Update CHANGELOG and mark as experimental * include metric names in about-versioning * fix(deps): update github.com/grafana/dskit digest to f245b48 (#7283) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Packaging: remove reload from systemd file as mimir does not take into account SIGHUP (#7345) Signed-off-by: Wilfried Roset <wilfriedroset@users.noreply.github.com> * Docs: No longer mark OTLP endpoint as experimental (#7348) Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com> * Update golang.org/x/exp digest to 2c58cdc (#7352) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Update module github.com/aws/aws-sdk-go to v1.50.15 (#7353) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Update module github.com/minio/minio-go/v7 to v7.0.67 (#7354) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Update dependency puppeteer to v21.11.0 (#7355) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Update helm/kind-action action to v1.9.0 (#7357) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Update module cloud.google.com/go/storage to v1.37.0 (#7358) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Jsonnet / Helm: improve distributors graceful shutdown (#7361) * Jsonnet / Helm: improve distributors graceful shutdown Signed-off-by: Marco Pracucci <marco@pracucci.com> * Fix Helm distributor termination grace period Signed-off-by: Marco Pracucci <marco@pracucci.com> --------- Signed-off-by: Marco Pracucci <marco@pracucci.com> * Release mimir-distributed Helm chart 5.3.0-weekly.277 (#7362) Co-authored-by: grafanabot <grafanabot@grafana.com> * Distributor: Make `-distributor.enable-otlp-metadata-storage` flag default to true, and deprecate (#7366) * Distributor: Change -distributor.enable-otlp-metadata-storage flag's default to true and deprecate --------- Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com> * Mark -ingester.limit-inflight-requests-using-grpc-method-limiter and -distributor.limit-inflight-requests-using-grpc-method-limiter as stable and enable it by default (#7360) * Mark -ingester.limit-inflight-requests-using-grpc-method-limiter and -distributor.limit-inflight-requests-using-grpc-method-limiter as stable and enable it by default Signed-off-by: Marco Pracucci <marco@pracucci.com> * Improved tests Signed-off-by: Marco Pracucci <marco@pracucci.com> * Improved tests Signed-off-by: Marco Pracucci <marco@pracucci.com> * Fixed unit tests Signed-off-by: Marco Pracucci <marco@pracucci.com> * Mark config as deprecated Signed-off-by: Marco Pracucci <marco@pracucci.com> --------- Signed-off-by: Marco Pracucci <marco@pracucci.com> * Do not consider out-of-order blocks when filtering compactable jobs (#7342) * Do not consider out-of-order blocks when filtering compactable jobs Co-authored-by: Marco Pracucci <marco@pracucci.com> * mimir: Inject span profiler into tracer (#7363) * mimir: inject span profiler into tracer Signed-off-by: Vladimir Varankin <vladimir.varankin@grafana.com> * Update changelog Signed-off-by: Vladimir Varankin <vladimir.varankin@grafana.com> --------- Signed-off-by: Vladimir Varankin <vladimir.varankin@grafana.com> * Add experimental partitions ring lifecycler support (#7349) * Add experimental partitions ring lifecycler support Signed-off-by: Marco Pracucci <marco@pracucci.com> Co-authored-by: Dimitar Dimitrov <dimitar.dimitrov@grafana.com> Co-authored-by: Peter Štibraný <pstibrany@gmail.com> * Use http.Error() Signed-off-by: Marco Pracucci <marco@pracucci.com> * Skip deprecated linter check for code that will be soon replaced Signed-off-by: Marco Pracucci <marco@pracucci.com> * Updated dskit Signed-off-by: Marco Pracucci <marco@pracucci.com> * Add partition id to logs Signed-off-by: Marco Pracucci <marco@pracucci.com> * Added comment Signed-off-by: Marco Pracucci <marco@pracucci.com> * Added TestIngester_ShouldNotCreatePartitionIfThereIsShutdownMarker Signed-off-by: Marco Pracucci <marco@pracucci.com> --------- Signed-off-by: Marco Pracucci <marco@pracucci.com> Co-authored-by: Dimitar Dimitrov <dimitar.dimitrov@grafana.com> Co-authored-by: Peter Štibraný <pstibrany@gmail.com> * feat(helm): Adding KEDA autoscaling support * chore: rebase branch with main * chore: make build-helm-tests --------- Signed-off-by: Vladimir Varankin <vladimir.varankin@grafana.com> Signed-off-by: Peter Štibraný <pstibrany@gmail.com> Signed-off-by: Marco Pracucci <marco@pracucci.com> Signed-off-by: Nick Pillitteri <nick.pillitteri@grafana.com> Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com> Signed-off-by: Dimitar Dimitrov <dimitar.dimitrov@grafana.com> Signed-off-by: Yuri Nikolic <durica.nikolic@grafana.com> Signed-off-by: QuantumEnigmaa <thibaud@giantswarm.io> Signed-off-by: Wilfried Roset <wilfriedroset@users.noreply.github.com> Co-authored-by: Vladimir Varankin <vladimir.varankin@grafana.com> Co-authored-by: Marco Pracucci <marco@pracucci.com> Co-authored-by: Andy Asp <90626759+andyasp@users.noreply.github.com> Co-authored-by: Peter Štibraný <pstibrany@gmail.com> Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com> Co-authored-by: Nick Pillitteri <56quarters@users.noreply.github.com> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Grot (@grafanabot) <43478413+grafanabot@users.noreply.github.com> Co-authored-by: grafanabot <grafanabot@grafana.com> Co-authored-by: Dimitar Dimitrov <dimitar.dimitrov@grafana.com> Co-authored-by: Đurica Yuri Nikolić <durica.nikolic@grafana.com> Co-authored-by: George Robinson <george.robinson@grafana.com> Co-authored-by: Zirko <64951262+QuantumEnigmaa@users.noreply.github.com> Co-authored-by: Itay Kalfon <82172131+Itaykal@users.noreply.github.com> Co-authored-by: Éamon Ryan <eamonryan@users.noreply.github.com> Co-authored-by: Patrick Oyarzun <patrick.oyarzun@grafana.com> Co-authored-by: Fayzal Ghantiwala <114010985+fayzal-g@users.noreply.github.com> Co-authored-by: Wilfried ROSET <wilfriedroset@users.noreply.github.com> Co-authored-by: Jonathan Halterman <jonathan@grafana.com>
th0th
pushed a commit
to th0th/alertmanager
that referenced
this pull request
Mar 23, 2024
There is no need to register these metrics in amtool, so use compat.NewMetrics(nil) instead of compat.RegisteredMetrics. Signed-off-by: George Robinson <george.robinson@grafana.com> Signed-off-by: Gokhan Sari <gokhan@sari.me>
th0th
pushed a commit
to th0th/alertmanager
that referenced
this pull request
Mar 25, 2024
There is no need to register these metrics in amtool, so use compat.NewMetrics(nil) instead of compat.RegisteredMetrics. Signed-off-by: George Robinson <george.robinson@grafana.com> Signed-off-by: Gokhan Sari <gokhan@sari.me>
th0th
added a commit
to th0th/alertmanager
that referenced
this pull request
Apr 17, 2024
Fix the typo Signed-off-by: Gokhan Sari <gokhan@sari.me> Update tests Signed-off-by: Gokhan Sari <gokhan@sari.me> Update documentation Signed-off-by: Gokhan Sari <gokhan@sari.me> Update notifiers_test.go Signed-off-by: Gokhan Sari <gokhan@sari.me> Update notifiers_test.go Signed-off-by: Gokhan Sari <gokhan@sari.me> Use int32 instead of int64 for MessageThreadID Signed-off-by: Gokhan Sari <gokhan@sari.me> Bump github.com/go-openapi/swag from 0.22.4 to 0.22.7 (prometheus#3655) Bumps [github.com/go-openapi/swag](https://github.com/go-openapi/swag) from 0.22.4 to 0.22.7. - [Commits](go-openapi/swag@v0.22.4...v0.22.7) --- updated-dependencies: - dependency-name: github.com/go-openapi/swag dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: Gokhan Sari <gokhan@sari.me> Support UTF-8 label matchers: Add metrics to matchers compat package (prometheus#3658) * Add metrics to matchers compat package This commit adds the following metrics to the compat package: alertmanager_matchers_parse alertmanager_matchers_disagree alertmanager_matchers_incompatible alertmanager_matchers_invalid With a label called origin to differentiate the different sources of inputs: the configuration file, the API, and amtool. The disagree_total metric is incremented when an input is invalid in both parsers, but results in different parsed representations, then there is disagreement. This should not happen, and suggests their is either a bug in one of the parsers or a mistake in the backwards compatible guarantees of the matchers/parse parser. The incompatible_total metric is incremented when an input is valid in pkg/labels, but not the UTF-8 parser in matchers/parse. In such case, the matcher should be updated to be compatible. This often means adding double quotes around the right hand side of the matcher. For example, foo="bar". The invalid_total metric is incremented when an input is invalid in both parsers. This was never a valid input. The tests have been updated to check the metrics are incremented as expected. Signed-off-by: George Robinson <george.robinson@grafana.com> --------- Signed-off-by: George Robinson <george.robinson@grafana.com> Signed-off-by: Gokhan Sari <gokhan@sari.me> Change compat metrics to counters (prometheus#3686) This commit changes the metrics in the compat package from gauges to counters. The reason for this is that in some cases the gauge should behave like a gauge (i.e. loading configurations) but in other cases should behave like a counter (i.e. HTTP requests). Second, because the compat package is a global package (due to how config.Load works), in tenanted systems like Cortex and Mimir it was non-trivial to reset the gauges per tenant each time their configuration was reloaded. Instead, it's easier to compute the rate of increase as 0 instead of check that the gauge is 0 to know if UTF-8 strict mode can be enabled. Signed-off-by: George Robinson <george.robinson@grafana.com> Signed-off-by: Gokhan Sari <gokhan@sari.me> Bump github.com/go-openapi/errors from 0.20.4 to 0.21.0 Bumps [github.com/go-openapi/errors](https://github.com/go-openapi/errors) from 0.20.4 to 0.21.0. - [Commits](go-openapi/errors@v0.20.4...v0.21.0) --- updated-dependencies: - dependency-name: github.com/go-openapi/errors dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: Gokhan Sari <gokhan@sari.me> Bump github.com/go-openapi/swag from 0.22.7 to 0.22.9 Bumps [github.com/go-openapi/swag](https://github.com/go-openapi/swag) from 0.22.7 to 0.22.9. - [Commits](go-openapi/swag@v0.22.7...v0.22.9) --- updated-dependencies: - dependency-name: github.com/go-openapi/swag dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: Gokhan Sari <gokhan@sari.me> Bump eslint from 8.35.0 to 8.56.0 in /ui/react-app (prometheus#3692) Bumps [eslint](https://github.com/eslint/eslint) from 8.35.0 to 8.56.0. - [Release notes](https://github.com/eslint/eslint/releases) - [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md) - [Commits](eslint/eslint@v8.35.0...v8.56.0) --- updated-dependencies: - dependency-name: eslint dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: Gokhan Sari <gokhan@sari.me> Do not register compat metrics in amtool (prometheus#3713) There is no need to register these metrics in amtool, so use compat.NewMetrics(nil) instead of compat.RegisteredMetrics. Signed-off-by: George Robinson <george.robinson@grafana.com> Signed-off-by: Gokhan Sari <gokhan@sari.me> Remove metrics from compat package (prometheus#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> Signed-off-by: Gokhan Sari <gokhan@sari.me> Fix the typo
th0th
added a commit
to th0th/alertmanager
that referenced
this pull request
Apr 18, 2024
Fix the typo Signed-off-by: Gokhan Sari <gokhan@sari.me> Update tests Signed-off-by: Gokhan Sari <gokhan@sari.me> Update documentation Signed-off-by: Gokhan Sari <gokhan@sari.me> Update notifiers_test.go Signed-off-by: Gokhan Sari <gokhan@sari.me> Update notifiers_test.go Signed-off-by: Gokhan Sari <gokhan@sari.me> Use int32 instead of int64 for MessageThreadID Signed-off-by: Gokhan Sari <gokhan@sari.me> Bump github.com/go-openapi/swag from 0.22.4 to 0.22.7 (prometheus#3655) Bumps [github.com/go-openapi/swag](https://github.com/go-openapi/swag) from 0.22.4 to 0.22.7. - [Commits](go-openapi/swag@v0.22.4...v0.22.7) --- updated-dependencies: - dependency-name: github.com/go-openapi/swag dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: Gokhan Sari <gokhan@sari.me> Support UTF-8 label matchers: Add metrics to matchers compat package (prometheus#3658) * Add metrics to matchers compat package This commit adds the following metrics to the compat package: alertmanager_matchers_parse alertmanager_matchers_disagree alertmanager_matchers_incompatible alertmanager_matchers_invalid With a label called origin to differentiate the different sources of inputs: the configuration file, the API, and amtool. The disagree_total metric is incremented when an input is invalid in both parsers, but results in different parsed representations, then there is disagreement. This should not happen, and suggests their is either a bug in one of the parsers or a mistake in the backwards compatible guarantees of the matchers/parse parser. The incompatible_total metric is incremented when an input is valid in pkg/labels, but not the UTF-8 parser in matchers/parse. In such case, the matcher should be updated to be compatible. This often means adding double quotes around the right hand side of the matcher. For example, foo="bar". The invalid_total metric is incremented when an input is invalid in both parsers. This was never a valid input. The tests have been updated to check the metrics are incremented as expected. Signed-off-by: George Robinson <george.robinson@grafana.com> --------- Signed-off-by: George Robinson <george.robinson@grafana.com> Signed-off-by: Gokhan Sari <gokhan@sari.me> Change compat metrics to counters (prometheus#3686) This commit changes the metrics in the compat package from gauges to counters. The reason for this is that in some cases the gauge should behave like a gauge (i.e. loading configurations) but in other cases should behave like a counter (i.e. HTTP requests). Second, because the compat package is a global package (due to how config.Load works), in tenanted systems like Cortex and Mimir it was non-trivial to reset the gauges per tenant each time their configuration was reloaded. Instead, it's easier to compute the rate of increase as 0 instead of check that the gauge is 0 to know if UTF-8 strict mode can be enabled. Signed-off-by: George Robinson <george.robinson@grafana.com> Signed-off-by: Gokhan Sari <gokhan@sari.me> Bump github.com/go-openapi/errors from 0.20.4 to 0.21.0 Bumps [github.com/go-openapi/errors](https://github.com/go-openapi/errors) from 0.20.4 to 0.21.0. - [Commits](go-openapi/errors@v0.20.4...v0.21.0) --- updated-dependencies: - dependency-name: github.com/go-openapi/errors dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: Gokhan Sari <gokhan@sari.me> Bump github.com/go-openapi/swag from 0.22.7 to 0.22.9 Bumps [github.com/go-openapi/swag](https://github.com/go-openapi/swag) from 0.22.7 to 0.22.9. - [Commits](go-openapi/swag@v0.22.7...v0.22.9) --- updated-dependencies: - dependency-name: github.com/go-openapi/swag dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: Gokhan Sari <gokhan@sari.me> Bump eslint from 8.35.0 to 8.56.0 in /ui/react-app (prometheus#3692) Bumps [eslint](https://github.com/eslint/eslint) from 8.35.0 to 8.56.0. - [Release notes](https://github.com/eslint/eslint/releases) - [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md) - [Commits](eslint/eslint@v8.35.0...v8.56.0) --- updated-dependencies: - dependency-name: eslint dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: Gokhan Sari <gokhan@sari.me> Do not register compat metrics in amtool (prometheus#3713) There is no need to register these metrics in amtool, so use compat.NewMetrics(nil) instead of compat.RegisteredMetrics. Signed-off-by: George Robinson <george.robinson@grafana.com> Signed-off-by: Gokhan Sari <gokhan@sari.me> Remove metrics from compat package (prometheus#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> Signed-off-by: Gokhan Sari <gokhan@sari.me> Fix the typo Revert changes in unintended files
SuperQ
added a commit
that referenced
this pull request
Oct 16, 2024
* [CHANGE] Deprecate and remove api/v1/ #2970 * [CHANGE] Remove unused feature flags #3676 * [CHANGE] Newlines in smtp password file are now ignored #3681 * [CHANGE] Change compat metrics to counters #3686 * [CHANGE] Do not register compat metrics in amtool #3713 * [CHANGE] Remove metrics from compat package #3714 * [CHANGE] Mark muted alerts #3793 * [FEATURE] Add metric for inhibit rules #3681 * [FEATURE] Support UTF-8 label matchers #3453, #3507, #3523, #3483, #3567, #3568, #3569, #3571, #3595, #3604, #3619, #3658, #3659, #3662, #3668, 3572 * [FEATURE] Add counter to track alerts dropped outside of time_intervals #3565 * [FEATURE] Add date and tz functions to templates #3812 * [FEATURE] Add limits for silences #3852 * [FEATURE] Add time helpers for templates #3863 * [FEATURE] Add auto GOMAXPROCS #3837 * [FEATURE] Add auto GOMEMLIMIT #3895 * [FEATURE] Add Jira receiver integration #3590 * [ENHANCEMENT] Add the receiver name to notification metrics #3045 * [ENHANCEMENT] Add the route ID to uuid #3372 * [ENHANCEMENT] Add duration to the notify success message #3559 * [ENHANCEMENT] Implement webhook_url_file for discord and msteams #3555 * [ENHANCEMENT] Add debug logs for muted alerts #3558 * [ENHANCEMENT] API: Allow the Silences API to use their own 400 response #3610 * [ENHANCEMENT] Add summary to msteams notification #3616 * [ENHANCEMENT] Add context reasons to notifications failed counter #3631 * [ENHANCEMENT] Add optional native histogram support to latency metrics #3737 * [ENHANCEMENT] Enable setting ThreadId for Telegram notifications #3638 * [ENHANCEMENT] Allow webex roomID from template #3801 * [BUGFIX] Add missing integrations to notify metrics #3480 * [BUGFIX] Add missing ttl in pushhover #3474 * [BUGFIX] Fix scheme required for webhook url in amtool #3409 * [BUGFIX] Remove duplicate integration from metrics #3516 * [BUGFIX] Reflect Discord's max length message limits #3597 * [BUGFIX] Fix nil error in warn logs about incompatible matchers #3683 * [BUGFIX] Fix a small number of inconsistencies in compat package logging #3718 * [BUGFIX] Fix log line in featurecontrol #3719 * [BUGFIX] Fix panic in acceptance tests #3592 * [BUGFIX] Fix flaky test TestClusterJoinAndReconnect/TestTLSConnection #3722 * [BUGFIX] Fix crash on errors when url_file is used #3800 * [BUGFIX] Fix race condition in dispatch.go #3826 * [BUGFIX] Fix race conditions in the memory alerts store #3648 * [BUGFIX] Hide config.SecretURL when the URL is incorrect. #3887 * [BUGFIX] Fix invalid silence causes incomplete updates #3898 * [BUGFIX] Fix leaking of Silences matcherCache entries #3930 * [BUGFIX] Close SMTP submission correctly to handle errors #4006 Signed-off-by: SuperQ <superq@gmail.com>
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There is no need to register these metrics in amtool, so use
compat.NewMetrics(nil)
instead ofcompat.RegisteredMetrics
.