ユーザ用ツール

サイト用ツール


サイドバー



最近の更新



Tag Cloud

タグ#
8
10
1
3
1
2
17
7
1
1
4
13
4
1
2
279
1
8
2
7
17
5
1
30
3
3
1
6
1
1
44
1
3
3
1
1
1
1
1
1
32
46
7
9
10
7
10
3
3
2
9
2
2
6
6
1
1
5
10
4
3
3
2
1
8
2
4
1
6
30
2
12
2
3
1
1
2
3
1
1
2
4
3
2
4
2
2
1
1
2
1
2
1
2
1
27
2
1
2
2
2
1
1
2
3
15
5
8
1
1
2
14
2
6
1
2
12
1
2
1
1
4
10
1
6
2
1
6
1
3
3
11
1
2
1
1
10
3
1
14
1
1
4
1
2
1
2
9
2
2
3
1
1
3
1
2
1
2
2
2
1
2
3
1
4
3
4
1
3
1
3
3
2
1
1
30
1
3
3
1
1
1
3
5
1
35
2
3
2
1
2
2
3
1
1
1
4
1
2
1
3
1
1
1
2
5
2
5
2
1
1
1
5
3
2
4
2
1
2
1
19
1
1
3
4
1
1
2
1
1
2
1
1
1
1
2
1
1
1
1
1
9
6
1
3
1
1
3
1
1
1
1
2
1
1
1
1
1
1
2
01_linux:13_storage:29_ceph_dashboard

29 Ceph Dashboard

1. Ceph Dashboard enable

ceph mgr module enable dashboard

2. SSL無効

これで、8443 → 8080 ポートになる。

ceph config set mgr mgr/dashboard/ssl false
# ceph mgr services
{
    "dashboard": "http://ceph01:8080/",
}


===== 3.ユーザ設定 =====

user:admin, pass:adminxxxx, role:administratorで設定する場合

<code>
# ceph dashboard ac-user-create admin adminxxxx administrator
{"username": "admin", "lastUpdate": 1592953680, "name": null, "roles": ["administrator"], "password": "$2b$12$iOz46vkfT.zR62AmZXXXXXXXXXXXXXXXAlTOIx1Gz3az1CwqRlFe", "email": null}

4. prometheus + Grafana

これ以降はPrometheus と Grafanaで、Cephの状態を見たい時

①.prometheus

cephのモジュールprometheus exporterをenableへ

ceph mgr module enable prometheus

②.情報取得したいRBD設定

ceph config set mgr mgr/prometheus/rbd_stats_pools glance,cinder,nova

③.docker-compose

docker-composeでprometheusとgrafanaを作成

  mkdir /app/grafana
  # cat docker-compose.yml 
version: '3'
services:
  prometheus:
    image: prom/prometheus
    container_name: prometheus
    environment:
      TZ: Asia/Tokyo
    volumes:
      - ./prometheus:/etc/prometheus
      - ./prometheus/data:/prometheus/data
    command: "--config.file=/etc/prometheus/prometheus.yaml"
    network_mode: "host"
    ports:
      - 9090:9090
    restart: always
  grafana:
    image: grafana/grafana:7.3.0
    container_name: grafana
    environment:
      - TZ=Asia/Tokyo
      - GF_SECURITY_ADMIN_PASSWORD=admin
      - GF_INSTALL_PLUGINS=vonage-status-panel,grafana-piechart-panel,alexanderzobnin-zabbix-app
    ports:
      - 3000:3000
    volumes:
      - ./grafana/grafana.ini:/etc/grafana/grafana.ini
      - ./grafana/grafana.db:/var/lib/grafana/grafana.db
    restart: always
  node-exporter:
    image: prom/node-exporter
    container_name: node-exporter
    ports:
      - 9100:9100
    restart: always
chmod 777 prometheus/data

prometheus/prometheus.yaml

# cat prometheus/prometheus.yaml 
global:
  scrape_interval: 15s
  evaluation_interval: 15s

scrape_configs:
    - job_name: prometheus
      static_configs:
          - targets: ['localhost:9090']
    - job_name: 'ceph'
      honor_labels: true
      static_configs:
        - targets: ['ceph001:9283']
    - job_name: 'node'
      static_configs:
        - targets: ['ceph001:9100']
          labels:
            instance: "ceph001"
        - targets: ['ceph002:9100']
          labels:
            instance: "ceph002"
        - targets: ['ceph003:9100']
          labels:
            instance: "ceph003"
        - targets: ['ceph004:9100']
          labels:
            instance: "ceph004"
        - targets: ['ceph005:9100']
          labels:
            instance: "ceph005"
        - targets: ['ceph006:9100']
          labels:
            instance: "ceph006"
        - targets: ['ceph007:9100']
          labels:
            instance: "ceph007"
    - job_name: 'grafana'
      static_configs:
        - targets: ['ceph007:9100']
          labels:
            instance: "ceph007"

Grafana側は、anonymouse と allow_embeddingを有効にしておく

grafana/grafana.ini

# cat grafana/grafana.ini
[auth.anonymous]
enabled = true
org_name = Main Org.
org_role = Viewer

[security]
allow_embedding = true

5. 各node-exporter

# cat docker-compose.yml 
version: '3'
services:
  node-exporter:
    image: prom/node-exporter:v0.17.0
    container_name: node-exporter
    ports:
      - 9100:9100
    restart: always
    deploy:
      resources:
        limits:
          memory: 100m
01_linux/13_storage/29_ceph_dashboard.txt · 最終更新: 2021/07/23 17:14 by matsui

Yesterday:1310 Today:063 Total:145737