Skip to content

Commit

Permalink
Update pgmonitor 4.9
Browse files Browse the repository at this point in the history
Update to pull pgMonitor 4.9 queries. The new version has a specific
file for the global_dbsize metric that needs to be included when
generating the default queries
  • Loading branch information
jmckulk committed Sep 20, 2023
1 parent 50a5a65 commit beea11d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ PGO_IMAGE_URL ?= https://www.crunchydata.com/products/crunchy-postgresql-for-kub
PGO_IMAGE_PREFIX ?= localhost

PGMONITOR_DIR ?= hack/tools/pgmonitor
PGMONITOR_VERSION ?= v4.8.1
PGMONITOR_VERSION ?= v4.9.0
QUERIES_CONFIG_DIR ?= hack/tools/queries

# Buildah's "build" used to be "bud". Use the alias to be compatible for a while.
Expand Down
2 changes: 1 addition & 1 deletion internal/controller/postgrescluster/pgmonitor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -548,7 +548,7 @@ func TestReconcilePGMonitorExporterStatus(t *testing.T) {
podExecCalled: false,
// Status was generated manually for this test case
// TODO jmckulk: add code to generate status
status: v1beta1.MonitoringStatus{ExporterConfiguration: "79b86d7d69"},
status: v1beta1.MonitoringStatus{ExporterConfiguration: "66c45b8cfd"},
statusChangedAfterReconcile: false,
}} {
t.Run(test.name, func(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion internal/pgmonitor/exporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ var DefaultValuesForQueries = map[string]string{
func GenerateDefaultExporterQueries(ctx context.Context, cluster *v1beta1.PostgresCluster) string {
log := logging.FromContext(ctx)
var queries string
baseQueries := []string{"backrest", "global", "per_db", "nodemx"}
baseQueries := []string{"backrest", "global", "global_dbsize", "per_db", "nodemx"}
queriesConfigDir := GetQueriesConfigDir(ctx)

// TODO: When we add pgbouncer support we will do something like the following:
Expand Down

0 comments on commit beea11d

Please sign in to comment.