Compare commits

...
Author SHA1 Message Date
BrunoGaoSZ df725fffa7 fix(observability): add ljwx-platform servicemonitor 2026-03-05 02:10:50 +01:00
2 changed files with 39 additions and 0 deletions
@@ -5,6 +5,7 @@ resources:
- deployment-screen.yaml
- deployment.yaml
- ingress.yaml
- servicemonitor.yaml
- service-admin-ui.yaml
- service-screen.yaml
- service.yaml
@@ -0,0 +1,38 @@
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: ljwx-platform
labels:
app: ljwx-platform
component: backend
release: prometheus
spec:
selector:
matchLabels:
app: ljwx-platform
namespaceSelector:
matchNames:
- ljwx-platform
endpoints:
- port: http
path: /actuator/prometheus
interval: 30s
scrapeTimeout: 10s
scheme: http
bearerTokenSecret:
name: ljwx-platform-metrics-token
key: token
relabelings:
- sourceLabels: [__meta_kubernetes_namespace]
targetLabel: namespace
action: replace
- sourceLabels: [__meta_kubernetes_pod_name]
targetLabel: pod
action: replace
- sourceLabels: [__meta_kubernetes_service_name]
targetLabel: service
action: replace
- sourceLabels: [__meta_kubernetes_service_label_app]
targetLabel: app
action: replace
jobLabel: app