Skip to content

Add ServiceMonitor for prometheus monitoring

This MR adds support for monitoring the gitlab-agent deployment using a ServiceMonitor. This allows users to utilize tools like prometheus-operator or grafana-agent for scraping the metrics. The ServiceMonitor is disabled by default, but can be enabled in the values.yaml.

The syntax is based on the external-secrets chart:

Regarding the wording I used serviceMonitor: enabled in the values.yaml because this seems to be used quite often in public charts. But it could be moved to the config: observability section if you'd prefer that. In the servicemonitor.yaml I sticked to observability because based on Adding a named port `monitoring` (!51 - merged) this seems to be the preferred name.

Example screenshot of `grafana-agent` scraping the `ServiceMonitor`

image

Closes #24 (closed)

Merge request reports