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: true

Keycloak, 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: true

Dashboards 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: true

Please 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.enabled is set, so that no unscraped endpoints are running.
ComponentAvailabilityEndpoint (Service, port, path)Provided metrics
CassandraExporter, sidecarcassandra, 8080, /metricsCassandra internals via JMX
CollaboraAlways oncollabora, 9980, /cool/getMetrics (basic auth, admin credentials)Open, active and expired documents, CPU, memory and threads of the document processes, errors
Element (HAProxy)Always onelement-haproxy, 8405, /metricsFrontend and backend HTTP requests, responses, connections and health checks of the Matrix stack’s proxy
Element (MAS)Always onelement-matrix-authentication-service, 8081, /metricsMatrix Authentication Service: HTTP server and client requests, background jobs, async runtime
Element (RTC SFU)Always onelement-matrix-rtc-sfu, 6789, /metricsMatrixRTC (LiveKit): sessions, packets, packet loss, jitter and round-trip times
Element (Synapse)Always onelement-synapse-main, 9001, /_synapse/metricsHomeserver: HTTP requests, caches, database transactions and queries, event processing
Keycloak (Nubus)With ServiceMonitorsums-keycloak, 9000, /metricsHTTP requests, user sessions, password hashing, caches, database connection pool, JVM
NextcloudExporter, deploymentopendesk-nextcloud-exporter, 9205, /metricsRegistered and active users, files, shares (incl. federated), free space, database size, PHP and system information
openDeskExporter, deploymentopendesk-exporter-opendesk-exporter, 9464, /metricsDeployed openDesk version, registered users by type, active users per time window, optionally available updates
OpenProjectWith ServiceMonitorsopenproject, 9394, /metricsPuma web server: threads, request backlog, handled requests
SeaweedFSWith ServiceMonitorsseaweedfs-all-in-one, 9324, /metricsRequest 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.

ComponentDashboard (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: