Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions changelogs/fragments/456.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
major_changes:
- sql_exporter - Updated metric queries for pgmonitor-extension 2.1.0
minor_changes:
- sql_exporter - Added new metrics to monitor pgmonitor-extension version.
- `ccp_pgmonitor_extension_global_version` - shows the currently installed version of the extension on the global database as an integer
- `ccp_pgmonitor_extension_per_db_version` - shows the currently installed version of the extension on each monitored user database as an integer
- `ccp_pgmonitor_extension_global_min_version_installed` - shows whether the currently installed version of the extension is the minimum required for this version of pgMonitor on the global database (0 true, 1 false)
- `ccp_pgmonitor_extension_per_db_min_version_installed` - shows whether the currently installed version of the extension is the minimum required for this version of pgMonitor on each monitored user database (0 true, 1 false)
- sql_exporter - Add additional metrics for monitoring replication slot status. For PG16+ monitor for conflicts. For PG17+, monitor synced and failover status.
- prometheus - Added new alerts to monitor the new metrics for the minimum required version of the pgmonitor extension
bugfixes:
- postgres_exporter - Disable all collectors included with postgres_exporter by default in example configuration. The other options to disable default metrics are not applied to the new collections.
- sql_exporter - Removed extraneous double quote at the end of the pgbouncer fdw collector file
- sql_exporter - Fix the names of ccp_pgbouncer_database_db_conn_perc_used, ccp_pgbouncer_database_paused, ccp_pgbouncer_database_disabled, and ccp_pgbouncer_list_item_count to be consistent with the old metric names from postgres exporter. These new names are the ones expected in the Grafana dashboard so this change fixes that to work properly again.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
PGBACKREST_INFO_THROTTLE_MINUTES=10
PG_STAT_STATEMENTS_LIMIT=20
PG_STAT_STATEMENTS_THROTTLE_MINUTES=-1
OPT="--web.listen-address=0.0.0.0:9187 --extend.query-path=/etc/postgres_exporter/11/queries.yml --disable-default-metrics --disable-settings-metrics"
OPT="--web.listen-address=0.0.0.0:9187 --extend.query-path=/etc/postgres_exporter/11/queries.yml --disable-default-metrics --disable-settings-metrics --no-collector.database --no-collector.database_wraparound --no-collector.locks --no-collector.long_running_transactions --no-collector.postmaster --no-collector.process_idle --no-collector.replication --no-collector.replication_slot --no-collector.stat_activity_autovacuum --no-collector.stat_bgwriter --no-collector.stat_database --no-collector.stat_statements --no-collector.stat_user_tables --no-collector.stat_wal_receiver --no-collector.statio_user_indexes --no-collector.statio_user_tables --no-collector.wal --no-collector.xlog_location"
DATA_SOURCE_NAME="postgresql:///postgres?host=/var/run/postgresql/&user=ccp_monitoring&sslmode=disable"

# For global / cluster metric
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# QUERY_FILE_LIST: space delimited yml files that will be concatenated to a single queries.yml file. This should only be set once. If set multiple times, last one wins.

