feat(metrics): Add prometheus scraping

This commit is contained in:
Tanguy Herbron 2023-07-27 10:10:08 +02:00
parent dc0ee8d343
commit 8736eb62ab
4 changed files with 18 additions and 2 deletions

View File

@ -18,8 +18,7 @@ spec:
- 0 - 0
containers: containers:
- name: grafana - name: grafana
image: grafana/grafana:10.0.1 image: grafana/grafana:10.0.3
imagePullPolicy: IfNotPresent
ports: ports:
- containerPort: 3000 - containerPort: 3000
readinessProbe: readinessProbe:

View File

@ -5,6 +5,7 @@ resources:
- pvc.yaml - pvc.yaml
- service.yaml - service.yaml
- ingress.yaml - ingress.yaml
- servicemonitor.yaml
- database.yaml - database.yaml
- datasources.yaml - datasources.yaml
- deployment.yaml - deployment.yaml

View File

@ -3,6 +3,8 @@ kind: Service
metadata: metadata:
name: grafana-svc name: grafana-svc
namespace: monitoring namespace: monitoring
labels:
app.kubernetes.io/name: grafana
spec: spec:
ports: ports:
- name: http - name: http

View File

@ -0,0 +1,14 @@
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: grafana
namespace: monitoring
labels:
team: core
spec:
selector:
matchLabels:
app.kubernetes.io/name: grafana
endpoints:
- port: http
path: /metrics