Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
364e750
add new pgwatch-helm-chart for k8s/openshift
Schmaetz Dec 3, 2024
9df2f8e
added option for using an existing database as metric store
Schmaetz Dec 3, 2024
90a7ebc
change default values
Schmaetz Dec 3, 2024
7c5595c
update Helm-Chart-Version
Schmaetz Dec 3, 2024
abd8207
added option for prometheus sink and allows to bring your own prom or…
Schmaetz Apr 4, 2025
ff998dd
replace cmd modifications by mounting launcher script
Schmaetz Apr 4, 2025
2e12348
added retention setting for pg sink
Schmaetz Apr 7, 2025
94cfec1
cleanup and change variable-name
Schmaetz Apr 7, 2025
00734cf
added prom retention for new prometheus
Schmaetz Apr 7, 2025
ce14f56
change default values
Schmaetz Apr 7, 2025
5ec3259
Update README.md
Schmaetz Apr 14, 2025
820b224
Create README.md
Schmaetz Apr 14, 2025
d92fcfc
Update README.md
Schmaetz Apr 14, 2025
b472a04
Update values.yaml
Schmaetz Apr 14, 2025
e54264a
Update prometheus-config.yaml
Schmaetz Apr 14, 2025
8da8309
Update grafana-deployment.yaml
Schmaetz Apr 14, 2025
cbcf502
Update README.md
Schmaetz Apr 14, 2025
cf52c36
Update values.yaml
Schmaetz Apr 14, 2025
d9ee500
Create alertmanager_deployment
Schmaetz Apr 14, 2025
958ca28
Create charts-folder
Schmaetz Apr 15, 2025
8ff62e9
Delete charts
Schmaetz Apr 15, 2025
a238476
Create index
Schmaetz Apr 15, 2025
f90c999
Update values.yaml
Schmaetz Apr 15, 2025
188e41a
Update grafana-deployment.yaml
Schmaetz Apr 15, 2025
deffb81
added chart repo & updates version
Schmaetz Apr 15, 2025
a2cacdf
remove unneeded file
Schmaetz Apr 15, 2025
0d5cd04
rename charts folder to docs for github-limitations
Schmaetz Apr 15, 2025
4f06741
added sslmode to values
Schmaetz Apr 17, 2025
e3f9488
add custom datasource if using existing pg db
Schmaetz Apr 17, 2025
3c1dd78
update datasource and basic values file
Schmaetz Apr 17, 2025
2b0c21f
update helm repo
Schmaetz Apr 17, 2025
38b4394
Updates for Readme
Schmaetz Apr 17, 2025
ef7c32f
Merge branch 'main' into pgwatch-3-helm-chart
Schmaetz Apr 17, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
helm/pgwatch/test_values.yaml
22 changes: 22 additions & 0 deletions docs/index.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
apiVersion: v1
entries:
pgwatch:
- apiVersion: v1
appVersion: "3.2"
created: "2025-04-17T08:06:39.604311384+02:00"
description: A Helm chart for pgwatch monitoring tools
digest: 114f2f8ac8e1a8cceb5c5062a86e54f9b45c742bfa3b04e9701dd03bc22262b8
name: pgwatch
urls:
- https://cybertec-postgresql.github.io/pgwatch-charts/pgwatch-3.1.0.tgz
version: 3.1.0
- apiVersion: v1
appVersion: "3.2"
created: "2025-04-17T08:06:39.601137999+02:00"
description: A Helm chart for pgwatch monitoring tools
digest: 69410525096ac64bac0f782205d92485e0d57cfc72f2e1d1684933baf3c21100
name: pgwatch
urls:
- https://cybertec-postgresql.github.io/pgwatch-charts/pgwatch-3.0.1.tgz
version: 3.0.1
generated: "2025-04-17T08:06:39.588535932+02:00"
Binary file added docs/pgwatch-3.0.1.tgz
Binary file not shown.
Binary file added docs/pgwatch-3.1.0.tgz
Binary file not shown.
65 changes: 56 additions & 9 deletions helm/README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,58 @@
# Documentation
[![Documentation](https://img.shields.io/badge/Documentation-pgwat.ch-brightgreen)](https://pgwat.ch)
[![License: MIT](https://img.shields.io/badge/License-BSD_3-green.svg)](https://opensource.org/license/bsd-3-clause)
[![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)
[![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)


Key | Default value | Description
---|---|---
storage | influx | influx or postgres; Defines backend for storing data
postgres_storage.database | pgwatch2_metrics | in case if storage is set to postgres, defines database name
metrics_preset | |
metrics_preset.name | remotedba | name of the default metrics_preset
metrics_preset.description| Metrics used for monitoring of Remote-DBA Databases | Metrics preset description
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
# pgWatch-Helm-Charts

These Helm charts are available for a quick start on Kubernetes and Openshift.
Since the new pgWatch release (3.x), the Helm charts have been developed and tested primarily for Openshift.
The old Helm charts for pgwatch2 are deprecated and no longer maintained. Furthermore, they will be removed in summer 2025.

## Quick Start
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.
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.

### Helm-Repository
```sh
# Add Helm-Repo
helm repo add pgwatch https://cybertec-postgresql.github.io/pgwatch-charts
helm repo update

# Install helm-Chart
helm install pgwatch pgwatch/pgwatch --values custom-values.yaml

# Upgrade helm-Chart
helm upgrade pgwatch pgwatch/pgwatch --values custom-values.yaml
```

### git clone
```sh
git clone https://github.com/cybertec-postgresql/pgwatch-charts.git
cd pgwatch-chart/helm/pgwatch


# Install helm-Chart
helm install pgwatch -n pgwatch -f custom-values.yaml .

# Upgrade Helm-Chart
helm upgrade pgwatch -n pgwatch -f custom-values.yaml .

```

### Custom Values-file
```sh
// Edit Values File
cp values.yaml custom-values.yaml
vi custom-values.yaml
```
### Check the Pods
```sh
kubectl get pods -n pgwatch
oc get pods -n pgwatch
```

# Contributing

Feedback, suggestions, problem reports, and pull requests are very much appreciated.
5 changes: 5 additions & 0 deletions helm/pgwatch/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
apiVersion: v1
appVersion: "3.2"
description: A Helm chart for pgwatch monitoring tools
name: pgwatch
version: 3.1.0
55 changes: 55 additions & 0 deletions helm/pgwatch/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
[![Documentation](https://img.shields.io/badge/Documentation-pgwat.ch-brightgreen)](https://pgwat.ch)
[![License: MIT](https://img.shields.io/badge/License-BSD_3-green.svg)](https://opensource.org/license/bsd-3-clause)
[![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)
[![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)


# pgWatch-Helm-Chart
This Helm chart allows you to set up the pgWatch stack using helm in containers or distributions such as Openshift.
Note: This Helm chart is developed and tested primarily for Openshift.

## Quick Start
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.
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.

### Helm-Repository
```sh
# Add Helm-Repo
helm repo add pgwatch https://cybertec-postgresql.github.io/pgwatch-charts
helm repo update

# Install helm-Chart
helm install pgwatch pgwatch/pgwatch --values custom-values.yaml

# Upgrade helm-Chart
helm upgrade pgwatch pgwatch/pgwatch --values custom-values.yaml
```

### git clone
```sh
git clone https://github.com/cybertec-postgresql/pgwatch-charts.git
cd pgwatch-chart/helm/pgwatch


# Install helm-Chart
helm install pgwatch -n pgwatch -f custom-values.yaml .

# Upgrade Helm-Chart
helm upgrade pgwatch -n pgwatch -f custom-values.yaml .

```

## customisation
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.
- PostgreSQL
- Use an existing configuration and metric database
- Create a new PostgreSQL-Instance in the same namespace
- Prometheus
- Use an existing Prometheus as Sink (enables Sink-Connect on Port 9188)
- Create a new Prometheus-Instance in the same namespace
- Grafana
- Deploy Grafana with the dashboards for PostgreSQL as a sink


## Limitation
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.
77 changes: 77 additions & 0 deletions helm/pgwatch/templates/alertmanager_deployment
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
{{- if eq .Values.pgwatch.prometheus.new_prometheus.create_alertmanager "true" }}
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app.kubernetes.io/name: pgwatch
vendor: opensource.cybertec
postgres-operator.cybertec.at/stack: pgwatch
name: pgwatch-alertmanager
spec:
selector:
matchLabels:
postgres-operator.cybertec.at/stack: pgwatch
name: pgwatch-alertmanager
template:
metadata:
creationTimestamp: null
labels:
postgres-operator.cybertec.at/stack: pgwatch
name: pgwatch-alertmanager
spec:
containers:
- image: {{ .Values.pgwatch.prometheus.new_prometheus.image }}
imagePullPolicy: IfNotPresent
livenessProbe:
failureThreshold: 3
httpGet:
path: /-/healthy
port: 9090
scheme: HTTP
initialDelaySeconds: 15
periodSeconds: 20
successThreshold: 1
timeoutSeconds: 1
name: pgwatch-alertmanager
ports:
- containerPort: 9090
protocol: TCP
readinessProbe:
failureThreshold: 3
httpGet:
path: /-/ready
port: 9090
scheme: HTTP
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 1
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
args:
- "--config.file=/etc/prometheus/prometheus.yml"
- "--storage.tsdb.path=/prometheus"
- "--storage.tsdb.retention.time={{ .Values.pgwatch.prometheus.new_prometheus.settings.retention_days }}d"
volumeMounts:
- mountPath: /etc/prometheus
name: prometheus-cm
- mountPath: /prometheus
name: prometheus-volume
securityContext: {}
dnsPolicy: ClusterFirst
restartPolicy: Always
schedulerName: default-scheduler
terminationGracePeriodSeconds: 30
volumes:
- configMap:
defaultMode: 420
name: pgwatch-prometheus-cm
name: prometheus-cm
- name: prometheus-volume
persistentVolumeClaim:
claimName: prometheus-pvc
progressDeadlineSeconds: 600
replicas: 1
revisionHistoryLimit: 10
strategy:
type: Recreate
{{ end }}
Loading