forked from newrelic/nri-postgresql
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpostgresql-config.yml.sample
64 lines (62 loc) · 2.77 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
---
integration_name: com.newrelic.postgresql
instances:
# A name for the collection
- name: sample_postgres
# The only supported command is all_data
command: all_data
arguments:
# 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 a JSON object, you can more finely tune the entities that are collected.
# Only the entities that are specified in the object will be collected. No automatic
# discovery will be performed.
# The levels of JSON are database name -> schema name -> table name -> index name
# Example:
# collection_list: '{"postgres":{"public":{"pg_table1":["pg_index1","pg_index2"],"pg_table2":[]}}}'
#
# 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"]'
# 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
# True if SSL is to be used. Defaults to false.
enable_ssl: true
# 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.
trust_server_certificate: false
ssl_root_cert_location: /etc/newrelic-infra/root_cert.crt
ssl_cert_location: /etc/newrelic-infra/postgresql.crt
ssl_key_location: /etc/newrelic-infra/postgresql.key
timeout: 10
# 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;
labels:
env: production
role: postgresql