Skip to content

Commit dddc7d4

Browse files
authored
fix: remove metric ccp_backrest_last_info_repo_total_size_bytes (#460)
1 parent f70ae4c commit dddc7d4

File tree

5 files changed

+6
-118
lines changed

5 files changed

+6
-118
lines changed

changelogs/fragments/459.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
minor_changes:
2+
- sql_exporter - Removed the metric `ccp_backrest_last_info_repo_total_size_bytes`. When block incremental backups are enabled, this metric is no longer available from pgBackRest.
3+
- postgres_exporter - Removed the metric `ccp_backrest_last_info_repo_total_size_bytes`.
4+
- grafana - Removed the `Last Backup Size (Total)` panel from the pgBackRest Grafana dashboard since it was backed by the removed metric.

grafana/postgres/PGBackrest.json

Lines changed: 2 additions & 101 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@
7575
"textMode": "auto",
7676
"wideLayout": true
7777
},
78-
"pluginVersion": "10.4.2",
78+
"pluginVersion": "10.4.15",
7979
"targets": [
8080
{
8181
"datasource": {
@@ -385,105 +385,6 @@
385385
"x": 0,
386386
"y": 11
387387
},
388-
"id": 8,
389-
"options": {
390-
"legend": {
391-
"calcs": [],
392-
"displayMode": "list",
393-
"placement": "right",
394-
"showLegend": true
395-
},
396-
"tooltip": {
397-
"mode": "multi",
398-
"sort": "none"
399-
}
400-
},
401-
"pluginVersion": "10.4.2",
402-
"targets": [
403-
{
404-
"datasource": {
405-
"type": "prometheus",
406-
"uid": "${ccp_datasource}"
407-
},
408-
"exemplar": true,
409-
"expr": "ccp_backrest_last_info_repo_total_size_bytes{stanza=\"[[backrest_stanza]]\", repo=\"[[backrest_repo]]\"} + on(job,instance) group_left() (ccp_is_in_recovery_status == 2)",
410-
"format": "time_series",
411-
"interval": "",
412-
"intervalFactor": 1,
413-
"legendFormat": "{{backup_type}}",
414-
"refId": "A"
415-
}
416-
],
417-
"title": "Last Backup Size (Total)",
418-
"type": "timeseries"
419-
},
420-
{
421-
"datasource": {
422-
"type": "prometheus",
423-
"uid": "${ccp_datasource}"
424-
},
425-
"fieldConfig": {
426-
"defaults": {
427-
"color": {
428-
"mode": "palette-classic"
429-
},
430-
"custom": {
431-
"axisBorderShow": false,
432-
"axisCenteredZero": false,
433-
"axisColorMode": "text",
434-
"axisLabel": "",
435-
"axisPlacement": "auto",
436-
"barAlignment": 0,
437-
"drawStyle": "line",
438-
"fillOpacity": 10,
439-
"gradientMode": "none",
440-
"hideFrom": {
441-
"legend": false,
442-
"tooltip": false,
443-
"viz": false
444-
},
445-
"insertNulls": false,
446-
"lineInterpolation": "linear",
447-
"lineWidth": 1,
448-
"pointSize": 5,
449-
"scaleDistribution": {
450-
"type": "linear"
451-
},
452-
"showPoints": "never",
453-
"spanNulls": false,
454-
"stacking": {
455-
"group": "A",
456-
"mode": "none"
457-
},
458-
"thresholdsStyle": {
459-
"mode": "off"
460-
}
461-
},
462-
"links": [],
463-
"mappings": [],
464-
"thresholds": {
465-
"mode": "absolute",
466-
"steps": [
467-
{
468-
"color": "green",
469-
"value": null
470-
},
471-
{
472-
"color": "red",
473-
"value": 80
474-
}
475-
]
476-
},
477-
"unit": "bytes"
478-
},
479-
"overrides": []
480-
},
481-
"gridPos": {
482-
"h": 8,
483-
"w": 12,
484-
"x": 12,
485-
"y": 11
486-
},
487388
"id": 9,
488389
"options": {
489390
"legend": {
@@ -622,6 +523,6 @@
622523
"timezone": "",
623524
"title": "pgBackRest",
624525
"uid": "QtHwNCrik",
625-
"version": 1,
526+
"version": 2,
626527
"weekStart": ""
627528
}

hugo/content/exporter/_index.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -450,8 +450,6 @@ Backup monitoring only covers pgBackRest at this time. These metrics only need t
450450

451451
* *ccp_backrest_last_info_repo_backup_size_bytes* - Actual size of only this individual backup in the pgbackrest repository
452452

453-
* *ccp_backrest_last_info_repo_total_size_bytes* - Total size of this backup in the pgbackrest repository, including all required previous backups and WAL
454-
455453
* *ccp_backrest_last_info_backup_error* - Count of errors tracked for this backup. Note this does not track incomplete backups, only errors encountered during the backup (checksum errors, file truncation, invalid headers, etc)
456454

457455
#### Per-Database Metrics

postgres_exporter/linux/queries_backrest.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ ccp_backrest_last_info:
2424
, a.backup_data->'database'->>'repo-key' AS repo
2525
, a.backup_data->>'type' AS backup_type
2626
, a.backup_data->'info'->'repository'->>'delta' AS repo_backup_size_bytes
27-
, a.backup_data->'info'->'repository'->>'size' AS repo_total_size_bytes
2827
, (a.backup_data->'timestamp'->>'stop')::bigint - (a.backup_data->'timestamp'->>'start')::bigint AS backup_runtime_seconds
2928
, CASE
3029
WHEN a.backup_data->>'error' = 'true' THEN 1
@@ -64,9 +63,6 @@ ccp_backrest_last_info:
6463
- repo_backup_size_bytes:
6564
usage: "GAUGE"
6665
description: "Actual size of only this individual backup in the pgbackrest repository"
67-
- repo_total_size_bytes:
68-
usage: "GAUGE"
69-
description: "Total size of this backup in the pgbackrest repository, including all required previous backups and WAL"
7066
- backup_runtime_seconds:
7167
usage: "GAUGE"
7268
description: "Total runtime in seconds of this backup"

sql_exporter/common/crunchy_backrest_collector.yml

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,6 @@ metrics:
2121
- repo
2222
- backup_type
2323
query_ref: ccp_backrest_last_info
24-
- metric_name: ccp_backrest_last_info_repo_total_size_bytes
25-
type: gauge
26-
help: "Total size of this backup in the pgbackrest repository, including all required previous backups and WAL"
27-
values: [repo_total_size_bytes]
28-
key_labels:
29-
- config_file
30-
- stanza
31-
- repo
32-
- backup_type
33-
query_ref: ccp_backrest_last_info
3424
- metric_name: ccp_backrest_last_info_backup_runtime_seconds
3525
type: gauge
3626
help: "Total runtime in seconds of this backup"
@@ -107,7 +97,6 @@ queries:
10797
, repo
10898
, backup_type
10999
, repo_backup_size_bytes
110-
, repo_total_size_bytes
111100
, backup_runtime_seconds
112101
, backup_error
113102
FROM pgmonitor_ext.ccp_backrest_last_info

0 commit comments

Comments
 (0)