44 lines
1.0 KiB
YAML
44 lines
1.0 KiB
YAML
---
|
|
apiVersion: monitoring.coreos.com/v1
|
|
kind: ServiceMonitor
|
|
metadata:
|
|
name: pixelfed-monitoring
|
|
namespace: pixelfed-application
|
|
labels:
|
|
app: pixelfed
|
|
spec:
|
|
selector:
|
|
matchLabels:
|
|
app: pixelfed
|
|
component: web
|
|
endpoints:
|
|
# Health/instance monitoring endpoint (always available)
|
|
- port: http
|
|
interval: 30s
|
|
path: /api/v1/instance
|
|
scheme: http
|
|
scrapeTimeout: 10s
|
|
# Prometheus metrics endpoint (if available)
|
|
- port: http
|
|
interval: 30s
|
|
path: /metrics
|
|
scheme: http
|
|
scrapeTimeout: 10s
|
|
---
|
|
# Additional ServiceMonitor for worker logs
|
|
apiVersion: monitoring.coreos.com/v1
|
|
kind: ServiceMonitor
|
|
metadata:
|
|
name: pixelfed-worker-monitoring
|
|
namespace: pixelfed-application
|
|
labels:
|
|
app: pixelfed
|
|
component: worker
|
|
spec:
|
|
# For worker pods, we'll monitor via pod selector since there's no service
|
|
selector:
|
|
matchLabels:
|
|
app: pixelfed
|
|
component: worker
|
|
# Note: Workers don't expose HTTP endpoints, but this enables log collection
|
|
endpoints: [] |