DirectorySecurity AdvisoriesPricing
Sign in
Directory
cloudnative-pg logoHELM

cloudnative-pg

Helm chart
Last changed
Request a free trial

Contact our team to test out this Helm chart and related images for free. Please also indicate any other images you would like to evaluate.

Overview
Chart tags
Default values
Chart metadata
Images

Tag:
Compare:

1
#
2
# Copyright © contributors to CloudNativePG, established as
3
# CloudNativePG a Series of LF Projects, LLC.
4
#
5
# Licensed under the Apache License, Version 2.0 (the "License");
6
# you may not use this file except in compliance with the License.
7
# You may obtain a copy of the License at
8
#
9
# http://www.apache.org/licenses/LICENSE-2.0
10
#
11
# Unless required by applicable law or agreed to in writing, software
12
# distributed under the License is distributed on an "AS IS" BASIS,
13
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
# See the License for the specific language governing permissions and
15
# limitations under the License.
16
#
17
# SPDX-License-Identifier: Apache-2.0
18
#
19
# Default values for CloudNativePG.
20
# This is a YAML-formatted file.
21
# Please declare variables to be passed to your templates.
22
23
replicaCount: 1
24
image:
25
repository: chainreg.biz/chainguard-private/cloudnative-pg
26
pullPolicy: IfNotPresent
27
# -- Overrides the image tag whose default is the chart appVersion.
28
tag: 1.30.1-r0@sha256:2bdff44601463e256bb1a001e6256d4c460e53246c3f62ba7e0cf59173bcc90a
29
imagePullSecrets: []
30
nameOverride: ""
31
fullnameOverride: ""
32
namespaceOverride: ""
33
hostNetwork: false
34
dnsPolicy: ""
35
# -- Update strategy for the operator.
36
# ref: https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#strategy
37
updateStrategy: {}
38
# For example:
39
# type: RollingUpdate
40
# rollingUpdate:
41
# maxSurge: 25%
42
# maxUnavailable: 25%
43
44
crds:
45
# -- Specifies whether the CRDs should be created when installing the chart.
46
create: true
47
# -- The webhook configuration.
48
webhook:
49
port: 9443
50
mutating:
51
create: true
52
failurePolicy: Fail
53
validating:
54
create: true
55
failurePolicy: Fail
56
livenessProbe:
57
initialDelaySeconds: 3
58
readinessProbe:
59
initialDelaySeconds: 3
60
startupProbe:
61
failureThreshold: 6
62
periodSeconds: 5
63
# Operator configuration.
64
config:
65
# -- Specifies whether the secret should be created.
66
create: true
67
# -- The name of the configmap/secret to use.
68
name: cnpg-controller-manager-config
69
# -- Specifies whether it should be stored in a secret, instead of a configmap.
70
secret: false
71
# -- This option determines if the operator is responsible for observing
72
# events across the entire Kubernetes cluster or if its focus should be
73
# narrowed down to the specific namespace within which it has been deployed.
74
clusterWide: true
75
# -- The content of the configmap/secret, see
76
# https://cloudnative-pg.io/documentation/current/operator_conf/#available-options
77
# for all the available options.
78
data: {}
79
# INHERITED_ANNOTATIONS: categories
80
# INHERITED_LABELS: environment, workload, app
81
# WATCH_NAMESPACE: namespace-a,namespace-b
82
83
# -- The maximum number of concurrent reconciles. Defaults to 10.
84
maxConcurrentReconciles: 10
85
# -- Additional arguments to be added to the operator's args list.
86
additionalArgs: []
87
# -- Array containing extra environment variables which can be templated.
88
additionalEnv: []
89
# For example:
90
# - name: RELEASE_NAME
91
# value: "{{ .Release.Name }}"
92
# - name: MY_VAR
93
# value: "mySpecialKey"
94
95
serviceAccount:
96
# -- Specifies whether the service account should be created.
97
create: true
98
# -- The name of the service account to use.
99
# If not set and create is true, a name is generated using the fullname template.
100
name: ""
101
rbac:
102
# -- Specifies whether ClusterRole and ClusterRoleBinding should be created.
103
create: true
104
# -- Aggregate ClusterRoles to Kubernetes default user-facing roles.
105
# Ref: https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles
106
aggregateClusterRoles: false
107
# -- Annotations to be added to all other resources.
108
commonAnnotations: {}
109
# -- Annotations to be added to the pod.
110
podAnnotations: {}
111
# -- Labels to be added to the pod.
112
podLabels: {}
113
# -- Container Security Context.
114
containerSecurityContext:
115
allowPrivilegeEscalation: false
116
readOnlyRootFilesystem: true
117
runAsUser: 10001
118
runAsGroup: 10001
119
seccompProfile:
120
type: RuntimeDefault
121
capabilities:
122
drop:
123
- "ALL"
124
# -- Security Context for the whole pod.
125
podSecurityContext:
126
runAsNonRoot: true
127
seccompProfile:
128
type: RuntimeDefault
129
# fsGroup: 2000
130
# -- Priority indicates the importance of a Pod relative to other Pods.
131
priorityClassName: ""
132
service:
133
type: ClusterIP
134
# -- The name of the Webhook Service.
135
name: cnpg-webhook-service
136
# DO NOT CHANGE THE SERVICE NAME as it is currently used to generate the certificate
137
# and can not be configured
138
139
port: 443
140
# -- Set the ip family policy to configure dual-stack see [Configure dual-stack](https://kubernetes.io/docs/concepts/services-networking/dual-stack/#services)
141
ipFamilyPolicy: ""
142
# -- Sets the families that should be supported and the order in which they should be applied to ClusterIP as well. Can be IPv4 and/or IPv6.
143
ipFamilies: []
144
resources: {}
145
# If you want to specify resources, uncomment the following
146
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
147
#
148
# limits:
149
# cpu: 100m
150
# memory: 200Mi
151
# requests:
152
# cpu: 100m
153
# memory: 100Mi
154
155
scratchData:
156
# -- EmptyDir options for the scratch-data volume.
157
emptyDir: {}
158
# -- Nodeselector for the operator to be installed.
159
nodeSelector: {}
160
# -- Topology Spread Constraints for the operator to be installed.
161
topologySpreadConstraints: []
162
# -- Tolerations for the operator to be installed.
163
tolerations: []
164
# -- Affinity for the operator to be installed.
165
affinity: {}
166
monitoring:
167
# -- Specifies whether the monitoring should be enabled. Requires Prometheus Operator CRDs.
168
podMonitorEnabled: false
169
# -- Metrics relabel configurations to apply to samples before ingestion.
170
podMonitorMetricRelabelings: []
171
# -- Relabel configurations to apply to samples before scraping.
172
podMonitorRelabelings: []
173
# -- Additional labels for the podMonitor
174
podMonitorAdditionalLabels: {}
175
grafanaDashboard:
176
create: false
177
# -- Allows overriding the namespace where the ConfigMap will be created, defaulting to the same one as the Release.
178
namespace: ""
179
# -- The name of the ConfigMap containing the dashboard.
180
configMapName: "cnpg-grafana-dashboard"
181
# -- Label that ConfigMaps should have to be loaded as dashboards. DEPRECATED: Use labels instead.
182
sidecarLabel: "grafana_dashboard"
183
# -- Label value that ConfigMaps should have to be loaded as dashboards. DEPRECATED: Use labels instead.
184
sidecarLabelValue: "1"
185
# -- Labels that ConfigMaps should have to get configured in Grafana.
186
labels: {}
187
# -- Annotations that ConfigMaps can have to get configured in Grafana.
188
annotations: {}
189
# Default monitoring queries
190
monitoringQueriesConfigMap:
191
# -- The name of the default monitoring configmap.
192
name: cnpg-default-monitoring
193
# -- A string representation of a YAML defining monitoring queries.
194
queries: |
195
backends:
196
query: |
197
SELECT sa.datname
198
, sa.usename
199
, sa.application_name
200
, states.state
201
, COALESCE(sa.count, 0) AS total
202
, COALESCE(sa.max_tx_secs, 0) AS max_tx_duration_seconds
203
FROM ( VALUES ('active')
204
, ('idle')
205
, ('idle in transaction')
206
, ('idle in transaction (aborted)')
207
, ('fastpath function call')
208
, ('disabled')
209
) AS states(state)
210
LEFT JOIN (
211
SELECT datname
212
, state
213
, usename
214
, COALESCE(application_name, '') AS application_name
215
, pg_catalog.count(*)
216
, COALESCE(EXTRACT (EPOCH FROM (pg_catalog.max(pg_catalog.now() OPERATOR(pg_catalog.-) xact_start))), 0) AS max_tx_secs
217
FROM pg_catalog.pg_stat_activity
218
GROUP BY datname, state, usename, application_name
219
) sa ON states.state OPERATOR(pg_catalog.=) sa.state
220
WHERE sa.usename IS NOT NULL
221
metrics:
222
- datname:
223
usage: "LABEL"
224
description: "Name of the database"
225
- usename:
226
usage: "LABEL"
227
description: "Name of the user"
228
- application_name:
229
usage: "LABEL"
230
description: "Name of the application"
231
- state:
232
usage: "LABEL"
233
description: "State of the backend"
234
- total:
235
usage: "GAUGE"
236
description: "Number of backends"
237
- max_tx_duration_seconds:
238
usage: "GAUGE"
239
description: "Maximum duration of a transaction in seconds"
240
241
backends_waiting:
242
query: |
243
SELECT pg_catalog.count(*) AS total
244
FROM pg_catalog.pg_locks blocked_locks
245
JOIN pg_catalog.pg_locks blocking_locks
246
ON blocking_locks.locktype OPERATOR(pg_catalog.=) blocked_locks.locktype
247
AND blocking_locks.database IS NOT DISTINCT FROM blocked_locks.database
248
AND blocking_locks.relation IS NOT DISTINCT FROM blocked_locks.relation
249
AND blocking_locks.page IS NOT DISTINCT FROM blocked_locks.page
250
AND blocking_locks.tuple IS NOT DISTINCT FROM blocked_locks.tuple
251
AND blocking_locks.virtualxid IS NOT DISTINCT FROM blocked_locks.virtualxid
252
AND blocking_locks.transactionid IS NOT DISTINCT FROM blocked_locks.transactionid
253
AND blocking_locks.classid IS NOT DISTINCT FROM blocked_locks.classid
254
AND blocking_locks.objid IS NOT DISTINCT FROM blocked_locks.objid
255
AND blocking_locks.objsubid IS NOT DISTINCT FROM blocked_locks.objsubid
256
AND blocking_locks.pid OPERATOR(pg_catalog.<>) blocked_locks.pid
257
JOIN pg_catalog.pg_stat_activity blocking_activity ON blocking_activity.pid OPERATOR(pg_catalog.=) blocking_locks.pid
258
WHERE NOT blocked_locks.granted
259
metrics:
260
- total:
261
usage: "GAUGE"
262
description: "Total number of backends that are currently waiting on other queries"
263
264
pg_database:
265
query: |
266
SELECT datname
267
, pg_catalog.pg_database_size(datname) AS size_bytes
268
, pg_catalog.age(datfrozenxid) AS xid_age
269
, pg_catalog.mxid_age(datminmxid) AS mxid_age
270
FROM pg_catalog.pg_database
271
WHERE datallowconn
272
metrics:
273
- datname:
274
usage: "LABEL"
275
description: "Name of the database"
276
- size_bytes:
277
usage: "GAUGE"
278
description: "Disk space used by the database"
279
- xid_age:
280
usage: "GAUGE"
281
description: "Number of transactions from the frozen XID to the current one"
282
- mxid_age:
283
usage: "GAUGE"
284
description: "Number of multiple transactions (Multixact) from the frozen XID to the current one"
285
286
pg_postmaster:
287
query: |
288
SELECT EXTRACT(EPOCH FROM pg_postmaster_start_time) AS start_time
289
FROM pg_catalog.pg_postmaster_start_time()
290
metrics:
291
- start_time:
292
usage: "GAUGE"
293
description: "Time at which postgres started (based on epoch)"
294
295
pg_replication:
296
query: |
297
SELECT CASE WHEN (
298
NOT pg_catalog.pg_is_in_recovery()
299
OR pg_catalog.pg_last_wal_receive_lsn() OPERATOR(pg_catalog.=) pg_catalog.pg_last_wal_replay_lsn())
300
THEN 0
301
ELSE GREATEST (0,
302
EXTRACT(EPOCH FROM (pg_catalog.now() OPERATOR(pg_catalog.-) pg_catalog.pg_last_xact_replay_timestamp())))
303
END AS lag,
304
pg_catalog.pg_is_in_recovery() AS in_recovery,
305
EXISTS (TABLE pg_catalog.pg_stat_wal_receiver) AS is_wal_receiver_up,
306
(SELECT pg_catalog.count(*) FROM pg_catalog.pg_stat_replication) AS streaming_replicas
307
metrics:
308
- lag:
309
usage: "GAUGE"
310
description: "Replication lag behind primary in seconds"
311
- in_recovery:
312
usage: "GAUGE"
313
description: "Whether the instance is in recovery"
314
- is_wal_receiver_up:
315
usage: "GAUGE"
316
description: "Whether the instance wal_receiver is up"
317
- streaming_replicas:
318
usage: "GAUGE"
319
description: "Number of streaming replicas connected to the instance"
320
321
pg_replication_slots:
322
query: |
323
SELECT slot_name,
324
slot_type,
325
database,
326
active,
327
(CASE pg_catalog.pg_is_in_recovery()
328
WHEN TRUE THEN pg_catalog.pg_wal_lsn_diff(pg_catalog.pg_last_wal_receive_lsn(), restart_lsn)
329
ELSE pg_catalog.pg_wal_lsn_diff(pg_catalog.pg_current_wal_lsn(), restart_lsn)
330
END) as pg_wal_lsn_diff
331
FROM pg_catalog.pg_replication_slots
332
WHERE NOT temporary
333
metrics:
334
- slot_name:
335
usage: "LABEL"
336
description: "Name of the replication slot"
337
- slot_type:
338
usage: "LABEL"
339
description: "Type of the replication slot"
340
- database:
341
usage: "LABEL"
342
description: "Name of the database"
343
- active:
344
usage: "GAUGE"
345
description: "Flag indicating whether the slot is active"
346
- pg_wal_lsn_diff:
347
usage: "GAUGE"
348
description: "Replication lag in bytes"
349
350
pg_stat_archiver:
351
query: |
352
SELECT archived_count
353
, failed_count
354
, COALESCE(EXTRACT(EPOCH FROM (pg_catalog.now() OPERATOR(pg_catalog.-) last_archived_time)), -1) AS seconds_since_last_archival
355
, COALESCE(EXTRACT(EPOCH FROM (pg_catalog.now() OPERATOR(pg_catalog.-) last_failed_time)), -1) AS seconds_since_last_failure
356
, COALESCE(EXTRACT(EPOCH FROM last_archived_time), -1) AS last_archived_time
357
, COALESCE(EXTRACT(EPOCH FROM last_failed_time), -1) AS last_failed_time
358
, COALESCE(CAST(CAST('x' OPERATOR(pg_catalog.||) pg_catalog.right(pg_catalog.split_part(last_archived_wal, '.', 1), 16) AS pg_catalog.bit(64)) AS pg_catalog.int8), -1) AS last_archived_wal_start_lsn
359
, COALESCE(CAST(CAST('x' OPERATOR(pg_catalog.||) pg_catalog.right(pg_catalog.split_part(last_failed_wal, '.', 1), 16) AS pg_catalog.bit(64)) AS pg_catalog.int8), -1) AS last_failed_wal_start_lsn
360
, EXTRACT(EPOCH FROM stats_reset) AS stats_reset_time
361
FROM pg_catalog.pg_stat_archiver
362
predicate_query: |
363
SELECT NOT pg_catalog.pg_is_in_recovery()
364
OR pg_catalog.current_setting('archive_mode') OPERATOR(pg_catalog.=) 'always'
365
metrics:
366
- archived_count:
367
usage: "COUNTER"
368
description: "Number of WAL files that have been successfully archived"
369
- failed_count:
370
usage: "COUNTER"
371
description: "Number of failed attempts for archiving WAL files"
372
- seconds_since_last_archival:
373
usage: "GAUGE"
374
description: "Seconds since the last successful archival operation"
375
- seconds_since_last_failure:
376
usage: "GAUGE"
377
description: "Seconds since the last failed archival operation"
378
- last_archived_time:
379
usage: "GAUGE"
380
description: "Epoch of the last time WAL archiving succeeded"
381
- last_failed_time:
382
usage: "GAUGE"
383
description: "Epoch of the last time WAL archiving failed"
384
- last_archived_wal_start_lsn:
385
usage: "GAUGE"
386
description: "Archived WAL start LSN"
387
- last_failed_wal_start_lsn:
388
usage: "GAUGE"
389
description: "Last failed WAL LSN"
390
- stats_reset_time:
391
usage: "GAUGE"
392
description: "Time at which these statistics were last reset"
393
394
pg_stat_bgwriter:
395
runonserver: "<17.0.0"
396
query: |
397
SELECT checkpoints_timed
398
, checkpoints_req
399
, checkpoint_write_time
400
, checkpoint_sync_time
401
, buffers_checkpoint
402
, buffers_clean
403
, maxwritten_clean
404
, buffers_backend
405
, buffers_backend_fsync
406
, buffers_alloc
407
FROM pg_catalog.pg_stat_bgwriter
408
metrics:
409
- checkpoints_timed:
410
usage: "COUNTER"
411
description: "Number of scheduled checkpoints that have been performed"
412
- checkpoints_req:
413
usage: "COUNTER"
414
description: "Number of requested checkpoints that have been performed"
415
- checkpoint_write_time:
416
usage: "COUNTER"
417
description: "Total amount of time that has been spent in the portion of checkpoint processing where files are written to disk, in milliseconds"
418
- checkpoint_sync_time:
419
usage: "COUNTER"
420
description: "Total amount of time that has been spent in the portion of checkpoint processing where files are synchronized to disk, in milliseconds"
421
- buffers_checkpoint:
422
usage: "COUNTER"
423
description: "Number of buffers written during checkpoints"
424
- buffers_clean:
425
usage: "COUNTER"
426
description: "Number of buffers written by the background writer"
427
- maxwritten_clean:
428
usage: "COUNTER"
429
description: "Number of times the background writer stopped a cleaning scan because it had written too many buffers"
430
- buffers_backend:
431
usage: "COUNTER"
432
description: "Number of buffers written directly by a backend"
433
- buffers_backend_fsync:
434
usage: "COUNTER"
435
description: "Number of times a backend had to execute its own fsync call (normally the background writer handles those even when the backend does its own write)"
436
- buffers_alloc:
437
usage: "COUNTER"
438
description: "Number of buffers allocated"
439
440
pg_stat_bgwriter_17:
441
runonserver: ">=17.0.0"
442
name: pg_stat_bgwriter
443
query: |
444
SELECT buffers_clean
445
, maxwritten_clean
446
, buffers_alloc
447
, EXTRACT(EPOCH FROM stats_reset) AS stats_reset_time
448
FROM pg_catalog.pg_stat_bgwriter
449
metrics:
450
- buffers_clean:
451
usage: "COUNTER"
452
description: "Number of buffers written by the background writer"
453
- maxwritten_clean:
454
usage: "COUNTER"
455
description: "Number of times the background writer stopped a cleaning scan because it had written too many buffers"
456
- buffers_alloc:
457
usage: "COUNTER"
458
description: "Number of buffers allocated"
459
- stats_reset_time:
460
usage: "GAUGE"
461
description: "Time at which these statistics were last reset"
462
463
pg_stat_checkpointer:
464
runonserver: ">=17.0.0"
465
query: |
466
SELECT num_timed AS checkpoints_timed
467
, num_requested AS checkpoints_req
468
, restartpoints_timed
469
, restartpoints_req
470
, restartpoints_done
471
, write_time
472
, sync_time
473
, buffers_written
474
, EXTRACT(EPOCH FROM stats_reset) AS stats_reset_time
475
FROM pg_catalog.pg_stat_checkpointer
476
metrics:
477
- checkpoints_timed:
478
usage: "COUNTER"
479
description: "Number of scheduled checkpoints that have been performed"
480
- checkpoints_req:
481
usage: "COUNTER"
482
description: "Number of requested checkpoints that have been performed"
483
- restartpoints_timed:
484
usage: "COUNTER"
485
description: "Number of scheduled restartpoints due to timeout or after a failed attempt to perform it"
486
- restartpoints_req:
487
usage: "COUNTER"
488
description: "Number of requested restartpoints that have been performed"
489
- restartpoints_done:
490
usage: "COUNTER"
491
description: "Number of restartpoints that have been performed"
492
- write_time:
493
usage: "COUNTER"
494
description: "Total amount of time that has been spent in the portion of processing checkpoints and restartpoints where files are written to disk, in milliseconds"
495
- sync_time:
496
usage: "COUNTER"
497
description: "Total amount of time that has been spent in the portion of processing checkpoints and restartpoints where files are synchronized to disk, in milliseconds"
498
- buffers_written:
499
usage: "COUNTER"
500
description: "Number of buffers written during checkpoints and restartpoints"
501
- stats_reset_time:
502
usage: "GAUGE"
503
description: "Time at which these statistics were last reset"
504
505
pg_stat_database:
506
query: |
507
SELECT datname
508
, xact_commit
509
, xact_rollback
510
, blks_read
511
, blks_hit
512
, tup_returned
513
, tup_fetched
514
, tup_inserted
515
, tup_updated
516
, tup_deleted
517
, conflicts
518
, temp_files
519
, temp_bytes
520
, deadlocks
521
, blk_read_time
522
, blk_write_time
523
FROM pg_catalog.pg_stat_database
524
metrics:
525
- datname:
526
usage: "LABEL"
527
description: "Name of this database"
528
- xact_commit:
529
usage: "COUNTER"
530
description: "Number of transactions in this database that have been committed"
531
- xact_rollback:
532
usage: "COUNTER"
533
description: "Number of transactions in this database that have been rolled back"
534
- blks_read:
535
usage: "COUNTER"
536
description: "Number of disk blocks read in this database"
537
- blks_hit:
538
usage: "COUNTER"
539
description: "Number of times disk blocks were found already in the buffer cache, so that a read was not necessary (this only includes hits in the PostgreSQL buffer cache, not the operating system's file system cache)"
540
- tup_returned:
541
usage: "COUNTER"
542
description: "Number of rows returned by queries in this database"
543
- tup_fetched:
544
usage: "COUNTER"
545
description: "Number of rows fetched by queries in this database"
546
- tup_inserted:
547
usage: "COUNTER"
548
description: "Number of rows inserted by queries in this database"
549
- tup_updated:
550
usage: "COUNTER"
551
description: "Number of rows updated by queries in this database"
552
- tup_deleted:
553
usage: "COUNTER"
554
description: "Number of rows deleted by queries in this database"
555
- conflicts:
556
usage: "COUNTER"
557
description: "Number of queries canceled due to conflicts with recovery in this database"
558
- temp_files:
559
usage: "COUNTER"
560
description: "Number of temporary files created by queries in this database"
561
- temp_bytes:
562
usage: "COUNTER"
563
description: "Total amount of data written to temporary files by queries in this database"
564
- deadlocks:
565
usage: "COUNTER"
566
description: "Number of deadlocks detected in this database"
567
- blk_read_time:
568
usage: "COUNTER"
569
description: "Time spent reading data file blocks by backends in this database, in milliseconds"
570
- blk_write_time:
571
usage: "COUNTER"
572
description: "Time spent writing data file blocks by backends in this database, in milliseconds"
573
574
pg_stat_replication:
575
primary: true
576
query: |
577
SELECT usename
578
, COALESCE(application_name, '') AS application_name
579
, COALESCE(client_addr::text, '') AS client_addr
580
, COALESCE(client_port::text, '') AS client_port
581
, EXTRACT(EPOCH FROM backend_start) AS backend_start
582
, COALESCE(pg_catalog.age(backend_xmin), 0) AS backend_xmin_age
583
, pg_catalog.pg_wal_lsn_diff(pg_catalog.pg_current_wal_lsn(), sent_lsn) AS sent_diff_bytes
584
, pg_catalog.pg_wal_lsn_diff(pg_catalog.pg_current_wal_lsn(), write_lsn) AS write_diff_bytes
585
, pg_catalog.pg_wal_lsn_diff(pg_catalog.pg_current_wal_lsn(), flush_lsn) AS flush_diff_bytes
586
, COALESCE(pg_catalog.pg_wal_lsn_diff(pg_catalog.pg_current_wal_lsn(), replay_lsn),0) AS replay_diff_bytes
587
, COALESCE((EXTRACT(EPOCH FROM write_lag)),0)::float AS write_lag_seconds
588
, COALESCE((EXTRACT(EPOCH FROM flush_lag)),0)::float AS flush_lag_seconds
589
, COALESCE((EXTRACT(EPOCH FROM replay_lag)),0)::float AS replay_lag_seconds
590
FROM pg_catalog.pg_stat_replication
591
metrics:
592
- usename:
593
usage: "LABEL"
594
description: "Name of the replication user"
595
- application_name:
596
usage: "LABEL"
597
description: "Name of the application"
598
- client_addr:
599
usage: "LABEL"
600
description: "Client IP address"
601
- client_port:
602
usage: "LABEL"
603
description: "Client TCP port"
604
- backend_start:
605
usage: "COUNTER"
606
description: "Time when this process was started"
607
- backend_xmin_age:
608
usage: "COUNTER"
609
description: "The age of this standby's xmin horizon"
610
- sent_diff_bytes:
611
usage: "GAUGE"
612
description: "Difference in bytes from the last write-ahead log location sent on this connection"
613
- write_diff_bytes:
614
usage: "GAUGE"
615
description: "Difference in bytes from the last write-ahead log location written to disk by this standby server"
616
- flush_diff_bytes:
617
usage: "GAUGE"
618
description: "Difference in bytes from the last write-ahead log location flushed to disk by this standby server"
619
- replay_diff_bytes:
620
usage: "GAUGE"
621
description: "Difference in bytes from the last write-ahead log location replayed into the database on this standby server"
622
- write_lag_seconds:
623
usage: "GAUGE"
624
description: "Time elapsed between flushing recent WAL locally and receiving notification that this standby server has written it"
625
- flush_lag_seconds:
626
usage: "GAUGE"
627
description: "Time elapsed between flushing recent WAL locally and receiving notification that this standby server has written and flushed it"
628
- replay_lag_seconds:
629
usage: "GAUGE"
630
description: "Time elapsed between flushing recent WAL locally and receiving notification that this standby server has written, flushed and applied it"
631
632
pg_settings:
633
query: |
634
SELECT name,
635
CASE setting WHEN 'on' THEN '1' WHEN 'off' THEN '0' ELSE setting END AS setting
636
FROM pg_catalog.pg_settings
637
WHERE vartype IN ('integer', 'real', 'bool')
638
ORDER BY 1
639
metrics:
640
- name:
641
usage: "LABEL"
642
description: "Name of the setting"
643
- setting:
644
usage: "GAUGE"
645
description: "Setting value"
646
647
pg_extensions:
648
query: |
649
SELECT
650
pg_catalog.current_database() as datname,
651
name as extname,
652
default_version,
653
installed_version,
654
CASE
655
WHEN default_version OPERATOR(pg_catalog.=) installed_version THEN 0
656
ELSE 1
657
END AS update_available
658
FROM pg_catalog.pg_available_extensions
659
WHERE installed_version IS NOT NULL
660
metrics:
661
- datname:
662
usage: "LABEL"
663
description: "Name of the database"
664
- extname:
665
usage: "LABEL"
666
description: "Extension name"
667
- default_version:
668
usage: "LABEL"
669
description: "Default version"
670
- installed_version:
671
usage: "LABEL"
672
description: "Installed version"
673
- update_available:
674
usage: "GAUGE"
675
description: "An update is available"
676
target_databases:
677
- '*'
678

The trusted source for open source

Talk to an expert
PrivacyTerms

Product

Chainguard ContainersChainguard LibrariesChainguard VMsChainguard OS PackagesChainguard ActionsChainguard Agent SkillsIntegrationsPricing
© 2026 Chainguard, Inc. All Rights Reserved.
Chainguard® and the Chainguard logo are registered trademarks of Chainguard, Inc. in the United States and/or other countries.
The other respective trademarks mentioned on this page are owned by the respective companies and use of them does not imply any affiliation or endorsement.