# Ensure that listening port is different than global postgres_exporter (9188 below). Also ensure that query-path file is different from global one (queries_all_db_stats.yml below).
OPT="--web.listen-address=0.0.0.0:9188 --extend.query-path=/etc/postgres_exporter/11/queries_all_db_stats.yml --disable-default-metrics --disable-settings-metrics"
OPT="--web.listen-address=0.0.0.0:9188 --extend.query-path=/etc/postgres_exporter/11/queries_all_db_stats.yml --disable-default-metrics --disable-settings-metrics --no-collector.database --no-collector.database_wraparound --no-collector.locks --no-collector.long_running_transactions --no-collector.postmaster --no-collector.process_idle --no-collector.replication --no-collector.replication_slot --no-collector.stat_activity_autovacuum --no-collector.stat_bgwriter --no-collector.stat_database --no-collector.stat_statements --no-collector.stat_user_tables --no-collector.stat_wal_receiver --no-collector.statio_user_indexes --no-collector.statio_user_tables --no-collector.wal --no-collector.xlog_location"
DATA_SOURCE_NAME="postgresql:///postgres?host=/var/run/postgresql/&user=ccp_monitoring&sslmode=disable"
# Multiple DSN's can be given to connect to multiple databases with a single exporter. Separate DSNs with a comma and no spaces. Database name in example below is first the value after the "///" before the "?". Additional connection options can be given after "?", separated by "&".
#DATA_SOURCE_NAME="postgresql:///postgres?host=/var/run/postgresql/&user=ccp_monitoring&sslmode=disable,postgresql:///mydb1?host=/var/run/postgresql/&user=ccp_monitoring&sslmode=disable,postgresql:///mydb2?host=/var/run/postgresql/&user=ccp_monitoring&sslmode=disable"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
PGBACKREST_INFO_THROTTLE_MINUTES=10
PG_STAT_STATEMENTS_LIMIT=20
PG_STAT_STATEMENTS_THROTTLE_MINUTES=-1
OPT="--web.listen-address=0.0.0.0:9187 --extend.query-path=/etc/postgres_exporter/12/queries.yml --disable-default-metrics --disable-settings-metrics"
OPT="--web.listen-address=0.0.0.0:9187 --extend.query-path=/etc/postgres_exporter/12/queries.yml --disable-default-metrics --disable-settings-metrics --no-collector.database --no-collector.database_wraparound --no-collector.locks --no-collector.long_running_transactions --no-collector.postmaster --no-collector.process_idle --no-collector.replication --no-collector.replication_slot --no-collector.stat_activity_autovacuum --no-collector.stat_bgwriter --no-collector.stat_database --no-collector.stat_statements --no-collector.stat_user_tables --no-collector.stat_wal_receiver --no-collector.statio_user_indexes --no-collector.statio_user_tables --no-collector.wal --no-collector.xlog_location"
DATA_SOURCE_NAME="postgresql:///postgres?host=/var/run/postgresql/&user=ccp_monitoring&sslmode=disable"

# For global / cluster metric
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# QUERY_FILE_LIST: space delimited yml files that will be concatenated to a single queries.yml file. This should only be set once. If set multiple times, last one wins.

# Ensure that listening port is different than global postgres_exporter (9188 below). Also ensure that query-path file is different from global one (queries_all_db_stats.yml below).
OPT="--web.listen-address=0.0.0.0:9188 --extend.query-path=/etc/postgres_exporter/12/queries_all_db_stats.yml --disable-default-metrics --disable-settings-metrics"
OPT="--web.listen-address=0.0.0.0:9188 --extend.query-path=/etc/postgres_exporter/12/queries_all_db_stats.yml --disable-default-metrics --disable-settings-metrics --no-collector.database --no-collector.database_wraparound --no-collector.locks --no-collector.long_running_transactions --no-collector.postmaster --no-collector.process_idle --no-collector.replication --no-collector.replication_slot --no-collector.stat_activity_autovacuum --no-collector.stat_bgwriter --no-collector.stat_database --no-collector.stat_statements --no-collector.stat_user_tables --no-collector.stat_wal_receiver --no-collector.statio_user_indexes --no-collector.statio_user_tables --no-collector.wal --no-collector.xlog_location"
DATA_SOURCE_NAME="postgresql:///postgres?host=/var/run/postgresql/&user=ccp_monitoring&sslmode=disable"
# Multiple DSN's can be given to connect to multiple databases with a single exporter. Separate DSNs with a comma and no spaces. Database name in example below is first the value after the "///" before the "?". Additional connection options can be given after "?", separated by "&".
#DATA_SOURCE_NAME="postgresql:///postgres?host=/var/run/postgresql/&user=ccp_monitoring&sslmode=disable,postgresql:///mydb1?host=/var/run/postgresql/&user=ccp_monitoring&sslmode=disable,postgresql:///mydb2?host=/var/run/postgresql/&user=ccp_monitoring&sslmode=disable"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
PGBACKREST_INFO_THROTTLE_MINUTES=10
PG_STAT_STATEMENTS_LIMIT=20
PG_STAT_STATEMENTS_THROTTLE_MINUTES=-1
OPT="--web.listen-address=0.0.0.0:9187 --extend.query-path=/etc/postgres_exporter/13/queries.yml --disable-default-metrics --disable-settings-metrics"
OPT="--web.listen-address=0.0.0.0:9187 --extend.query-path=/etc/postgres_exporter/13/queries.yml --disable-default-metrics --disable-settings-metrics --no-collector.database --no-collector.database_wraparound --no-collector.locks --no-collector.long_running_transactions --no-collector.postmaster --no-collector.process_idle --no-collector.replication --no-collector.replication_slot --no-collector.stat_activity_autovacuum --no-collector.stat_bgwriter --no-collector.stat_database --no-collector.stat_statements --no-collector.stat_user_tables --no-collector.stat_wal_receiver --no-collector.statio_user_indexes --no-collector.statio_user_tables --no-collector.wal --no-collector.xlog_location"
DATA_SOURCE_NAME="postgresql:///postgres?host=/var/run/postgresql/&user=ccp_monitoring&sslmode=disable"

