Skip to content

Updates pg-wraparound alerting for Dedicated

John Skarbek requested to merge jts/pg-wrap into master

Modifies the wraparound detection to add the following capabilities:

  • Able to address cloud services and adhoc VM's for postgres installs
  • Differentiates the wraparound database query where metrics come from differing locations
  • Modifies the query for postgres version 14, where the count of reserved ID's is 3 million vs. the old 1 million

Cloud Services

This adds the capability to provide an option to enable us to specify if we are using a managed SQL database for Postgres versus our VM's. This item is added to account for metric differences between how metrics are collected between two varying infrastructures. The prime example is the wrap around detection for transaction ID's in Postgres. In our VM's, the same exporter provides all available metrics providing a working query. Some of this using custom queries to provide said data. However, the custom queries is a deprecated feature. In order to avoid such, we leverage the native capability inside of the postgres exporter that provides the same information, though with differing names of the metrics.

Differentiation

Comes from this: https://gitlab.com/gitlab-com/gl-infra/gitlab-dedicated/instrumentor/-/merge_requests/2537

Where we do not carry over a deprecated configuration over into Dedicated. But due to this, the naming of the metrics change.

ID modification

In versions of Postgres below 14, the ID reservation was 1 million. This was upped to 3 million in versions 14 and greater. Let's update our saturation metric to account for this.

Reference

Addresses: https://gitlab.com/gitlab-com/gl-infra/gitlab-dedicated/team/-/issues/2902

Edited by John Skarbek

Merge request reports