From dc1c19efd4012f7281d87c31c9177b3ab839d35b Mon Sep 17 00:00:00 2001 From: Julien Pivotto Date: Thu, 24 Nov 2022 14:02:37 +0100 Subject: [PATCH 1/3] Set gauge to 1 when collector is successful Signed-off-by: Julien Pivotto Signed-off-by: Khiem Doan --- cmd/postgres_exporter/probe.go | 1 + 1 file changed, 1 insertion(+) diff --git a/cmd/postgres_exporter/probe.go b/cmd/postgres_exporter/probe.go index 6c9a46bf..28d1395e 100644 --- a/cmd/postgres_exporter/probe.go +++ b/cmd/postgres_exporter/probe.go @@ -114,6 +114,7 @@ func handleProbe(logger log.Logger) http.HandlerFunc { duration := time.Since(start).Seconds() probeDurationGauge.Set(duration) + probeSuccessGauge.Set(1) // TODO check success, etc h := promhttp.HandlerFor(registry, promhttp.HandlerOpts{}) From 3b4534774905234ca725b4b3cd92323ea19a7e30 Mon Sep 17 00:00:00 2001 From: Khiem Doan Date: Tue, 27 Dec 2022 08:56:45 +0700 Subject: [PATCH 2/3] Add postgres 15 for CI test Signed-off-by: Khiem Doan --- .circleci/config.yml | 1 + README.md | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index ae168f04..bcf199d1 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -61,6 +61,7 @@ workflows: - circleci/postgres:12 - circleci/postgres:13 - cimg/postgres:14.1 + - cimg/postgres:15.1 - prometheus/build: name: build parallelism: 3 diff --git a/README.md b/README.md index 2fc0ad8b..dcaaed01 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ Prometheus exporter for PostgreSQL server metrics. -CI Tested PostgreSQL versions: `9.4`, `9.5`, `9.6`, `10`, `11`, `12`, `13`, `14` +CI Tested PostgreSQL versions: `9.4`, `9.5`, `9.6`, `10`, `11`, `12`, `13`, `14`, `15` ## Quick Start This package is available for Docker: From 045f24fd63ba0d4066210a3df2128406c887d1c1 Mon Sep 17 00:00:00 2001 From: Khiem Doan Date: Tue, 27 Dec 2022 08:56:45 +0700 Subject: [PATCH 3/3] Add postgres 15 for CI test Signed-off-by: Khiem Doan --- .circleci/config.yml | 1 + README.md | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index ae168f04..bcf199d1 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -61,6 +61,7 @@ workflows: - circleci/postgres:12 - circleci/postgres:13 - cimg/postgres:14.1 + - cimg/postgres:15.1 - prometheus/build: name: build parallelism: 3 diff --git a/README.md b/README.md index 2fc0ad8b..dcaaed01 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ Prometheus exporter for PostgreSQL server metrics. -CI Tested PostgreSQL versions: `9.4`, `9.5`, `9.6`, `10`, `11`, `12`, `13`, `14` +CI Tested PostgreSQL versions: `9.4`, `9.5`, `9.6`, `10`, `11`, `12`, `13`, `14`, `15` ## Quick Start This package is available for Docker: