-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enables deploying postgres-exporter, to collect postgres stats. This is done by setting the ENV varaible PSQL_EXPORT to true, if the value is not set PSQL_EXPORT is set to true by default. postgres-exporter is installed using helm chart prometheus-community/prometheus-postgres-exporter.
- Loading branch information
1 parent
cdf411d
commit d05cc19
Showing
6 changed files
with
574 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
ci-scripts/rhdh-setup/template/postgres-exporter/chart-values.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
podSecurityContext: | ||
runAsGroup: uid | ||
runAsUser: uid | ||
runAsNonRoot: true | ||
seccompProfile: | ||
type: RuntimeDefault | ||
securityContext: {} | ||
config: | ||
logLevel: 'debug' | ||
extraArgs: | ||
- --collector.long_running_transactions | ||
- --collector.process_idle | ||
- --collector.stat_activity_autovacuum | ||
- --collector.stat_user_tables | ||
- --collector.statio_user_indexes | ||
- --collector.statio_user_tables | ||
- --collector.postmaster | ||
- --collector.stat_statements | ||
- --auto-discover-databases | ||
datasource: | ||
host: 'rhdh-postgresql-primary' | ||
user: 'postgres' | ||
password: pg_password | ||
port: "5432" | ||
database: '' |
18 changes: 18 additions & 0 deletions
18
ci-scripts/rhdh-setup/template/postgres-exporter/service-monitor-template.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
apiVersion: monitoring.coreos.com/v1 | ||
kind: ServiceMonitor | ||
metadata: | ||
labels: | ||
release: pglabel | ||
name: prometheus-pglabel | ||
spec: | ||
endpoints: | ||
- interval: 30s | ||
port: http | ||
scheme: http | ||
path: /metrics | ||
namespaceSelector: | ||
matchNames: | ||
- pgnamespace | ||
selector: | ||
matchLabels: | ||
release: pglabel |
34 changes: 34 additions & 0 deletions
34
ci-scripts/rhdh-setup/template/postgres-exporter/values-template.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
podSecurityContext: | ||
runAsGroup: uid | ||
runAsUser: uid | ||
runAsNonRoot: true | ||
seccompProfile: | ||
type: RuntimeDefault | ||
securityContext: {} | ||
config: | ||
logLevel: 'debug' | ||
extraArgs: | ||
- --no-collector.database | ||
- --no-collector.database_wraparound | ||
- --no-collector.locks | ||
- --no-collector.long_running_transactions | ||
- --no-collector.postmaster | ||
- --no-collector.process_idle | ||
- --no-collector.replication | ||
- --no-collector.replication_slot | ||
- --no-collector.stat_activity_autovacuum | ||
- --no-collector.stat_bgwriter | ||
- --no-collector.stat_database | ||
- --no-collector.stat_statements | ||
- --no-collector.stat_wal_receiver | ||
- --no-collector.wal | ||
- --no-collector.xlog_location | ||
- --collector.stat_user_tables | ||
- --collector.statio_user_indexes | ||
- --collector.statio_user_tables | ||
datasource: | ||
host: 'rhdh-postgresql-primary' | ||
user: 'postgres' | ||
password: pg_password | ||
port: "5432" | ||
database: 'dbname' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.