Skip to content

Commit 8642131

Browse files
authored
Merge pull request #5 from cybertec-postgresql/pgwatch-3-helm-chart
Pgwatch 3 helm chart
2 parents 44daa98 + ef7c32f commit 8642131

38 files changed

+42318
-9
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
helm/pgwatch/test_values.yaml

docs/index.yaml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
apiVersion: v1
2+
entries:
3+
pgwatch:
4+
- apiVersion: v1
5+
appVersion: "3.2"
6+
created: "2025-04-17T08:06:39.604311384+02:00"
7+
description: A Helm chart for pgwatch monitoring tools
8+
digest: 114f2f8ac8e1a8cceb5c5062a86e54f9b45c742bfa3b04e9701dd03bc22262b8
9+
name: pgwatch
10+
urls:
11+
- https://cybertec-postgresql.github.io/pgwatch-charts/pgwatch-3.1.0.tgz
12+
version: 3.1.0
13+
- apiVersion: v1
14+
appVersion: "3.2"
15+
created: "2025-04-17T08:06:39.601137999+02:00"
16+
description: A Helm chart for pgwatch monitoring tools
17+
digest: 69410525096ac64bac0f782205d92485e0d57cfc72f2e1d1684933baf3c21100
18+
name: pgwatch
19+
urls:
20+
- https://cybertec-postgresql.github.io/pgwatch-charts/pgwatch-3.0.1.tgz
21+
version: 3.0.1
22+
generated: "2025-04-17T08:06:39.588535932+02:00"

docs/pgwatch-3.0.1.tgz

92.7 KB
Binary file not shown.

docs/pgwatch-3.1.0.tgz

92.8 KB
Binary file not shown.

helm/README.md