# For global / cluster metric
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# QUERY_FILE_LIST: space delimited yml files that will be concatenated to a single queries.yml file. This should only be set once. If set multiple times, last one wins.

# Ensure that listening port is different than global postgres_exporter (9188 below). Also ensure that query-path file is different from global one (queries_all_db_stats.yml below).
OPT="--web.listen-address=0.0.0.0:9188 --extend.query-path=/etc/postgres_exporter/13/queries_all_db_stats.yml --disable-default-metrics --disable-settings-metrics"
OPT="--web.listen-address=0.0.0.0:9188 --extend.query-path=/etc/postgres_exporter/13/queries_all_db_stats.yml --disable-default-metrics --disable-settings-metrics --no-collector.database --no-collector.database_wraparound --no-collector.locks --no-collector.long_running_transactions --no-collector.postmaster --no-collector.process_idle --no-collector.replication --no-collector.replication_slot --no-collector.stat_activity_autovacuum --no-collector.stat_bgwriter --no-collector.stat_database --no-collector.stat_statements --no-collector.stat_user_tables --no-collector.stat_wal_receiver --no-collector.statio_user_indexes --no-collector.statio_user_tables --no-collector.wal --no-collector.xlog_location"
DATA_SOURCE_NAME="postgresql:///postgres?host=/var/run/postgresql/&user=ccp_monitoring&sslmode=disable"
# Multiple DSN's can be given to connect to multiple databases with a single exporter. Separate DSNs with a comma and no spaces. Database name in example below is first the value after the "///" before the "?". Additional connection options can be given after "?", separated by "&".
#DATA_SOURCE_NAME="postgresql:///postgres?host=/var/run/postgresql/&user=ccp_monitoring&sslmode=disable,postgresql:///mydb1?host=/var/run/postgresql/&user=ccp_monitoring&sslmode=disable,postgresql:///mydb2?host=/var/run/postgresql/&user=ccp_monitoring&sslmode=disable"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
PGBACKREST_INFO_THROTTLE_MINUTES=10
PG_STAT_STATEMENTS_LIMIT=20
PG_STAT_STATEMENTS_THROTTLE_MINUTES=-1
OPT="--web.listen-address=0.0.0.0:9187 --extend.query-path=/etc/postgres_exporter/14/queries.yml --disable-default-metrics --disable-settings-metrics"
OPT="--web.listen-address=0.0.0.0:9187 --extend.query-path=/etc/postgres_exporter/14/queries.yml --disable-default-metrics --disable-settings-metrics --no-collector.database --no-collector.database_wraparound --no-collector.locks --no-collector.long_running_transactions --no-collector.postmaster --no-collector.process_idle --no-collector.replication --no-collector.replication_slot --no-collector.stat_activity_autovacuum --no-collector.stat_bgwriter --no-collector.stat_database --no-collector.stat_statements --no-collector.stat_user_tables --no-collector.stat_wal_receiver --no-collector.statio_user_indexes --no-collector.statio_user_tables --no-collector.wal --no-collector.xlog_location"
DATA_SOURCE_NAME="postgresql:///postgres?host=/var/run/postgresql/&user=ccp_monitoring&sslmode=disable"

