Skip to main content

Ceph Monitoring


Dashboard

apiVersion: ceph.rook.io/v1
kind: CephCluster
spec:
mgr:
modules:
- name: rook
enabled: true

dashboard:
enabled: true
ssl: false
  • mgr
    • modules
      • {"name": "rook", "enabled": true}
        • rook 관리자 모듈을 활성화 합니다.
        • rook 관리자 모듈은 대시보드의 Physical Disks 섹션을 활성화시킵니다.
  • dashboard
    • enabled
    • ssl
info

Physical Disks 표시를 위해 rook 모듈을 활성화 한 경우 discovery daemon이 활성화 되어야 합니다.

rook-ceph-values.yaml
enableDiscoveryDaemon: true
discoveryDaemonInterval: 60m

discover:
tolerations:
- key: loliot.net/storage
operator: Exists

nodeAffinity: {}
podLabels: {}
resources: {}
kubectl rook-ceph ceph dashboard set-jwt-token-ttl 86400

Prometheus

Prometheus 생성

warning

Prometheus의 volume으로 Ceph을 사용하는 경우, Ceph에 문제가 생겨 해당 PV 접근이 안되면 Prometheus도 문제가 발생합니다.

Prometheus CRD

ServiceMonitor


  • MGR의 prometheus 모듈: 데몬들의 성능 counter를 제외한 모든 metrics을 노출시킵니다.
  • Ceph exporter: 데몬들의 성능 counter를 노출시킵니다.
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: rook-ceph-mgr
namespace: rook-ceph
labels:
loliot.net/prometheus: rook-ceph
spec:
namespaceSelector:
matchNames:
- rook-ceph
selector:
matchLabels:
app: rook-ceph-mgr
rook_cluster: rook-ceph
endpoints:
- port: http-metrics
path: /metrics
interval: 10s
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: rook-ceph-exporter
namespace: rook-ceph
labels:
loliot.net/prometheus: rook-ceph
spec:
namespaceSelector:
matchNames:
- rook-ceph
selector:
matchLabels:
app: rook-ceph-exporter
rook_cluster: rook-ceph
endpoints:
- port: ceph-exporter-http-metrics
path: /metrics
interval: 10s

Dashboard 설정

rook-ceph-values.yaml
monitoring:
enabled: false
  • monitoring
    • enabled
      • operator가 속한 namespace의 ServiceMonitor를 CRUD할 수 있는 Role을 생성하고 바인딩합니다.
      • ServiceMonitor를 직접 제어하려는 경우 false로 설정합니다.
apiVersion: ceph.rook.io/v1
kind: CephCluster
spec:
mgr:
modules:
- name: prometheus
enabled: true

dashboard:
prometheusEndpoint: http://prometheus-operated:9090
prometheusEndpointSSLVerify: false

monitoring:
enabled: false
  • monitoring
    • enabled
      • cluster가 속한 namespace의 ServiceMonitor를 CRUD할 수 있는 Role을 생성하고 바인딩합니다.
      • ServiceMonitor를 직접 제어하려는 경우 false로 설정합니다.