feat: Add cloudflare monitoring

This commit is contained in:
Tony Du 2025-02-18 15:21:42 -08:00
parent 3b3fa6f544
commit 51fd04b3bd
2 changed files with 72 additions and 0 deletions

View File

@ -130,3 +130,39 @@ data:
service: https://nc.mnke.org
# This rule matches any traffic which didn't match a previous rule, and responds with HTTP 404.
- service: http_status:404
---
apiVersion: v1
kind: Service
metadata:
name: cloudflared-mnke-metrics
namespace: default
labels:
app: cloudflared-mnke
spec:
ports:
- name: metrics
port: 80
protocol: TCP
targetPort: 2000
selector:
app: cloudflared-mnke
---
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: cloudflared-mnke-metrics
namespace: default
labels:
release: kube-prometheus-stack
spec:
jobLabel: cloudflared-mnke-metrics
selector:
matchLabels:
app: cloudflared-mnke
endpoints:
- interval: 30s
port: metrics
path: /metrics

View File

@ -104,3 +104,39 @@ data:
httpHostHeader: seerr.tonydu.me
# This rule matches any traffic which didn't match a previous rule, and responds with HTTP 404.
- service: http_status:404
---
apiVersion: v1
kind: Service
metadata:
name: cloudflared-tonydu-metrics
namespace: default
labels:
app: cloudflared-tonydu
spec:
ports:
- name: metrics
port: 80
protocol: TCP
targetPort: 2000
selector:
app: cloudflared-tonydu
---
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: cloudflared-tonydu-metrics
namespace: default
labels:
release: kube-prometheus-stack
spec:
jobLabel: cloudflared-tonydu-metrics
selector:
matchLabels:
app: cloudflared-tonydu
endpoints:
- interval: 30s
port: metrics
path: /metrics