1
0
forked from baron/baron-sso

promtail, docker: Ory/Kratos 등 baron_ 접두사 없는 컨테이너의 job/service 라벨 누락으로 인한 Loki 전송 실패 오류 해결 (#1155)

This commit is contained in:
2026-06-16 10:31:53 +09:00
parent 64d48b9097
commit 2d1ae96e3e
2 changed files with 6 additions and 6 deletions

View File

@@ -32,10 +32,10 @@ scrape_configs:
regex: '/(.*)'
target_label: 'container_name'
# 4. 서비스 상세 라벨 부여 (baron_ 접두사 제거 등)
# 4. 서비스 상세 라벨 부여 (baron_ 접두사 제거 등, 접두사가 없는 경우 그대로 유지)
- source_labels: ['container_name']
regex: 'baron_(.*)'
regex: '(?:baron_)?(.*)'
target_label: 'service'
- source_labels: ['container_name']
regex: 'baron_(.*)'
regex: '(?:baron_)?(.*)'
target_label: 'job'

View File

@@ -140,12 +140,12 @@ scrape_configs:
- source_labels: ['container_name']
regex: '(baron_.*|oathkeeper|kratos|hydra|keto)'
action: keep
# 컨테이너 명에서 앞의 접두사를 떼어 서비스 및 잡 라벨 부여 (예: baron_backend -> backend)
# 컨테이너 명에서 앞의 접두사를 떼어 서비스 및 잡 라벨 부여 (예: baron_backend -> backend, kratos -> kratos)
- source_labels: ['container_name']
regex: 'baron_(.*)'
regex: '(?:baron_)?(.*)'
target_label: 'service'
- source_labels: ['container_name']
regex: 'baron_(.*)'
regex: '(?:baron_)?(.*)'
target_label: 'job'
# 동적 라벨 추가
- target_label: 'app_env'