# For global / cluster metric
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# QUERY_FILE_LIST: space delimited yml files that will be concatenated to a single queries.yml file. This should only be set once. If set multiple times, last one wins.

# Ensure that listening port is different than global postgres_exporter (9188 below). Also ensure that query-path file is different from global one (queries_all_db_stats.yml below).
OPT="--web.listen-address=0.0.0.0:9188 --extend.query-path=/etc/postgres_exporter/14/queries_all_db_stats.yml --disable-default-metrics --disable-settings-metrics"
OPT="--web.listen-address=0.0.0.0:9188 --extend.query-path=/etc/postgres_exporter/14/queries_all_db_stats.yml --disable-default-metrics --disable-settings-metrics --no-collector.database --no-collector.database_wraparound --no-collector.locks --no-collector.long_running_transactions --no-collector.postmaster --no-collector.process_idle --no-collector.replication --no-collector.replication_slot --no-collector.stat_activity_autovacuum --no-collector.stat_bgwriter --no-collector.stat_database --no-collector.stat_statements --no-collector.stat_user_tables --no-collector.stat_wal_receiver --no-collector.statio_user_indexes --no-collector.statio_user_tables --no-collector.wal --no-collector.xlog_location"
DATA_SOURCE_NAME="postgresql:///postgres?host=/var/run/postgresql/&user=ccp_monitoring&sslmode=disable"
# Multiple DSN's can be given to connect to multiple databases with a single exporter. Separate DSNs with a comma and no spaces. Database name in example below is first the value after the "///" before the "?". Additional connection options can be given after "?", separated by "&".
#DATA_SOURCE_NAME="postgresql:///postgres?host=/var/run/postgresql/&user=ccp_monitoring&sslmode=disable,postgresql:///mydb1?host=/var/run/postgresql/&user=ccp_monitoring&sslmode=disable,postgresql:///mydb2?host=/var/run/postgresql/&user=ccp_monitoring&sslmode=disable"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
PGBACKREST_INFO_THROTTLE_MINUTES=10
PG_STAT_STATEMENTS_LIMIT=20
PG_STAT_STATEMENTS_THROTTLE_MINUTES=-1
OPT="--web.listen-address=0.0.0.0:9187 --extend.query-path=/etc/postgres_exporter/15/queries.yml --disable-default-metrics --disable-settings-metrics"
OPT="--web.listen-address=0.0.0.0:9187 --extend.query-path=/etc/postgres_exporter/15/queries.yml --disable-default-metrics --disable-settings-metrics --no-collector.database --no-collector.database_wraparound --no-collector.locks --no-collector.long_running_transactions --no-collector.postmaster --no-collector.process_idle --no-collector.replication --no-collector.replication_slot --no-collector.stat_activity_autovacuum --no-collector.stat_bgwriter --no-collector.stat_database --no-collector.stat_statements --no-collector.stat_user_tables --no-collector.stat_wal_receiver --no-collector.statio_user_indexes --no-collector.statio_user_tables --no-collector.wal --no-collector.xlog_location"
DATA_SOURCE_NAME="postgresql:///postgres?host=/var/run/postgresql/&user=ccp_monitoring&sslmode=disable"

# For global / cluster metric
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# QUERY_FILE_LIST: space delimited yml files that will be concatenated to a single queries.yml file. This should only be set once. If set multiple times, last one wins.

