forked from kyma-project/kyma
-
Notifications
You must be signed in to change notification settings - Fork 0
/
service-monitor.yaml
30 lines (30 loc) · 1.22 KB
/
service-monitor.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
{{- if not .Values.global.disableLegacyConnectivity }}
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: {{ .Chart.Name }}
namespace: {{ .Values.global.integrationNamespace }}
labels:
prometheus: monitoring
app: {{ .Chart.Name }}
release: {{ .Release.Name }}
helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
app.kubernetes.io/name: {{ template "name" . }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
app.kubernetes.io/instance: {{ .Release.Name }}
spec:
selector:
matchLabels:
k8s-app: {{ .Chart.Name }}-metrics
targetLabels:
- k8s-app
endpoints:
- port: http-metrics
metricRelabelings:
- sourceLabels: [ __name__ ]
regex: ^(application_registry_endpoints_duration|application_registry_endpoints_responses|go_goroutines|go_memstats_alloc_bytes|go_memstats_heap_alloc_bytes|go_memstats_heap_inuse_bytes|go_memstats_heap_sys_bytes|go_memstats_stack_inuse_bytes|process_cpu_seconds_total|process_max_fds|process_open_fds|process_resident_memory_bytes|process_start_time_seconds|process_virtual_memory_bytes)$
action: keep
namespaceSelector:
matchNames:
- {{ .Values.global.integrationNamespace }}
{{- end }}