Lines changed: 56 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,58 @@
1-
# Documentation
1+
[![Documentation](https://img.shields.io/badge/Documentation-pgwat.ch-brightgreen)](https://pgwat.ch)
2+
[![License: MIT](https://img.shields.io/badge/License-BSD_3-green.svg)](https://opensource.org/license/bsd-3-clause)
3+
[![Go Build & Test](https://github.com/cybertec-postgresql/pgwatch/actions/workflows/build.yml/badge.svg)](https://github.com/cybertec-postgresql/pgwatch/actions/workflows/build.yml)
4+
[![Coverage Status](https://coveralls.io/repos/github/cybertec-postgresql/pgwatch/badge.svg?branch=master&service=github)](https://coveralls.io/github/cybertec-postgresql/pgwatch?branch=master)
25

36

4-
Key | Default value | Description
5-
---|---|---
6-
storage | influx | influx or postgres; Defines backend for storing data
7-
postgres_storage.database | pgwatch2_metrics | in case if storage is set to postgres, defines database name
8-
metrics_preset | |
9-
metrics_preset.name | remotedba | name of the default metrics_preset
10-
metrics_preset.description| Metrics used for monitoring of Remote-DBA Databases | Metrics preset description
11-
metrics_preset.metrics | '{"kpi": 120, "wal": 60, "locks": 60, "db_size": 300, "archiver": 60, "backends": 60, "bgwriter": 60, "cpu_load": 60, "db_stats": 60, "settings": 7200, "wal_size": 300, "locks_mode": 60, "index_stats": 900, "replication": 120, "sproc_stats": 180, "table_stats": 300, "wal_receiver": 120, "change_events": 300, "table_io_stats": 600, "sequence_health": 3600, "replication_slots": 120}' | Metrics
7+
# pgWatch-Helm-Charts
8+
9+
These Helm charts are available for a quick start on Kubernetes and Openshift.
10+
Since the new pgWatch release (3.x), the Helm charts have been developed and tested primarily for Openshift.
11+
The old Helm charts for pgwatch2 are deprecated and no longer maintained. Furthermore, they will be removed in summer 2025.
12+
13+
## Quick Start
14+
To use the Helm-Charts, you can either patch the repo onto your local system or install and update it directly using the Helm repository.
15+
In either case, please familiarise yourself with the relevant values files before use and create a custom variant to set up pgWatch according to your preferences in your environment.
16+
17+
### Helm-Repository
18+
```sh
19+
# Add Helm-Repo
20+
helm repo add pgwatch https://cybertec-postgresql.github.io/pgwatch-charts
21+
helm repo update
22+
23+
# Install helm-Chart
24+
helm install pgwatch pgwatch/pgwatch --values custom-values.yaml
25+
26+
# Upgrade helm-Chart
27+
helm upgrade pgwatch pgwatch/pgwatch --values custom-values.yaml
28+
```
29+
30+
### git clone
31+
```sh
32+
git clone https://github.com/cybertec-postgresql/pgwatch-charts.git
33+
cd pgwatch-chart/helm/pgwatch
34+
35+
36+
# Install helm-Chart
37+
helm install pgwatch -n pgwatch -f custom-values.yaml .
38+
39+
# Upgrade Helm-Chart
40+
helm upgrade pgwatch -n pgwatch -f custom-values.yaml .
41+
42+
```
43+
44+
### Custom Values-file
45+
```sh
46+
// Edit Values File
47+
cp values.yaml custom-values.yaml
48+
vi custom-values.yaml
49+
```
50+
### Check the Pods
51+
```sh
52+
kubectl get pods -n pgwatch
53+
oc get pods -n pgwatch
54+
```
55+
56+
# Contributing
57+
58+
Feedback, suggestions, problem reports, and pull requests are very much appreciated.

helm/pgwatch/Chart.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
apiVersion: v1
2+
appVersion: "3.2"
3+
description: A Helm chart for pgwatch monitoring tools
4+
name: pgwatch
5+
version: 3.1.0

helm/pgwatch/README.md

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
[![Documentation](https://img.shields.io/badge/Documentation-pgwat.ch-brightgreen)](https://pgwat.ch)
2+
[![License: MIT](https://img.shields.io/badge/License-BSD_3-green.svg)](https://opensource.org/license/bsd-3-clause)
3+
[![Go Build & Test](https://github.com/cybertec-postgresql/pgwatch/actions/workflows/build.yml/badge.svg)](https://github.com/cybertec-postgresql/pgwatch/actions/workflows/build.yml)
4+
[![Coverage Status](https://coveralls.io/repos/github/cybertec-postgresql/pgwatch/badge.svg?branch=master&service=github)](https://coveralls.io/github/cybertec-postgresql/pgwatch?branch=master)
5+
6+
7+
# pgWatch-Helm-Chart
8+
This Helm chart allows you to set up the pgWatch stack using helm in containers or distributions such as Openshift.
9+
Note: This Helm chart is developed and tested primarily for Openshift.
10+
11+
## Quick Start
12+
To use the Helm-Charts, you can either patch the repo onto your local system or install and update it directly using the Helm repository.
13+
In either case, please familiarise yourself with the relevant values files before use and create a custom variant to set up pgWatch according to your preferences in your environment.
14+
15+
### Helm-Repository
16+
```sh
17+
# Add Helm-Repo
18+
helm repo add pgwatch https://cybertec-postgresql.github.io/pgwatch-charts
19+
helm repo update
20+
21+
# Install helm-Chart
22+
helm install pgwatch pgwatch/pgwatch --values custom-values.yaml
23+
24+
# Upgrade helm-Chart
25+
helm upgrade pgwatch pgwatch/pgwatch --values custom-values.yaml
26+
```
27+
28+
### git clone
29+
```sh
30+
git clone https://github.com/cybertec-postgresql/pgwatch-charts.git
31+
cd pgwatch-chart/helm/pgwatch
32+
33+
34+
# Install helm-Chart
35+
helm install pgwatch -n pgwatch -f custom-values.yaml .
36+
37+
# Upgrade Helm-Chart
38+
helm upgrade pgwatch -n pgwatch -f custom-values.yaml .
39+
40+
```
41+
42+
## customisation
43+
The Helm chart currently supports PostgreSQL and Prometheus as a sink. This can be controlled via the [values](https://github.com/cybertec-postgresql/pgwatch-charts/blob/pgwatch-3-helm-chart/helm/pgwatch/values.yaml) file.
44+
- PostgreSQL
45+
- Use an existing configuration and metric database
46+
- Create a new PostgreSQL-Instance in the same namespace
47+
- Prometheus
48+
- Use an existing Prometheus as Sink (enables Sink-Connect on Port 9188)
49+
- Create a new Prometheus-Instance in the same namespace
50+
- Grafana
51+
- Deploy Grafana with the dashboards for PostgreSQL as a sink
52+
53+
54+
## Limitation
55+
Please note that the Grafana dashboard was developed for use with PostgreSQL as a sink. If you decide to use Prometheus as a sink, you will need to build your own dashboards and configure Prometheus as a data source in Grafana yourself. If you want to use your own systems behind Prometheus, you can use Yaml to easily prevent Grafana from being deployed.
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
{{- if eq .Values.pgwatch.prometheus.new_prometheus.create_alertmanager "true" }}
2+
apiVersion: apps/v1
3+
kind: Deployment
4+
metadata:
5+
labels:
6+
app.kubernetes.io/name: pgwatch
7+
vendor: opensource.cybertec
8+
postgres-operator.cybertec.at/stack: pgwatch
9+
name: pgwatch-alertmanager
10+
spec:
11+
selector:
12+
matchLabels:
13+
postgres-operator.cybertec.at/stack: pgwatch
14+
name: pgwatch-alertmanager
15+
template:
16+
metadata:
17+
creationTimestamp: null
18+
labels:
19+
postgres-operator.cybertec.at/stack: pgwatch
20+
name: pgwatch-alertmanager
21+
spec:
22+
containers:
23+
- image: {{ .Values.pgwatch.prometheus.new_prometheus.image }}
24+
imagePullPolicy: IfNotPresent
25+
livenessProbe:
26+
failureThreshold: 3
27+
httpGet:
28+
path: /-/healthy
29+
port: 9090
30+
scheme: HTTP
31+
initialDelaySeconds: 15
32+
periodSeconds: 20
33+
successThreshold: 1
34+
timeoutSeconds: 1
35+
name: pgwatch-alertmanager
36+
ports:
37+
- containerPort: 9090
38+
protocol: TCP
39+
readinessProbe:
40+
failureThreshold: 3
41+
httpGet:
42+
path: /-/ready
43+
port: 9090
44+
scheme: HTTP
45+
periodSeconds: 10
46+
successThreshold: 1
47+
timeoutSeconds: 1
48+
terminationMessagePath: /dev/termination-log
49+
terminationMessagePolicy: File
50+
args:
51+
- "--config.file=/etc/prometheus/prometheus.yml"
52+
- "--storage.tsdb.path=/prometheus"
53+
- "--storage.tsdb.retention.time={{ .Values.pgwatch.prometheus.new_prometheus.settings.retention_days }}d"
54+
volumeMounts:
55+
- mountPath: /etc/prometheus
56+
name: prometheus-cm
57+
- mountPath: /prometheus
58+
name: prometheus-volume
59+
securityContext: {}
60+
dnsPolicy: ClusterFirst
61+
restartPolicy: Always
62+
schedulerName: default-scheduler
63+
terminationGracePeriodSeconds: 30
64+
volumes:
65+
- configMap:
66+
defaultMode: 420
67+
name: pgwatch-prometheus-cm
68+
name: prometheus-cm
69+
- name: prometheus-volume
70+
persistentVolumeClaim:
71+
claimName: prometheus-pvc
72+
progressDeadlineSeconds: 600
73+
replicas: 1
74+
revisionHistoryLimit: 10
75+
strategy:
76+
type: Recreate
77+
{{ end }}

0 commit comments

Comments
 (0)