-
Notifications
You must be signed in to change notification settings - Fork 104
Expand file tree
/
Copy pathsysconfig.postgres_exporter_pg14
More file actions
24 lines (19 loc) · 2.18 KB
/
Copy pathsysconfig.postgres_exporter_pg14
File metadata and controls
24 lines (19 loc) · 2.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
###
#
# Copyright © 2017-2025 Crunchy Data Solutions, Inc. All Rights Reserved.
# Copyright © 2025-2026 Snowflake, Inc. All Rights Reserved.
#
###
# This file must be in a pathname that matches the EnvironmentFile entry in the service file (Default: /etc/sysconfig/postgres_exporter)
# --web.listen-address: change '0.0.0.0' to the network IP assigned to this system if necessary, otherwise it will listen on any IP. Change port as necessary if running multiple instances.
# --extend.query-path: location of file containing custom queries to run. Location below is one recommended by crunchy setup steps.
# DATA_SOURCE_NAME: psql connection string. set the database that the exporter will connect to. Default is `postgres`.
# 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.
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 --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
QUERY_FILE_LIST="/etc/postgres_exporter/14/queries_global.yml /etc/postgres_exporter/14/queries_general.yml /etc/postgres_exporter/14/queries_global_dbsize.yml"
# Recommend running separate exporter service to collect per-db metrics, even if there is only one database in the instance. Allows easier expansion to support multiple databases at a later time. See postgres_exporter_pg##_per_db file.