Skip to content
This repository was archived by the owner on Nov 25, 2024. It is now read-only.

Commit 7fff7cd

Browse files
authored
feat(helm): add prometheus resources to monitor (#2958)
### Pull Request Checklist <!-- Please read https://matrix-org.github.io/dendrite/development/contributing before submitting your pull request --> * [x] I have added Go unit tests or [Complement integration tests](https://github.com/matrix-org/complement) for this PR _or_ I have justified why this PR doesn't need tests * [x] Pull request includes a [sign off below using a legally identifiable name](https://matrix-org.github.io/dendrite/development/contributing#sign-off) _or_ I have already signed off privately --- I do not know, how you run helm-docs .... otherwise i would like to add somewhere: ````markdown * Works well with [Prometheus Operator](https://prometheus-operator.dev/) ([Helmchart](https://artifacthub.io/packages/helm/prometheus-community/kube-prometheus-stack)) and there setup of [Grafana](https://grafana.com/grafana/), by enabling following values: ```yaml prometheus: servicemonitor: enabled: true labels: release: "kube-prometheus-stack" rules: enabled: true # will deploy alert rules additionalLabels: release: "kube-prometheus-stack" grafana: dashboards: enabled: true # will deploy default dashboards ``` PS: The labels `release=kube-prometheus-stack` is setup with the helmchart of the Prometheus Operator. For Grafana Dashboards it maybe need scan enable to scan in correct namespaces (or ALL), enabled by `sidecar.dashboards.searchNamespace` in [Helmchart of grafana](https://artifacthub.io/packages/helm/grafana/grafana) (which is part of PrometheusOperator, so `grafana.sidecar.dashboards.searchNamespace`) ```` Maybe also put somewhere the Screenshot of that Grafana Dashboard: https://grafana.com/grafana/dashboards/13916-dendrite/ --- @S7evinK do you take a look? Signed-off-by: genofire <[email protected]>
1 parent eddf31f commit 7fff7cd

File tree

11 files changed

+1281
-9
lines changed

11 files changed

+1281
-9
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{{ define "chart.monitoringSection" }}
2+
## Monitoring
3+
4+
[![Grafana Dashboard](https://grafana.com/api/dashboards/13916/images/9894/image)](https://grafana.com/grafana/dashboards/13916-dendrite/)
5+
6+
* Works well with [Prometheus Operator](https://prometheus-operator.dev/) ([Helmchart](https://artifacthub.io/packages/helm/prometheus-community/kube-prometheus-stack)) and their setup of [Grafana](https://grafana.com/grafana/), by enabling the following values:
7+
```yaml
8+
prometheus:
9+
servicemonitor:
10+
enabled: true
11+
labels:
12+
release: "kube-prometheus-stack"
13+
rules:
14+
enabled: true # will deploy alert rules
15+
labels:
16+
release: "kube-prometheus-stack"
17+
grafana:
18+
dashboards:
19+
enabled: true # will deploy default dashboards
20+
```
21+
PS: The label `release=kube-prometheus-stack` is setup with the helmchart of the Prometheus Operator. For Grafana Dashboards it may be necessary to enable scanning in the correct namespaces (or ALL), enabled by `sidecar.dashboards.searchNamespace` in [Helmchart of grafana](https://artifacthub.io/packages/helm/grafana/grafana) (which is part of PrometheusOperator, so `grafana.sidecar.dashboards.searchNamespace`)
22+
{{ end }}

helm/dendrite/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
apiVersion: v2
22
name: dendrite
3-
version: "0.11.1"
3+
version: "0.11.2"
44
appVersion: "0.11.1"
55
description: Dendrite Matrix Homeserver
66
type: application

helm/dendrite/README.md

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# dendrite
22

3-
![Version: 0.11.1](https://img.shields.io/badge/Version-0.11.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.11.1](https://img.shields.io/badge/AppVersion-0.11.1-informational?style=flat-square)
3+
![Version: 0.11.2](https://img.shields.io/badge/Version-0.11.2-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.11.1](https://img.shields.io/badge/AppVersion-0.11.1-informational?style=flat-square)
44
Dendrite Matrix Homeserver
55

66
Status: **NOT PRODUCTION READY**
@@ -146,3 +146,35 @@ Create a folder `appservices` and place your configurations in there. The confi
146146
| ingress.tls | list | `[]` | |
147147
| service.type | string | `"ClusterIP"` | |
148148
| service.port | int | `8008` | |
149+
| prometheus.servicemonitor.enabled | bool | `false` | Enable ServiceMonitor for Prometheus-Operator for scrape metric-endpoint |
150+
| prometheus.servicemonitor.labels | object | `{}` | Extra Labels on ServiceMonitor for selector of Prometheus Instance |
151+
| prometheus.rules.enabled | bool | `false` | Enable PrometheusRules for Prometheus-Operator for setup alerting |
152+
| prometheus.rules.labels | object | `{}` | Extra Labels on PrometheusRules for selector of Prometheus Instance |
153+
| prometheus.rules.additionalRules | list | `[]` | additional alertrules (no default alertrules are provided) |
154+
| grafana.dashboards.enabled | bool | `false` | |
155+
| grafana.dashboards.labels | object | `{"grafana_dashboard":"1"}` | Extra Labels on ConfigMap for selector of grafana sidecar |
156+
| grafana.dashboards.annotations | object | `{}` | Extra Annotations on ConfigMap additional config in grafana sidecar |
157+
158+
## Monitoring
159+
160+
[![Grafana Dashboard](https://grafana.com/api/dashboards/13916/images/9894/image)](https://grafana.com/grafana/dashboards/13916-dendrite/)
161+
162+
* Works well with [Prometheus Operator](https://prometheus-operator.dev/) ([Helmchart](https://artifacthub.io/packages/helm/prometheus-community/kube-prometheus-stack)) and their setup of [Grafana](https://grafana.com/grafana/), by enabling the following values:
163+
```yaml
164+
prometheus:
165+
servicemonitor:
166+
enabled: true
167+
labels:
168+
release: "kube-prometheus-stack"
169+
rules:
170+
enabled: true # will deploy alert rules
171+
labels:
172+
release: "kube-prometheus-stack"
173+
grafana:
174+
dashboards:
175+
enabled: true # will deploy default dashboards
176+
```
177+
PS: The label `release=kube-prometheus-stack` is setup with the helmchart of the Prometheus Operator. For Grafana Dashboards it may be necessary to enable scanning in the correct namespaces (or ALL), enabled by `sidecar.dashboards.searchNamespace` in [Helmchart of grafana](https://artifacthub.io/packages/helm/grafana/grafana) (which is part of PrometheusOperator, so `grafana.sidecar.dashboards.searchNamespace`)
178+
179+
----------------------------------------------
180+
Autogenerated from chart metadata using [helm-docs vv1.11.0](https://github.com/norwoodj/helm-docs/releases/vv1.11.0)

helm/dendrite/README.md.gotmpl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,5 @@
1010
{{ template "chart.sourcesSection" . }}
1111
{{ template "chart.requirementsSection" . }}
1212
{{ template "chart.valuesSection" . }}
13+
{{ template "chart.monitoringSection" . }}
1314
{{ template "helm-docs.versionFooter" . }}

helm/dendrite/ci/ct-ingress-values.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,8 @@ dendrite_config:
1111

1212
ingress:
1313
enabled: true
14+
15+
# dashboard is an ConfigMap with labels - it does not harm on testing
16+
grafana:
17+
dashboards:
18+
enabled: true

0 commit comments

Comments
 (0)