# Ensure that listening port is different than global postgres_exporter (9188 below). Also ensure that query-path file is different from global one (queries_all_db_stats.yml below).
OPT="--web.listen-address=0.0.0.0:9188 --extend.query-path=/etc/postgres_exporter/15/queries_all_db_stats.yml --disable-default-metrics --disable-settings-metrics"
OPT="--web.listen-address=0.0.0.0:9188 --extend.query-path=/etc/postgres_exporter/15/queries_all_db_stats.yml --disable-default-metrics --disable-settings-metrics --no-collector.database --no-collector.database_wraparound --no-collector.locks --no-collector.long_running_transactions --no-collector.postmaster --no-collector.process_idle --no-collector.replication --no-collector.replication_slot --no-collector.stat_activity_autovacuum --no-collector.stat_bgwriter --no-collector.stat_database --no-collector.stat_statements --no-collector.stat_user_tables --no-collector.stat_wal_receiver --no-collector.statio_user_indexes --no-collector.statio_user_tables --no-collector.wal --no-collector.xlog_location"
DATA_SOURCE_NAME="postgresql:///postgres?host=/var/run/postgresql/&user=ccp_monitoring&sslmode=disable"
# Multiple DSN's can be given to connect to multiple databases with a single exporter. Separate DSNs with a comma and no spaces. Database name in example below is first the value after the "///" before the "?". Additional connection options can be given after "?", separated by "&".
#DATA_SOURCE_NAME="postgresql:///postgres?host=/var/run/postgresql/&user=ccp_monitoring&sslmode=disable,postgresql:///mydb1?host=/var/run/postgresql/&user=ccp_monitoring&sslmode=disable,postgresql:///mydb2?host=/var/run/postgresql/&user=ccp_monitoring&sslmode=disable"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
PGBACKREST_INFO_THROTTLE_MINUTES=10
PG_STAT_STATEMENTS_LIMIT=20
PG_STAT_STATEMENTS_THROTTLE_MINUTES=-1
OPT="--web.listen-address=0.0.0.0:9187 --extend.query-path=/etc/postgres_exporter/16/queries.yml --disable-default-metrics --disable-settings-metrics"
OPT="--web.listen-address=0.0.0.0:9187 --extend.query-path=/etc/postgres_exporter/16/queries.yml --disable-default-metrics --disable-settings-metrics --no-collector.database --no-collector.database_wraparound --no-collector.locks --no-collector.long_running_transactions --no-collector.postmaster --no-collector.process_idle --no-collector.replication --no-collector.replication_slot --no-collector.stat_activity_autovacuum --no-collector.stat_bgwriter --no-collector.stat_database --no-collector.stat_statements --no-collector.stat_user_tables --no-collector.stat_wal_receiver --no-collector.statio_user_indexes --no-collector.statio_user_tables --no-collector.wal --no-collector.xlog_location"
DATA_SOURCE_NAME="postgresql:///postgres?host=/var/run/postgresql/&user=ccp_monitoring&sslmode=disable"

# For global / cluster metric
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# QUERY_FILE_LIST: space delimited yml files that will be concatenated to a single queries.yml file. This should only be set once. If set multiple times, last one wins.

# Ensure that listening port is different than global postgres_exporter (9188 below). Also ensure that query-path file is different from global one (queries_all_db_stats.yml below).
OPT="--web.listen-address=0.0.0.0:9188 --extend.query-path=/etc/postgres_exporter/16/queries_all_db_stats.yml --disable-default-metrics --disable-settings-metrics"
OPT="--web.listen-address=0.0.0.0:9188 --extend.query-path=/etc/postgres_exporter/16/queries_all_db_stats.yml --disable-default-metrics --disable-settings-metrics --no-collector.database --no-collector.database_wraparound --no-collector.locks --no-collector.long_running_transactions --no-collector.postmaster --no-collector.process_idle --no-collector.replication --no-collector.replication_slot --no-collector.stat_activity_autovacuum --no-collector.stat_bgwriter --no-collector.stat_database --no-collector.stat_statements --no-collector.stat_user_tables --no-collector.stat_wal_receiver --no-collector.statio_user_indexes --no-collector.statio_user_tables --no-collector.wal --no-collector.xlog_location"
DATA_SOURCE_NAME="postgresql:///postgres?host=/var/run/postgresql/&user=ccp_monitoring&sslmode=disable"
# Multiple DSN's can be given to connect to multiple databases with a single exporter. Separate DSNs with a comma and no spaces. Database name in example below is first the value after the "///" before the "?". Additional connection options can be given after "?", separated by "&".
#DATA_SOURCE_NAME="postgresql:///postgres?host=/var/run/postgresql/&user=ccp_monitoring&sslmode=disable,postgresql:///mydb1?host=/var/run/postgresql/&user=ccp_monitoring&sslmode=disable,postgresql:///mydb2?host=/var/run/postgresql/&user=ccp_monitoring&sslmode=disable"
Expand Down
Loading