mirror of
https://github.com/helm/charts.git
synced 2026-09-05 12:27:30 +00:00
* add support for Google Cloud SQL Cloud SQL, Google's managed database product, requires use of an authentication proxy when accessed from dynamic IPs. To limit access to the proxy, it is recommended to use a sidecar. More info: https://cloud.google.com/sql/docs/postgres/connect-kubernetes-engine Cloud SQL, like other managed databases, does not allow use of superuser accounts. Therefore, add support for a configurable database in `datasource`. More info: https://github.com/wrouesnel/postgres_exporter#running-as-non-superuser * re-bump chart version * use extraContainers & extraVolumes
155 lines
5.5 KiB
YAML
155 lines
5.5 KiB
YAML
# Default values for prometheus-postgres-exporter.
|
|
# This is a YAML-formatted file.
|
|
# Declare variables to be passed into your templates.
|
|
|
|
replicaCount: 1
|
|
|
|
image:
|
|
repository: wrouesnel/postgres_exporter
|
|
tag: v0.4.6
|
|
pullPolicy: IfNotPresent
|
|
|
|
service:
|
|
type: ClusterIP
|
|
port: 80
|
|
targetPort: 9187
|
|
|
|
resources: {}
|
|
# We usually recommend not to specify default resources and to leave this as a conscious
|
|
# choice for the user. This also increases chances charts run on environments with little
|
|
# resources, such as Minikube. If you do want to specify resources, uncomment the following
|
|
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
|
|
# limits:
|
|
# cpu: 100m
|
|
# memory: 128Mi
|
|
# requests:
|
|
# cpu: 100m
|
|
# memory: 128Mi
|
|
|
|
rbac:
|
|
# Specifies whether RBAC resources should be created
|
|
create: true
|
|
# Specifies whether a PodSecurityPolicy should be created
|
|
pspEnabled: true
|
|
serviceAccount:
|
|
# Specifies whether a ServiceAccount should be created
|
|
create: true
|
|
# The name of the ServiceAccount to use.
|
|
# If not set and create is true, a name is generated using the fullname template
|
|
name:
|
|
|
|
config:
|
|
datasource:
|
|
host:
|
|
user:
|
|
password:
|
|
port: "5432"
|
|
database: ''
|
|
sslmode: disable
|
|
# this are the defaults queries that the exporter will run, extracted from: https://github.com/wrouesnel/postgres_exporter/blob/master/queries.yaml
|
|
queries: |-
|
|
pg_replication:
|
|
query: "SELECT EXTRACT(EPOCH FROM (now() - pg_last_xact_replay_timestamp()))::INT as lag"
|
|
metrics:
|
|
- lag:
|
|
usage: "GAUGE"
|
|
description: "Replication lag behind master in seconds"
|
|
|
|
pg_postmaster:
|
|
query: "SELECT pg_postmaster_start_time as start_time_seconds from pg_postmaster_start_time()"
|
|
metrics:
|
|
- start_time_seconds:
|
|
usage: "GAUGE"
|
|
description: "Time at which postmaster started"
|
|
|
|
pg_stat_user_tables:
|
|
query: "SELECT schemaname, relname, seq_scan, seq_tup_read, idx_scan, idx_tup_fetch, n_tup_ins, n_tup_upd, n_tup_del, n_tup_hot_upd, n_live_tup, n_dead_tup, n_mod_since_analyze, last_vacuum, last_autovacuum, last_analyze, last_autoanalyze, vacuum_count, autovacuum_count, analyze_count, autoanalyze_count FROM pg_stat_user_tables"
|
|
metrics:
|
|
- schemaname:
|
|
usage: "LABEL"
|
|
description: "Name of the schema that this table is in"
|
|
- relname:
|
|
usage: "LABEL"
|
|
description: "Name of this table"
|
|
- seq_scan:
|
|
usage: "COUNTER"
|
|
description: "Number of sequential scans initiated on this table"
|
|
- seq_tup_read:
|
|
usage: "COUNTER"
|
|
description: "Number of live rows fetched by sequential scans"
|
|
- idx_scan:
|
|
usage: "COUNTER"
|
|
description: "Number of index scans initiated on this table"
|
|
- idx_tup_fetch:
|
|
usage: "COUNTER"
|
|
description: "Number of live rows fetched by index scans"
|
|
- n_tup_ins:
|
|
usage: "COUNTER"
|
|
description: "Number of rows inserted"
|
|
- n_tup_upd:
|
|
usage: "COUNTER"
|
|
description: "Number of rows updated"
|
|
- n_tup_del:
|
|
usage: "COUNTER"
|
|
description: "Number of rows deleted"
|
|
- n_tup_hot_upd:
|
|
usage: "COUNTER"
|
|
description: "Number of rows HOT updated (i.e., with no separate index update required)"
|
|
- n_live_tup:
|
|
usage: "GAUGE"
|
|
description: "Estimated number of live rows"
|
|
- n_dead_tup:
|
|
usage: "GAUGE"
|
|
description: "Estimated number of dead rows"
|
|
- n_mod_since_analyze:
|
|
usage: "GAUGE"
|
|
description: "Estimated number of rows changed since last analyze"
|
|
- last_vacuum:
|
|
usage: "GAUGE"
|
|
description: "Last time at which this table was manually vacuumed (not counting VACUUM FULL)"
|
|
- last_autovacuum:
|
|
usage: "GAUGE"
|
|
description: "Last time at which this table was vacuumed by the autovacuum daemon"
|
|
- last_analyze:
|
|
usage: "GAUGE"
|
|
description: "Last time at which this table was manually analyzed"
|
|
- last_autoanalyze:
|
|
usage: "GAUGE"
|
|
description: "Last time at which this table was analyzed by the autovacuum daemon"
|
|
- vacuum_count:
|
|
usage: "COUNTER"
|
|
description: "Number of times this table has been manually vacuumed (not counting VACUUM FULL)"
|
|
- autovacuum_count:
|
|
usage: "COUNTER"
|
|
description: "Number of times this table has been vacuumed by the autovacuum daemon"
|
|
- analyze_count:
|
|
usage: "COUNTER"
|
|
description: "Number of times this table has been manually analyzed"
|
|
- autoanalyze_count:
|
|
usage: "COUNTER"
|
|
description: "Number of times this table has been analyzed by the autovacuum daemon"
|
|
|
|
pg_database:
|
|
query: " SELECT pg_database.datname, pg_database_size(pg_database.datname) as size FROM pg_database"
|
|
metrics:
|
|
- datname:
|
|
usage: "LABEL"
|
|
description: "Name of the database"
|
|
- size:
|
|
usage: "GAUGE"
|
|
description: "Disk space used by the database"
|
|
|
|
nodeSelector: {}
|
|
|
|
tolerations: []
|
|
|
|
affinity: {}
|
|
|
|
annotations: {}
|
|
|
|
# Additional sidecar containers, e. g. for a database proxy, such as Google's cloudsql-proxy
|
|
extraContainers: |
|
|
|
|
# Additional volumes, e. g. for secrets used in an extraContainer
|
|
extraVolumes: |
|