Skip to content

Commit 6fbd94b

Browse files
committed
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 68cc334 commit 6fbd94b

File tree

42 files changed

+692
-325
lines changed

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
@@ -11962,6 +11962,13 @@ spec:
1196211962
type: string
1196311963
x-kubernetes-validations:
1196411964
- rule: duration("0") <= self && self <= duration("60m")
11965+
databases:
11966+
description: |-
11967+
The databases to target with added custom queries.
11968+
Default behavior is to target `postgres`.
11969+
items:
11970+
type: string
11971+
type: array
1196511972
name:
1196611973
description: |-
1196711974
The name of this batch of queries, which will be used in naming the OTel
@@ -12007,6 +12014,12 @@ spec:
1200712014
type: string
1200812015
type: array
1200912016
type: object
12017+
perDBMetricTargets:
12018+
description: User defined databases to target for default
12019+
per-db metrics
12020+
items:
12021+
type: string
12022+
type: array
1201012023
type: object
1201112024
resources:
1201212025
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)