-
Notifications
You must be signed in to change notification settings - Fork 0
/
each_cluster.yaml
190 lines (166 loc) · 7.1 KB
/
each_cluster.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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
grafana:
enabled: false
# 기본 탑재된 Alert 대시보드가 prometheus에 저장된 alertmanager지표를 활용함. # false해도 무방.
# grafana 자체알람기능 사용시, alertmanager와 무관하게 prometheus의 일반 지표를 활용하는 것이 더 일반적
alertmanager:
enabled: true
###################################
# Each Cluster: Monitoring Target
###################################
## Deploy node exporter as a daemonset to all nodes
##
nodeExporter:
enabled: true
operatingSystems:
linux:
enabled: true
darwin:
enabled: false
# --set kube-prometheus-stack.prometheus.prometheusSpec.storageSpec.volumeClaimTemplate.metadata.name=data
# prometheus:
# prometheusSpec:
# storageSpec:
# volumeClaimTemplate:
# metadata:
# name: data
prometheus:
service:
type: LoadBalancer
prometheusSpec:
nodeSelector: {}
retention: 7d
additionalScrapeConfigs: []
# Prometheus가 exporter를 참조할 때 ServiceMonitor를 쓰지않고 수동연결하는 경우 설정
# # 단일 클러스터, kafka-exporter
# - job_name: kafka-metrics
# scrape_interval: 10s
# scrape_timeout: 5s
# metrics_path: "/metrics" # exporter 설정에서 정해진대로 써준다.
# static_configs:
# - targets:
# - test-kafka-metrics.default.svc.cluster.local:9308
# # 단일 클러스터, kafka-jmx
# - job_name: kafka-jmx
# scrape_interval: 10s
# scrape_timeout: 5s
# metrics_path: "/" # exporter 설정에서 정해진대로 써준다.
# static_configs:
# - targets:
# - test-kafka-jmx-metrics.default.svc.cluster.local:5556
# ingress 대신 그냥 ExternalIP:Port로 접속권장. 개별 클러스터마다 URL과 ingress controller 관리하기 번거로움
ingress:
enabled: false
# ingressClassName: traefik # k3s default ingress controller
annotations: {}
labels: {}
# servicePort: 8081
hosts: # []
- prometheus.test.wai
paths: []
# - /
# pathType: ImplementationSpecific
tls: []
## Configuration for prometheus-node-exporter subchart
##
prometheus-node-exporter:
hostRootFsMount:
enabled: true # WSL등 일부 환경에서 Node Exporter 이미지 실행에 문제발생시 false로 변경
# false 시, 일부 지표 수집불가할 수 있음. Production환경처럼 클린한 Ubuntu에선 보통 문제없으므로 기본 true
namespaceOverride: ""
podLabels:
## Add the 'node-exporter' label to be used by serviceMonitor to match standard common usage in rules and grafana dashboards
##
jobLabel: node-exporter
releaseLabel: true
extraArgs:
- --collector.filesystem.mount-points-exclude=^/(dev|proc|sys|var/lib/docker/.+|var/lib/kubelet/.+)($|/)
- --collector.filesystem.fs-types-exclude=^(autofs|binfmt_misc|bpf|cgroup2?|configfs|debugfs|devpts|devtmpfs|fusectl|hugetlbfs|iso9660|mqueue|nsfs|overlay|proc|procfs|pstore|rpc_pipefs|securityfs|selinuxfs|squashfs|sysfs|tracefs)$
service:
portName: http-metrics
prometheus:
monitor:
enabled: true
jobLabel: jobLabel
## Scrape interval. If not set, the Prometheus default scrape interval is used.
##
interval: ""
## SampleLimit defines per-scrape limit on number of scraped samples that will be accepted.
##
sampleLimit: 0
## TargetLimit defines a limit on the number of scraped targets that will be accepted.
##
targetLimit: 0
## Per-scrape limit on number of labels that will be accepted for a sample. Only valid in Prometheus versions 2.27.0 and newer.
##
labelLimit: 0
## Per-scrape limit on length of labels name that will be accepted for a sample. Only valid in Prometheus versions 2.27.0 and newer.
##
labelNameLengthLimit: 0
## Per-scrape limit on length of labels value that will be accepted for a sample. Only valid in Prometheus versions 2.27.0 and newer.
##
labelValueLengthLimit: 0
## How long until a scrape request times out. If not set, the Prometheus default scape timeout is used.
##
scrapeTimeout: ""
## proxyUrl: URL of a proxy that should be used for scraping.
##
proxyUrl: ""
## MetricRelabelConfigs to apply to samples after scraping, but before ingestion.
## ref: https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#relabelconfig
##
metricRelabelings: []
# - sourceLabels: [__name__]
# separator: ;
# regex: ^node_mountstats_nfs_(event|operations|transport)_.+
# replacement: $1
# action: drop
## RelabelConfigs to apply to samples before scraping
## ref: https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#relabelconfig
##
relabelings: []
# - sourceLabels: [__meta_kubernetes_pod_node_name]
# separator: ;
# regex: ^(.*)$
# targetLabel: nodename
# replacement: $1
# action: replace
rbac:
## If true, create PSPs for node-exporter
##
pspEnabled: false
prometheusOperator:
enabled: true
## Service account for Prometheus Operator to use.
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/
##
serviceAccount:
create: true # default: true
name: "" # default: ""
nodeSelector: {}
# 쿠버네티스 컴포넌트(ApiServer, kubelet, ...) 메트릭 수집 여부 (ServiceMonitor실행여부)
# default는 true이나, 메모리 부하가 상당하므로 필요치 않은 항목은 false처리 필요
# 여기서 false시, defaultRules섹션에서 해당규칙도 false해주면 좋다.
# (ServiceMonitor가 꺼져있는데 recording rule이 남아있으면, 무시가능한 수준으로 불필요한 계산부하 발생)
kubernetesServiceMonitors: ## 전체 On-Off
enabled: false # default: true
# 개별 On-Off
kubeApiServer: ## Component scraping the kube api server
enabled: true # default: true
kubelet: ## Component scraping the kubelet and kubelet-hosted cAdvisor
enabled: true # default: true
kubeControllerManager: ## Component scraping the kube controller manager
enabled: true # default: true
coreDns: ## Component scraping coreDns. Use either this or kubeDns
enabled: true # default: true
kubeDns: ## Component scraping kubeDns. Use either this or coreDns
enabled: false # default: false
kubeEtcd: ## Component scraping etcd
enabled: true # default: true
kubeScheduler: ## Component scraping kube scheduler
enabled: true # default: true
kubeProxy: ## Component scraping kube proxy
enabled: true # default: true
# kube-state-metrics subchart
# 쿠버네티스 리소스(Pod,Service,...)의 상태 메트릭 수집 여부
kubeStateMetrics: ## Component scraping kube state metrics
enabled: false # default: true