Skip to content

Commit

Permalink
kube-prometheus-stack 설치 & metric 수집
Browse files Browse the repository at this point in the history
  • Loading branch information
SuhwanJee committed Nov 24, 2024
1 parent 3b56737 commit 42d2056
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,19 @@ management:
exposure:
include: info,health,prometheus
metrics:
distribution:
percentiles-histogram:
http:
server:
requests: true # for latency percentile observability
web:
server:
auto-time-requests: true
max-uri-tags: 1024
server:
port: 18080


scc:
environment: local

Expand Down
9 changes: 6 additions & 3 deletions infra/helm/monitoring/Chart.lock
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
dependencies: []
digest: sha256:643d5437104296e21d906ecb15b2c96ad278f20cfc4af53b12bb6069bd853726
generated: "2024-11-22T22:57:18.411962+09:00"
dependencies:
- name: kube-prometheus-stack
repository: https://prometheus-community.github.io/helm-charts
version: 66.2.2
digest: sha256:7855ecc0807d0beaeeebd461445c9240083915f5aa0941890f3b1139b6c42603
generated: "2024-11-24T13:38:41.182278+09:00"
5 changes: 4 additions & 1 deletion infra/helm/monitoring/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,7 @@ version: 0.1.0
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "1.16.0"
dependencies: []
dependencies:
- name: kube-prometheus-stack
version: 66.2.2
repository: https://prometheus-community.github.io/helm-charts
15 changes: 15 additions & 0 deletions infra/helm/monitoring/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
kube-prometheus-stack:
grafana:
ingress:
enabled: true

hosts:
- grafana.staircrusher.club

# https://github.com/prometheus-operator/kube-prometheus/issues/1392#issuecomment-1411719953
prometheus:
prometheusSpec:
ruleSelectorNilUsesHelmValues: false
serviceMonitorSelectorNilUsesHelmValues: false
podMonitorSelectorNilUsesHelmValues: false
probeSelectorNilUsesHelmValues: false
1 change: 1 addition & 0 deletions infra/helm/scc-server/templates/service-monitor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ spec:
app.kubernetes.io/name: {{ include "scc-server.name" . }}
endpoints:
- port: metrics
path: /actuator/prometheus
1 change: 1 addition & 0 deletions infra/terraform/k3s/lightsail_lb.tf
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import {
id = "scc_lb,star.staircrusher.club"
}

// NOTE: 실제 DNS record는 AWS lightsail console에서 직접 수정해야 한다.
resource "aws_lightsail_lb_certificate" "scc_lb_cert" {
name = "star.staircrusher.club"
lb_name = aws_lightsail_lb.scc_lb.id
Expand Down

0 comments on commit 42d2056

Please sign in to comment.