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 versions
Default values
Chart metadata
Images

Tag:

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-fips
26
pullPolicy: IfNotPresent
27
# -- Overrides the image tag whose default is the chart appVersion.
28
tag: latest@sha256:4f6b4dc7103b6090e06e03140fbdb3e9144f41ba005014a6212a3c470054fa89
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
# -- Nodeselector for the operator to be installed.
156
nodeSelector: {}
157
# -- Topology Spread Constraints for the operator to be installed.
158
topologySpreadConstraints: []
159
# -- Tolerations for the operator to be installed.
160
tolerations: []
161
# -- Affinity for the operator to be installed.
162
affinity: {}
163
monitoring:
164
# -- Specifies whether the monitoring should be enabled. Requires Prometheus Operator CRDs.
165
podMonitorEnabled: false
166
# -- Metrics relabel configurations to apply to samples before ingestion.
167
podMonitorMetricRelabelings: []
168
# -- Relabel configurations to apply to samples before scraping.
169
podMonitorRelabelings: []
170
# -- Additional labels for the podMonitor
171
podMonitorAdditionalLabels: {}
172
grafanaDashboard:
173
create: false
174
# -- Allows overriding the namespace where the ConfigMap will be created, defaulting to the same one as the Release.
175
namespace: ""
176
# -- The name of the ConfigMap containing the dashboard.
177
configMapName: "cnpg-grafana-dashboard"
178
# -- Label that ConfigMaps should have to be loaded as dashboards. DEPRECATED: Use labels instead.
179
sidecarLabel: "grafana_dashboard"
180
# -- Label value that ConfigMaps should have to be loaded as dashboards. DEPRECATED: Use labels instead.
181
sidecarLabelValue: "1"
182
# -- Labels that ConfigMaps should have to get configured in Grafana.
183
labels: {}
184
# -- Annotations that ConfigMaps can have to get configured in Grafana.
185
annotations: {}
186
# Default monitoring queries
187
monitoringQueriesConfigMap:
188
# -- The name of the default monitoring configmap.
189
name: cnpg-default-monitoring
190
# -- A string representation of a YAML defining monitoring queries.
191
queries: |
192
backends:
193
query: |
194
SELECT sa.datname
195
, sa.usename
196
, sa.application_name
197
, states.state
198
, COALESCE(sa.count, 0) AS total
199
, COALESCE(sa.max_tx_secs, 0) AS max_tx_duration_seconds
200
FROM ( VALUES ('active')
201
, ('idle')
202
, ('idle in transaction')
203
, ('idle in transaction (aborted)')
204
, ('fastpath function call')
205
, ('disabled')
206
) AS states(state)
207
LEFT JOIN (
208
SELECT datname
209
, state
210
, usename
211
, COALESCE(application_name, '') AS application_name
212
, pg_catalog.count(*)
213
, COALESCE(EXTRACT (EPOCH FROM (pg_catalog.max(pg_catalog.now() OPERATOR(pg_catalog.-) xact_start))), 0) AS max_tx_secs
214
FROM pg_catalog.pg_stat_activity
215
GROUP BY datname, state, usename, application_name
216
) sa ON states.state OPERATOR(pg_catalog.=) sa.state
217
WHERE sa.usename IS NOT NULL
218
metrics:
219
- datname:
220
usage: "LABEL"
221
description: "Name of the database"
222
- usename:
223
usage: "LABEL"
224
description: "Name of the user"
225
- application_name:
226
usage: "LABEL"
227
description: "Name of the application"
228
- state:
229
usage: "LABEL"
230
description: "State of the backend"
231
- total:
232
usage: "GAUGE"
233
description: "Number of backends"
234
- max_tx_duration_seconds:
235
usage: "GAUGE"
236
description: "Maximum duration of a transaction in seconds"
237
238
backends_waiting:
239
query: |
240
SELECT pg_catalog.count(*) AS total
241
FROM pg_catalog.pg_locks blocked_locks
242
JOIN pg_catalog.pg_locks blocking_locks
243
ON blocking_locks.locktype OPERATOR(pg_catalog.=) blocked_locks.locktype
244
AND blocking_locks.database IS NOT DISTINCT FROM blocked_locks.database
245
AND blocking_locks.relation IS NOT DISTINCT FROM blocked_locks.relation
246
AND blocking_locks.page IS NOT DISTINCT FROM blocked_locks.page
247
AND blocking_locks.tuple IS NOT DISTINCT FROM blocked_locks.tuple
248
AND blocking_locks.virtualxid IS NOT DISTINCT FROM blocked_locks.virtualxid
249
AND blocking_locks.transactionid IS NOT DISTINCT FROM blocked_locks.transactionid
250
AND blocking_locks.classid IS NOT DISTINCT FROM blocked_locks.classid
251
AND blocking_locks.objid IS NOT DISTINCT FROM blocked_locks.objid
252
AND blocking_locks.objsubid IS NOT DISTINCT FROM blocked_locks.objsubid
253
AND blocking_locks.pid OPERATOR(pg_catalog.<>) blocked_locks.pid
254
JOIN pg_catalog.pg_stat_activity blocking_activity ON blocking_activity.pid OPERATOR(pg_catalog.=) blocking_locks.pid
255
WHERE NOT blocked_locks.granted
256
metrics:
257
- total:
258
usage: "GAUGE"
259
description: "Total number of backends that are currently waiting on other queries"
260
261
pg_database:
262
query: |
263
SELECT datname
264
, pg_catalog.pg_database_size(datname) AS size_bytes
265
, pg_catalog.age(datfrozenxid) AS xid_age
266
, pg_catalog.mxid_age(datminmxid) AS mxid_age
267
FROM pg_catalog.pg_database
268
WHERE datallowconn
269
metrics:
270
- datname:
271
usage: "LABEL"
272
description: "Name of the database"
273
- size_bytes:
274
usage: "GAUGE"
275
description: "Disk space used by the database"
276
- xid_age:
277
usage: "GAUGE"
278
description: "Number of transactions from the frozen XID to the current one"
279
- mxid_age:
280
usage: "GAUGE"
281
description: "Number of multiple transactions (Multixact) from the frozen XID to the current one"
282
283
pg_postmaster:
284
query: |
285
SELECT EXTRACT(EPOCH FROM pg_postmaster_start_time) AS start_time
286
FROM pg_catalog.pg_postmaster_start_time()
287
metrics:
288
- start_time:
289
usage: "GAUGE"
290
description: "Time at which postgres started (based on epoch)"
291
292
pg_replication:
293
query: |
294
SELECT CASE WHEN (
295
NOT pg_catalog.pg_is_in_recovery()
296
OR pg_catalog.pg_last_wal_receive_lsn() OPERATOR(pg_catalog.=) pg_catalog.pg_last_wal_replay_lsn())
297
THEN 0
298
ELSE GREATEST (0,
299
EXTRACT(EPOCH FROM (pg_catalog.now() OPERATOR(pg_catalog.-) pg_catalog.pg_last_xact_replay_timestamp())))
300
END AS lag,
301
pg_catalog.pg_is_in_recovery() AS in_recovery,
302
EXISTS (TABLE pg_catalog.pg_stat_wal_receiver) AS is_wal_receiver_up,
303
(SELECT pg_catalog.count(*) FROM pg_catalog.pg_stat_replication) AS streaming_replicas
304
metrics:
305
- lag:
306
usage: "GAUGE"
307
description: "Replication lag behind primary in seconds"
308
- in_recovery:
309
usage: "GAUGE"
310
description: "Whether the instance is in recovery"
311
- is_wal_receiver_up:
312
usage: "GAUGE"
313
description: "Whether the instance wal_receiver is up"
314
- streaming_replicas:
315
usage: "GAUGE"
316
description: "Number of streaming replicas connected to the instance"
317
318
pg_replication_slots:
319
query: |
320
SELECT slot_name,
321
slot_type,
322
database,
323
active,
324
(CASE pg_catalog.pg_is_in_recovery()
325
WHEN TRUE THEN pg_catalog.pg_wal_lsn_diff(pg_catalog.pg_last_wal_receive_lsn(), restart_lsn)
326
ELSE pg_catalog.pg_wal_lsn_diff(pg_catalog.pg_current_wal_lsn(), restart_lsn)
327
END) as pg_wal_lsn_diff
328
FROM pg_catalog.pg_replication_slots
329
WHERE NOT temporary
330
metrics:
331
- slot_name:
332
usage: "LABEL"
333
description: "Name of the replication slot"
334
- slot_type:
335
usage: "LABEL"
336
description: "Type of the replication slot"
337
- database:
338
usage: "LABEL"
339
description: "Name of the database"
340
- active:
341
usage: "GAUGE"
342
description: "Flag indicating whether the slot is active"
343
- pg_wal_lsn_diff:
344
usage: "GAUGE"
345
description: "Replication lag in bytes"
346
347
pg_stat_archiver:
348
query: |
349
SELECT archived_count
350
, failed_count
351
, COALESCE(EXTRACT(EPOCH FROM (pg_catalog.now() OPERATOR(pg_catalog.-) last_archived_time)), -1) AS seconds_since_last_archival
352
, COALESCE(EXTRACT(EPOCH FROM (pg_catalog.now() OPERATOR(pg_catalog.-) last_failed_time)), -1) AS seconds_since_last_failure
353
, COALESCE(EXTRACT(EPOCH FROM last_archived_time), -1) AS last_archived_time
354
, COALESCE(EXTRACT(EPOCH FROM last_failed_time), -1) AS last_failed_time
355
, 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
356
, 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
357
, EXTRACT(EPOCH FROM stats_reset) AS stats_reset_time
358
FROM pg_catalog.pg_stat_archiver
359
predicate_query: |
360
SELECT NOT pg_catalog.pg_is_in_recovery()
361
OR pg_catalog.current_setting('archive_mode') OPERATOR(pg_catalog.=) 'always'
362
metrics:
363
- archived_count:
364
usage: "COUNTER"
365
description: "Number of WAL files that have been successfully archived"
366
- failed_count:
367
usage: "COUNTER"
368
description: "Number of failed attempts for archiving WAL files"
369
- seconds_since_last_archival:
370
usage: "GAUGE"
371
description: "Seconds since the last successful archival operation"
372
- seconds_since_last_failure:
373
usage: "GAUGE"
374
description: "Seconds since the last failed archival operation"
375
- last_archived_time:
376
usage: "GAUGE"
377
description: "Epoch of the last time WAL archiving succeeded"
378
- last_failed_time:
379
usage: "GAUGE"
380
description: "Epoch of the last time WAL archiving failed"
381
- last_archived_wal_start_lsn:
382
usage: "GAUGE"
383
description: "Archived WAL start LSN"
384
- last_failed_wal_start_lsn:
385
usage: "GAUGE"
386
description: "Last failed WAL LSN"
387
- stats_reset_time:
388
usage: "GAUGE"
389
description: "Time at which these statistics were last reset"
390
391
pg_stat_bgwriter:
392
runonserver: "<17.0.0"
393
query: |
394
SELECT checkpoints_timed
395
, checkpoints_req
396
, checkpoint_write_time
397
, checkpoint_sync_time
398
, buffers_checkpoint
399
, buffers_clean
400
, maxwritten_clean
401
, buffers_backend
402
, buffers_backend_fsync
403
, buffers_alloc
404
FROM pg_catalog.pg_stat_bgwriter
405
metrics:
406
- checkpoints_timed:
407
usage: "COUNTER"
408
description: "Number of scheduled checkpoints that have been performed"
409
- checkpoints_req:
410
usage: "COUNTER"
411
description: "Number of requested checkpoints that have been performed"
412
- checkpoint_write_time:
413
usage: "COUNTER"
414
description: "Total amount of time that has been spent in the portion of checkpoint processing where files are written to disk, in milliseconds"
415
- checkpoint_sync_time:
416
usage: "COUNTER"
417
description: "Total amount of time that has been spent in the portion of checkpoint processing where files are synchronized to disk, in milliseconds"
418
- buffers_checkpoint:
419
usage: "COUNTER"
420
description: "Number of buffers written during checkpoints"
421
- buffers_clean:
422
usage: "COUNTER"
423
description: "Number of buffers written by the background writer"
424
- maxwritten_clean:
425
usage: "COUNTER"
426
description: "Number of times the background writer stopped a cleaning scan because it had written too many buffers"
427
- buffers_backend:
428
usage: "COUNTER"
429
description: "Number of buffers written directly by a backend"
430
- buffers_backend_fsync:
431
usage: "COUNTER"
432
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)"
433
- buffers_alloc:
434
usage: "COUNTER"
435
description: "Number of buffers allocated"
436
437
pg_stat_bgwriter_17:
438
runonserver: ">=17.0.0"
439
name: pg_stat_bgwriter
440
query: |
441
SELECT buffers_clean
442
, maxwritten_clean
443
, buffers_alloc
444
, EXTRACT(EPOCH FROM stats_reset) AS stats_reset_time
445
FROM pg_catalog.pg_stat_bgwriter
446
metrics:
447
- buffers_clean:
448
usage: "COUNTER"
449
description: "Number of buffers written by the background writer"
450
- maxwritten_clean:
451
usage: "COUNTER"
452
description: "Number of times the background writer stopped a cleaning scan because it had written too many buffers"
453
- buffers_alloc:
454
usage: "COUNTER"
455
description: "Number of buffers allocated"
456
- stats_reset_time:
457
usage: "GAUGE"
458
description: "Time at which these statistics were last reset"
459
460
pg_stat_checkpointer:
461
runonserver: ">=17.0.0"
462
query: |
463
SELECT num_timed AS checkpoints_timed
464
, num_requested AS checkpoints_req
465
, restartpoints_timed
466
, restartpoints_req
467
, restartpoints_done
468
, write_time
469
, sync_time
470
, buffers_written
471
, EXTRACT(EPOCH FROM stats_reset) AS stats_reset_time
472
FROM pg_catalog.pg_stat_checkpointer
473
metrics:
474
- checkpoints_timed:
475
usage: "COUNTER"
476
description: "Number of scheduled checkpoints that have been performed"
477
- checkpoints_req:
478
usage: "COUNTER"
479
description: "Number of requested checkpoints that have been performed"
480
- restartpoints_timed:
481
usage: "COUNTER"
482
description: "Number of scheduled restartpoints due to timeout or after a failed attempt to perform it"
483
- restartpoints_req:
484
usage: "COUNTER"
485
description: "Number of requested restartpoints that have been performed"
486
- restartpoints_done:
487
usage: "COUNTER"
488
description: "Number of restartpoints that have been performed"
489
- write_time:
490
usage: "COUNTER"
491
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"
492
- sync_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 synchronized to disk, in milliseconds"
495
- buffers_written:
496
usage: "COUNTER"
497
description: "Number of buffers written during checkpoints and restartpoints"
498
- stats_reset_time:
499
usage: "GAUGE"
500
description: "Time at which these statistics were last reset"
501
502
pg_stat_database:
503
query: |
504
SELECT datname
505
, xact_commit
506
, xact_rollback
507
, blks_read
508
, blks_hit
509
, tup_returned
510
, tup_fetched
511
, tup_inserted
512
, tup_updated
513
, tup_deleted
514
, conflicts
515
, temp_files
516
, temp_bytes
517
, deadlocks
518
, blk_read_time
519
, blk_write_time
520
FROM pg_catalog.pg_stat_database
521
metrics:
522
- datname:
523
usage: "LABEL"
524
description: "Name of this database"
525
- xact_commit:
526
usage: "COUNTER"
527
description: "Number of transactions in this database that have been committed"
528
- xact_rollback:
529
usage: "COUNTER"
530
description: "Number of transactions in this database that have been rolled back"
531
- blks_read:
532
usage: "COUNTER"
533
description: "Number of disk blocks read in this database"
534
- blks_hit:
535
usage: "COUNTER"
536
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)"
537
- tup_returned:
538
usage: "COUNTER"
539
description: "Number of rows returned by queries in this database"
540
- tup_fetched:
541
usage: "COUNTER"
542
description: "Number of rows fetched by queries in this database"
543
- tup_inserted:
544
usage: "COUNTER"
545
description: "Number of rows inserted by queries in this database"
546
- tup_updated:
547
usage: "COUNTER"
548
description: "Number of rows updated by queries in this database"
549
- tup_deleted:
550
usage: "COUNTER"
551
description: "Number of rows deleted by queries in this database"
552
- conflicts:
553
usage: "COUNTER"
554
description: "Number of queries canceled due to conflicts with recovery in this database"
555
- temp_files:
556
usage: "COUNTER"
557
description: "Number of temporary files created by queries in this database"
558
- temp_bytes:
559
usage: "COUNTER"
560
description: "Total amount of data written to temporary files by queries in this database"
561
- deadlocks:
562
usage: "COUNTER"
563
description: "Number of deadlocks detected in this database"
564
- blk_read_time:
565
usage: "COUNTER"
566
description: "Time spent reading data file blocks by backends in this database, in milliseconds"
567
- blk_write_time:
568
usage: "COUNTER"
569
description: "Time spent writing data file blocks by backends in this database, in milliseconds"
570
571
pg_stat_replication:
572
primary: true
573
query: |
574
SELECT usename
575
, COALESCE(application_name, '') AS application_name
576
, COALESCE(client_addr::text, '') AS client_addr
577
, COALESCE(client_port::text, '') AS client_port
578
, EXTRACT(EPOCH FROM backend_start) AS backend_start
579
, COALESCE(pg_catalog.age(backend_xmin), 0) AS backend_xmin_age
580
, pg_catalog.pg_wal_lsn_diff(pg_catalog.pg_current_wal_lsn(), sent_lsn) AS sent_diff_bytes
581
, pg_catalog.pg_wal_lsn_diff(pg_catalog.pg_current_wal_lsn(), write_lsn) AS write_diff_bytes
582
, pg_catalog.pg_wal_lsn_diff(pg_catalog.pg_current_wal_lsn(), flush_lsn) AS flush_diff_bytes
583
, COALESCE(pg_catalog.pg_wal_lsn_diff(pg_catalog.pg_current_wal_lsn(), replay_lsn),0) AS replay_diff_bytes
584
, COALESCE((EXTRACT(EPOCH FROM write_lag)),0)::float AS write_lag_seconds
585
, COALESCE((EXTRACT(EPOCH FROM flush_lag)),0)::float AS flush_lag_seconds
586
, COALESCE((EXTRACT(EPOCH FROM replay_lag)),0)::float AS replay_lag_seconds
587
FROM pg_catalog.pg_stat_replication
588
metrics:
589
- usename:
590
usage: "LABEL"
591
description: "Name of the replication user"
592
- application_name:
593
usage: "LABEL"
594
description: "Name of the application"
595
- client_addr:
596
usage: "LABEL"
597
description: "Client IP address"
598
- client_port:
599
usage: "LABEL"
600
description: "Client TCP port"
601
- backend_start:
602
usage: "COUNTER"
603
description: "Time when this process was started"
604
- backend_xmin_age:
605
usage: "COUNTER"
606
description: "The age of this standby's xmin horizon"
607
- sent_diff_bytes:
608
usage: "GAUGE"
609
description: "Difference in bytes from the last write-ahead log location sent on this connection"
610
- write_diff_bytes:
611
usage: "GAUGE"
612
description: "Difference in bytes from the last write-ahead log location written to disk by this standby server"
613
- flush_diff_bytes:
614
usage: "GAUGE"
615
description: "Difference in bytes from the last write-ahead log location flushed to disk by this standby server"
616
- replay_diff_bytes:
617
usage: "GAUGE"
618
description: "Difference in bytes from the last write-ahead log location replayed into the database on this standby server"
619
- write_lag_seconds:
620
usage: "GAUGE"
621
description: "Time elapsed between flushing recent WAL locally and receiving notification that this standby server has written it"
622
- flush_lag_seconds:
623
usage: "GAUGE"
624
description: "Time elapsed between flushing recent WAL locally and receiving notification that this standby server has written and flushed it"
625
- replay_lag_seconds:
626
usage: "GAUGE"
627
description: "Time elapsed between flushing recent WAL locally and receiving notification that this standby server has written, flushed and applied it"
628
629
pg_settings:
630
query: |
631
SELECT name,
632
CASE setting WHEN 'on' THEN '1' WHEN 'off' THEN '0' ELSE setting END AS setting
633
FROM pg_catalog.pg_settings
634
WHERE vartype IN ('integer', 'real', 'bool')
635
ORDER BY 1
636
metrics:
637
- name:
638
usage: "LABEL"
639
description: "Name of the setting"
640
- setting:
641
usage: "GAUGE"
642
description: "Setting value"
643
644
pg_extensions:
645
query: |
646
SELECT
647
pg_catalog.current_database() as datname,
648
name as extname,
649
default_version,
650
installed_version,
651
CASE
652
WHEN default_version OPERATOR(pg_catalog.=) installed_version THEN 0
653
ELSE 1
654
END AS update_available
655
FROM pg_catalog.pg_available_extensions
656
WHERE installed_version IS NOT NULL
657
metrics:
658
- datname:
659
usage: "LABEL"
660
description: "Name of the database"
661
- extname:
662
usage: "LABEL"
663
description: "Extension name"
664
- default_version:
665
usage: "LABEL"
666
description: "Default version"
667
- installed_version:
668
usage: "LABEL"
669
description: "Installed version"
670
- update_available:
671
usage: "GAUGE"
672
description: "An update is available"
673
target_databases:
674
- '*'
675

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.