Monitoring
This document will cover how you can enable observability with Prometheus-based monitoring and Grafana dashboards as well as the overall status of the monitoring integration.
Technology
openDesk includes integration with Prometheus-based monitoring.
Together with kube-prometheus-stack, you can easily leverage the full potential of the open-source cloud-native observability stack.
Before enabling the following options, you need to install the respective custom resource definitions (CRDs) from the kube-prometheus-stack repository which should at least include the Prometheus Operator.
Defaults
All configurable options and their defaults can be found in
monitoring.yaml.gotmpl.
Metrics
To deploy serviceMonitor custom resources for all components that provide metrics, enable them by:
monitoring:
prometheus:
serviceMonitors:
enabled: trueKeycloak, OpenProject and SeaweedFS only expose their metrics endpoints when this is enabled, see the
component overview.
podMonitors is reserved for components that are scraped via podMonitor resources, none uses it yet.
For some components, a separate Prometheus exporter is deployed to expose their metrics. All of them are disabled by default and can be enabled together or individually, where the setting of an exporter takes precedence:
monitoring:
prometheus:
exporters:
# Default for all exporters
enabled: false
# Per exporter: true or false override the default, ~ follows it
cassandra:
enabled: ~
nextcloud:
enabled: ~
opendesk:
enabled: ~Alerts
openDesk ships with a set of Prometheus alerting rules that are specific to the operation of openDesk. Some of these are created by our partners while others are defined in opendesk-alerts.
All alert rules are deployed as PrometheusRule and can be enabled like this:
monitoring:
prometheus:
prometheusRules:
enabled: trueDashboards for Grafana
If your Grafana instance is deployed via kube-prometheus-stack, or you have deployed the Sidecar for datasources, openDesk can make dashboards available via ConfigMap resources.
Enable the functionality with the following snippet:
monitoring:
grafana:
dashboards:
enabled: truePlease find further details in the related Helm chart.
Component overview
The following components provide application metrics. For all of them, monitoring.prometheus.serviceMonitors.enabled
deploys the serviceMonitor that makes Prometheus scrape the endpoint.
The availability column refers to the metrics endpoint itself, not to its serviceMonitor:
- Always on: The component always exposes the endpoint, independent of openDesk’s monitoring settings.
- Exporter: The endpoint is provided by an exporter that has to be enabled. Exporters run either as a sidecar container of the component’s pods or as a separate deployment.
- With ServiceMonitors: The endpoint is only exposed while
monitoring.prometheus.serviceMonitors.enabledis set, so that no unscraped endpoints are running.
| Component | Availability | Endpoint (Service, port, path) | Provided metrics |
|---|---|---|---|
| Cassandra | Exporter, sidecar | cassandra, 8080, /metrics | Cassandra internals via JMX |
| Collabora | Always on | collabora, 9980, /cool/getMetrics (basic auth, admin credentials) | Open, active and expired documents, CPU, memory and threads of the document processes, errors |
| Element (HAProxy) | Always on | element-haproxy, 8405, /metrics | Frontend and backend HTTP requests, responses, connections and health checks of the Matrix stack’s proxy |
| Element (MAS) | Always on | element-matrix-authentication-service, 8081, /metrics | Matrix Authentication Service: HTTP server and client requests, background jobs, async runtime |
| Element (RTC SFU) | Always on | element-matrix-rtc-sfu, 6789, /metrics | MatrixRTC (LiveKit): sessions, packets, packet loss, jitter and round-trip times |
| Element (Synapse) | Always on | element-synapse-main, 9001, /_synapse/metrics | Homeserver: HTTP requests, caches, database transactions and queries, event processing |
| Keycloak (Nubus) | With ServiceMonitors | ums-keycloak, 9000, /metrics | HTTP requests, user sessions, password hashing, caches, database connection pool, JVM |
| Nextcloud | Exporter, deployment | opendesk-nextcloud-exporter, 9205, /metrics | Registered and active users, files, shares (incl. federated), free space, database size, PHP and system information |
| openDesk | Exporter, deployment | opendesk-exporter-opendesk-exporter, 9464, /metrics | Deployed openDesk version, registered users by type, active users per time window, optionally available updates |
| OpenProject | With ServiceMonitors | openproject, 9394, /metrics | Puma web server: threads, request backlog, handled requests |
| SeaweedFS | With ServiceMonitors | seaweedfs-all-in-one, 9324, /metrics | Request rates and latencies of the S3 API, filer and volume servers, volumes, master state |
Cassandra is only part of openDesk Enterprise.
The serviceMonitors of the Element components are only deployed if the ServiceMonitor CRD is detected in the
cluster, and they lack the labels of monitoring.prometheus.serviceMonitors.labels, as the Element chart does not
support labels for serviceMonitors only yet. Configure Prometheus’ serviceMonitorSelector accordingly to scrape them.
Dashboards and alerts
The Grafana dashboards (see Dashboards for Grafana) and the alert rules (see Alerts)
shipped with openDesk are based on the generic Kubernetes metrics of kube-prometheus-stack, i.e. cAdvisor,
kube-state-metrics and the kubelet: CPU and memory usage, restarts, availability and volume usage of the pods.
They do not depend on the application metrics above, which currently have no dashboards or alerts of their own, except
for SeaweedFS: its chart ships a dashboard for its metrics, which is deployed with
monitoring.prometheus.serviceMonitors.enabled instead of monitoring.grafana.dashboards.enabled.
| Component | Dashboard (Grafana) | Alerts (prometheusRule) |
|---|---|---|
| Collabora | :white_check_mark: | :white_check_mark: |
| Cryptpad | :white_check_mark: | :white_check_mark: |
| Dovecot | :white_check_mark: | :x: |
| Element | :white_check_mark: | :white_check_mark: |
| Jitsi | :white_check_mark: | :white_check_mark: |
| Nextcloud | :white_check_mark: | :white_check_mark: |
| Nubus | :white_check_mark: | :white_check_mark: |
| Open-Xchange | :white_check_mark: | :white_check_mark: |
| OpenProject | :white_check_mark: | :white_check_mark: |
| XWiki | :white_check_mark: | :white_check_mark: |