-
Notifications
You must be signed in to change notification settings - Fork 31
/
postgresql-config.yml.sample
82 lines (68 loc) · 3.42 KB
/
postgresql-config.yml.sample
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
integrations:
- name: nri-postgresql
env:
# The username for the postgres instance. Required.
USERNAME: postgres
# The password for the postgres instance. Required.
PASSWORD: 'pass'
# The hostname for the postgres instance. Defaults to localhost.
HOSTNAME: psql-sample.localnet
# The database to connect to on the postgres instance. Defaults to postgres.
# DATABASE: postgres
# The port of the postgres instance. If PgBouncer is being used,
# use the port it is running on. Defaults to 5432
PORT: "6432"
# Collection List can be either a JSON array, a JSON object, or the string literal 'ALL'.
#
# If it is a JSON array, it will be interpreted as a list of database names to
# collect all related metrics from. This will collect metrics for each database
# specified, as well as all tables and indexes that belong to that database.
# Example:
# COLLECTION_LIST: '["postgres"]'
# If it is the string literal 'ALL', it will collect metrics for all databases, schemas, tables, and indexes
# Example:
# COLLECTION_LIST: 'ALL'
COLLECTION_LIST: '["postgres"]'
# JSON array of database names that will be ignored for metrics collection.
# Typically useful for cases where COLLECTION_LIST is set to 'ALL' and some databases need to be ignored.
# Defaults to empty '[]'.
# Example:
# COLLECTION_IGNORE_DATABASE_LIST: '["azure_maintenance","azure_sys"]'
# JSON array of table names that will be ignored for metrics collection.
# Defaults to empty '[]'.
# Example:
# COLLECTION_IGNORE_TABLE_LIST: '["table1","table2"]'
# True if database lock metrics should be collected
# Note: requires that the `tablefunc` extension be installed on the public schema
# of the database where lock metrics will be collected.
COLLECT_DB_LOCK_METRICS: "false"
# Enable collecting bloat metrics which can be performance intensive
COLLECT_BLOAT_METRICS: "true"
# True if SSL is to be used. Defaults to false.
ENABLE_SSL: "false"
# True if the SSL certificate should be trusted without validating.
# Setting this to true may open up the monitoring service to MITM attacks.
# Defaults to false.
# This setting will need to be set to true for managed database environments like Azure Flexbile or AWS RDS/Aurora
TRUST_SERVER_CERTIFICATE: "false"
# SSL_CERT_LOCATION: /etc/newrelic-infra/postgresql.crt
# SSL_KEY_LOCATION: /etc/newrelic-infra/postgresql.key
# SSL_ROOT_CERT_LOCATION: /etc/newrelic-infra/root_cert.crt
TIMEOUT: "10"
# A SQL query to collect custom metrics. Must have the columns metric_name, metric_type, and metric_value. Additional columns are added as attributes
# CUSTOM_METRICS_QUERY: >-
# select
# 'rows_inserted' as "metric_name",
# 'delta' as "metric_type",
# sd.tup_inserted as "metric_value",
# sd.datid as "database_id"
# from pg_stat_database sd;
# Can be use instead of CUSTOM_METRICS_QUERY to specify the path to a
# YAML configuration with one or more custom SQL queries to collect
# For more information check https://docs.newrelic.com/docs/integrations/host-integrations/host-integrations-list/postgresql-monitoring-integration/#example-postgresSQL-config
# CUSTOM_METRICS_CONFIG: /path/to/postgresql-custom-query.yml
interval: 15s
labels:
env: production
role: postgresql
inventory_source: config/postgresql