blob: e4a098bc2e87bdbc62ba5ff977e7da2cb63f93b9 (
plain)
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
|
plugin_name: go.d.plugin
modules:
- meta:
id: collector-go.d.plugin-pgbouncer
plugin_name: go.d.plugin
module_name: pgbouncer
monitored_instance:
name: PgBouncer
link: https://www.pgbouncer.org/
icon_filename: postgres.svg
categories:
- data-collection.database-servers
keywords:
- pgbouncer
related_resources:
integrations:
list: []
info_provided_to_referring_integrations:
description: ""
most_popular: false
overview:
data_collection:
metrics_description: |
This collector monitors PgBouncer servers.
Executed queries:
- `SHOW VERSION;`
- `SHOW CONFIG;`
- `SHOW DATABASES;`
- `SHOW STATS;`
- `SHOW POOLS;`
Information about the queries can be found in the [PgBouncer Documentation](https://www.pgbouncer.org/usage.html).
method_description: ""
supported_platforms:
include: []
exclude: []
multi_instance: true
additional_permissions:
description: ""
default_behavior:
auto_detection:
description: ""
limits:
description: ""
performance_impact:
description: ""
setup:
prerequisites:
list:
- title: Create netdata user
description: |
Create a user with `stats_users` permissions to query your PgBouncer instance.
To create the `netdata` user:
- Add `netdata` user to the `pgbouncer.ini` file:
```text
stats_users = netdata
```
- Add a password for the `netdata` user to the `userlist.txt` file:
```text
"netdata" "<PASSWORD>"
```
- To verify the credentials, run the following command
```bash
psql -h localhost -U netdata -p 6432 pgbouncer -c "SHOW VERSION;" >/dev/null 2>&1 && echo OK || echo FAIL
```
When it prompts for a password, enter the password you added to `userlist.txt`.
configuration:
file:
name: go.d/pgbouncer.conf
options:
description: |
The following options can be defined globally: update_every, autodetection_retry.
folding:
title: Config options
enabled: true
list:
- name: update_every
description: Data collection frequency.
default_value: 5
required: false
- name: autodetection_retry
description: Recheck interval in seconds. Zero means no recheck will be scheduled.
default_value: 0
required: false
- name: dsn
description: PgBouncer server DSN (Data Source Name). See [DSN syntax](https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-CONNSTRING).
default_value: postgres://postgres:postgres@127.0.0.1:6432/pgbouncer
required: true
- name: timeout
description: Query timeout in seconds.
default_value: 1
required: false
examples:
folding:
title: Config
enabled: true
list:
- name: TCP socket
description: An example configuration.
config: |
jobs:
- name: local
dsn: 'postgres://postgres:postgres@127.0.0.1:6432/pgbouncer'
- name: Unix socket
description: An example configuration.
config: |
jobs:
- name: local
dsn: 'host=/tmp dbname=pgbouncer user=postgres port=6432'
- name: Multi-instance
description: |
> **Note**: When you define multiple jobs, their names must be unique.
Local and remote instances.
config: |
jobs:
- name: local
dsn: 'postgres://postgres:postgres@127.0.0.1:6432/pgbouncer'
- name: remote
dsn: 'postgres://postgres:postgres@203.0.113.10:6432/pgbouncer'
troubleshooting:
problems:
list: []
alerts: []
metrics:
folding:
title: Metrics
enabled: false
description: ""
availability: []
scopes:
- name: global
description: These metrics refer to the entire monitored application.
labels: []
metrics:
- name: pgbouncer.client_connections_utilization
description: Client connections utilization
unit: percentage
chart_type: line
dimensions:
- name: used
- name: database
description: These metrics refer to the database.
labels:
- name: database
description: database name
- name: postgres_database
description: Postgres database name
metrics:
- name: pgbouncer.db_client_connections
description: Database client connections
unit: connections
chart_type: line
dimensions:
- name: active
- name: waiting
- name: cancel_req
- name: pgbouncer.db_server_connections
description: Database server connections
unit: connections
chart_type: line
dimensions:
- name: active
- name: idle
- name: used
- name: tested
- name: login
- name: pgbouncer.db_server_connections_utilization
description: Database server connections utilization
unit: percentage
chart_type: line
dimensions:
- name: used
- name: pgbouncer.db_clients_wait_time
description: Database clients wait time
unit: seconds
chart_type: line
dimensions:
- name: time
- name: pgbouncer.db_client_max_wait_time
description: Database client max wait time
unit: seconds
chart_type: line
dimensions:
- name: time
- name: pgbouncer.db_transactions
description: Database pooled SQL transactions
unit: transactions/s
chart_type: line
dimensions:
- name: transactions
- name: pgbouncer.db_transactions_time
description: Database transactions time
unit: seconds
chart_type: line
dimensions:
- name: time
- name: pgbouncer.db_transaction_avg_time
description: Database transaction average time
unit: seconds
chart_type: line
dimensions:
- name: time
- name: pgbouncer.db_queries
description: Database pooled SQL queries
unit: queries/s
chart_type: line
dimensions:
- name: queries
- name: pgbouncer.db_queries_time
description: Database queries time
unit: seconds
chart_type: line
dimensions:
- name: time
- name: pgbouncer.db_query_avg_time
description: Database query average time
unit: seconds
chart_type: line
dimensions:
- name: time
- name: pgbouncer.db_network_io
description: Database traffic
unit: B/s
chart_type: area
dimensions:
- name: received
- name: sent
|