Skip to content

Commit 57f0ae2

Browse files
authored
Add per db metrics (#4183)
* Add per-db metrics to OTel This PR adds changes to allow per-db metrics in OTel: - change API for per-db metrics - add default metrics for per-db metrics based on pgmonitor 5.2.1 - remove unused metrics - add kuttl test
1 parent e274e01 commit 57f0ae2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+692
-325
lines changed

config/crd/bases/postgres-operator.crunchydata.com_pgadmins.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2120,6 +2120,13 @@ spec:
21202120
type: string
21212121
x-kubernetes-validations:
21222122
- rule: duration("0") <= self && self <= duration("60m")
2123+
databases:
2124+
description: |-
2125+
The databases to target with added custom queries.
2126+
Default behavior is to target `postgres`.
2127+
items:
2128+
type: string
2129+
type: array
21232130
name:
21242131
description: |-
21252132
The name of this batch of queries, which will be used in naming the OTel
@@ -2165,6 +2172,12 @@ spec:
21652172
type: string
21662173
type: array
21672174
type: object
2175+
perDBMetricTargets:
2176+
description: User defined databases to target for default
2177+
per-db metrics
2178+
items:
2179+
type: string
2180+
type: array
21682181
type: object
21692182
resources:
21702183
description: Resources holds the resource requirements for the

config/crd/bases/postgres-operator.crunchydata.com_postgresclusters.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11965,6 +11965,13 @@ spec:
1196511965
type: string
1196611966
x-kubernetes-validations:
1196711967
- rule: duration("0") <= self && self <= duration("60m")
11968+
databases:
11969+
description: |-
11970+
The databases to target with added custom queries.
11971+
Default behavior is to target `postgres`.
11972+
items:
11973+
type: string
11974+
type: array
1196811975
name:
1196911976
description: |-
1197011977
The name of this batch of queries, which will be used in naming the OTel
@@ -12010,6 +12017,12 @@ spec:
1201012017
type: string
1201112018
type: array
1201212019
type: object
12020+
perDBMetricTargets:
12021+
description: User defined databases to target for default
12022+
per-db metrics
12023+
items:
12024+
type: string
12025+
type: array
1201312026
type: object
1201412027
resources:
1201512028
description: Resources holds the resource requirements for the

internal/collector/generated/gte_pg16_slow_metrics.json

Lines changed: 0 additions & 1 deletion
This file was deleted.

internal/collector/generated/lt_pg16_slow_metrics.json

Lines changed: 0 additions & 1 deletion
This file was deleted.

internal/collector/generated/pgbackrest_metrics.json

Lines changed: 0 additions & 1 deletion
This file was deleted.

internal/collector/generated/postgres_5m_per_db_metrics.json

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)