このページの翻訳:
- 日本語 (ja)
- English (en)
最近の更新
- 03 Zed editor 設定 [Windowsでビルド]
- 09 ↷ 50_dialy:2025:09:09 から 50_dialy:2025:09:08 へページを名称変更しました。
- 06 ↷ 50_dialy:2025:06 から 50_dialy:2025:09:06 へページを移動しました。
最近の更新
ceph mgr module enable dashboard
これで、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}
これ以降はPrometheus と Grafanaで、Cephの状態を見たい時
cephのモジュールprometheus exporterをenableへ
ceph mgr module enable prometheus
ceph config set mgr mgr/prometheus/rbd_stats_pools glance,cinder,nova
docker-composeでprometheusとgrafanaを作成
mkdir /app/grafana # cat docker-compose.yml version: 039;3039; 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: [039;localhost:9090039;]
- job_name: 039;ceph039;
honor_labels: true
static_configs:
- targets: [039;ceph001:9283039;]
- job_name: 039;node039;
static_configs:
- targets: [039;ceph001:9100039;]
labels:
instance: "ceph001"
- targets: [039;ceph002:9100039;]
labels:
instance: "ceph002"
- targets: [039;ceph003:9100039;]
labels:
instance: "ceph003"
- targets: [039;ceph004:9100039;]
labels:
instance: "ceph004"
- targets: [039;ceph005:9100039;]
labels:
instance: "ceph005"
- targets: [039;ceph006:9100039;]
labels:
instance: "ceph006"
- targets: [039;ceph007:9100039;]
labels:
instance: "ceph007"
- job_name: 039;grafana039;
static_configs:
- targets: [039;ceph007:9100039;]
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
# cat docker-compose.yml version: 039;3039; services: node-exporter: image: prom/node-exporter:v0.17.0 container_name: node-exporter ports: - 9100:9100 restart: always deploy: resources: limits: memory: 100m