diff --git a/prometheus-monitoring/servicemonitor1.yaml b/prometheus-monitoring/servicemonitor1.yaml new file mode 100644 index 0000000..918c232 --- /dev/null +++ b/prometheus-monitoring/servicemonitor1.yaml @@ -0,0 +1,16 @@ +apiVersion: monitoring.coreos.com/v1 +kind: ServiceMonitor +metadata: + name: gitlab-metrics-servicemonitor + # Change this to the namespace the Prometheus instance is running in + # namespace: default + labels: + app: gitlab-runner-gitlab-runner + release: prometheus +spec: + selector: + matchLabels: + app: gitlab-runner-gitlab-runner # target gitlab service + endpoints: + - port: metrics + interval: 15s