Skip to content

Commit d14e06c

Browse files
fix: ignore setting google_dataplex.max_messages (#1261)
* fix: ignore setting `google_dataplex.max_messages` Followup of #1252 Ignore this setting altogether, as logging a warn at each scrape for a cloud provider specific entry seems a waste of resources. Signed-off-by: Cristian Greco <cristian@regolo.cc> * add comment Signed-off-by: Cristian Greco <cristian@regolo.cc> --------- Signed-off-by: Cristian Greco <cristian@regolo.cc>
1 parent a00749f commit d14e06c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

exporter/pg_setting.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,11 @@ func querySettings(ch chan<- prometheus.Metric, server *Server) error {
3737
//
3838
// NOTE: If you add more vartypes here, you must update the supported
3939
// types in normaliseUnit() below
40-
query := "SELECT name, setting, COALESCE(unit, ''), short_desc, vartype FROM pg_settings WHERE vartype IN ('bool', 'integer', 'real') AND name != 'sync_commit_cancel_wait';"
40+
//
41+
// Settings intentionally ignored due to invalid format:
42+
// - `sync_commit_cancel_wait`, specific to Azure Postgres, see https://github.com/prometheus-community/postgres_exporter/issues/523
43+
// - `google_dataplex.max_messages`, specific to Google Cloud SQL, see https://github.com/prometheus-community/postgres_exporter/issues/1240
44+
query := "SELECT name, setting, COALESCE(unit, ''), short_desc, vartype FROM pg_settings WHERE vartype IN ('bool', 'integer', 'real') AND name NOT IN ('sync_commit_cancel_wait', 'google_dataplex.max_messages');"
4145

4246
rows, err := server.db.Query(query)
4347
if err != nil {

0 commit comments

Comments
 (0)