add prometheus monitoring

This commit is contained in:
Remy Moll 2023-12-24 13:44:22 +01:00
parent 1cd4df8b8f
commit 4cf26679c6
5 changed files with 20 additions and 5 deletions

View File

@ -26,7 +26,7 @@ spec:
entryPoints:
- websecure
routes:
- match: Host(`media-backend.kluster.moll.re`)
- match: Host(`media-backend.kluster.moll.re`) && !Path(`/metrics`)
middlewares:
- name: jellyfin-websocket
- name: jellyfin-server-headers

View File

@ -0,0 +1,14 @@
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: jellyfin
spec:
selector:
matchLabels:
app: jellyfin-server
endpoints:
- port: 8096
# this exposes metrics on port 8096 as enabled in the jellyfin config
# https://jellyfin.org/docs/general/networking/monitoring/
# the metrics are available at /metrics but blocked by the ingress

View File

@ -10,6 +10,7 @@ resources:
- web.deployment.yaml
- web.service.yaml
- ingress.yaml
- jellyfin.servicemonitor.yaml
images:
- name: jellyfin/jellyfin

View File

@ -6,6 +6,8 @@ spec:
entryPoints:
- websecure
routes:
# block the metrics endpoint
- match: Host(`git.kluster.moll.re`) && !Path(`/metrics`)
- match: Host(`git.kluster.moll.re`)
kind: Rule
services:

View File

@ -102,11 +102,9 @@ gitea:
## @param gitea.metrics.enabled Enable Gitea metrics
## @param gitea.metrics.serviceMonitor.enabled Enable Gitea metrics service monitor
metrics:
enabled: false
enabled: true
serviceMonitor:
enabled: false
# additionalLabels:
# prometheus-release: prom1
enabled: true
## @param gitea.config Configuration for the Gitea server,ref: [config-cheat-sheet](https://docs.gitea.io/en-us/config-cheat-sheet/)
config: