Hello everyone,
currently we have installed a Gitlab instance through this HELM chart:
gitlab 7.3.2 · gitlab/gitlab (Version 6.10.6).
We used this values.yaml file to install the chart.
USER-SUPPLIED VALUES:
USER-SUPPLIED VALUES: null
certmanager-issuer:
email: rachit.gupta@materna.group
gitlab:
toolbox:
backups:
cron:
enabled: true
schedule: 30 14 * * *
objectStorage:
config:
key: config
secret: storage-config
global:
appConfig:
backups:
bucket: mat-gitlab-backup
edition: ce
hosts:
domain: prd.materna.work
externalIP: 20.105.165.241
postgresql:
image:
tag: 13.6.0
prometheus:
install: false
Gitlab is running in an AKS cluster. Die built in Prometheus was not installed since we already have a Prometheus instance running in the cluster.
My objective is to get the GitLab metrics in our Prometheus instance. I am aiming for the metrics shown here: GitLab Prometheus metrics | GitLab. To do this I created a service monitor (not directly through the values yaml file). This is supposed to allow scraping the metrics from the Gitlab Exporter Endpoint.
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
labels:
app: webservice
app.kubernetes.io/managed-by: Helm
gitlab.com/webservice-name: default
chart: webservice-6.11.13
release: kube-prometheus-stack
name: gitlab
namespace: gitlab
spec:
endpoints:
- interval: 1m
path: /metrics
port: http-metrics
targetPort: 9168
scrapeTimeout: 30s
namespaceSelector:
matchNames:
- gitlab
selector:
matchLabels:
heritage: Helm
release: gitlab
app: gitlab-exporter
Prometheus recognizes the Endpoint to be scraped. However, no metrics are available.
I think the ideal solution is to configure a service monitor directly from the values file of the chart. However, I was not able to find a way to do so or to enable the metrics. That is why I tried building the custom service monitor. Does anyone know how to enable the metrics in the Helm chart? And how to make them available to the external Prometheus instance?
Any help is highly appreciated!
Best regards,
Diego