feat(loki): Add prometheus scraping

This commit is contained in:
Tanguy Herbron 2023-07-29 09:39:51 +02:00
parent a51063e828
commit 13c3b5962f
4 changed files with 18 additions and 0 deletions

View File

@ -22,6 +22,7 @@ spec:
imagePullPolicy: IfNotPresent imagePullPolicy: IfNotPresent
ports: ports:
- containerPort: 3100 - containerPort: 3100
name: http
volumeMounts: volumeMounts:
- name: loki-pv - name: loki-pv
mountPath: /loki mountPath: /loki

View File

@ -5,4 +5,5 @@ resources:
- pvc.yaml - pvc.yaml
- configmap.yaml - configmap.yaml
- service.yaml - service.yaml
- servicemonitor.yaml
- deployment.yaml - deployment.yaml

View File

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

View File

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