Skip to content

fix(infra): align rabbitmq servicemonitor with tls-only listener#3580

Draft
manamana32321 wants to merge 1 commit into
mainfrom
fix/rabbitmq-servicemonitor-tls-port
Draft

fix(infra): align rabbitmq servicemonitor with tls-only listener#3580
manamana32321 wants to merge 1 commit into
mainfrom
fix/rabbitmq-servicemonitor-tls-port

Conversation

@manamana32321
Copy link
Copy Markdown
Member

Description

grafana.stage.codedang.com에서 DatasourceNoData 알림 (RabbitMQ 메시지 적체 / RabbitMQ 미확인 메시지 적체)이 7일 연속 매일 firing되던 문제 해결.

Root cause

Fix

ServiceMonitor를 TLS 리스너와 정렬:

  • port: prometheusport: prometheus-tls
  • scheme: https + tlsConfig로 cert-manager 발급 CA 검증 (rabbitmq-server-certs/ca.crt)
  • serverName: rabbitmq.rabbitmq.svc (cert SAN과 매칭)

Additional context

라이브 검증 (stage)

  • 변경 전: up{job="rabbitmq-monitor"} 결과 0개, rabbitmq_queue_messages_ready 시리즈 없음
  • Pod IP:15692 직접 스크랩 시 메트릭 정상 (rabbitmq_queue_messages_ready 2) — Operator-managed Service의 포트 라우팅 단계에서만 끊겨있음 확인
  • 변경 후 ArgoCD sync 완료 후 up{job="rabbitmq-monitor"} == 1 + 알림 resolve 재확인 예정

연관 PR

Followup 필요


Before submitting the PR, please make sure you do the following

infra manifest 변경이라 unit test 대상 아님 — ArgoCD sync 후 up{job="rabbitmq-monitor"} == 1 라이브 검증으로 대체.

skkuding/codedang#3445에서 disableNonTLSListeners: true 가 머지된 뒤,
RabbitMQ Operator가 Service에서 비-TLS prometheus 포트(15692, name=prometheus)를
제거하고 TLS 포트(15691, name=prometheus-tls)만 노출하도록 변경됐다.

하지만 ServiceMonitor는 여전히 port: prometheus 로 매칭을 시도해
endpoint 0개 → Prometheus target 0개 → rabbitmq_queue_messages_* 메트릭 부재
→ Grafana DatasourceNoData 알림 7일 연속 firing 상태가 됐다.

ServiceMonitor를 prometheus-tls 포트 + HTTPS + tlsConfig (cert-manager 발급
CA 검증)으로 갱신해 TLS 전용 리스너와 정렬한다.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@manamana32321 manamana32321 self-assigned this May 24, 2026
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the RabbitMQ ServiceMonitor configuration to enable TLS for metrics scraping. It changes the endpoint port to prometheus-tls, sets the scheme to https, and adds a tlsConfig block referencing the rabbitmq-server-certs secret. I have no feedback to provide.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant