## Current Limitations
- Currently, metrics are only *displayed* for `osd` and `rgw` hosts.
-- Authentication for grafana and graphite is fixed and creates a user `admin` with password `admin`.
- Services are deployed on the dashboard host directly; there is not yet support for a containerized deployment.
## Usage
tasks:
- name: Print dashboard URL
debug:
- msg: "All done! You may access your dashboard at http://{{ groups['ceph-grafana'][0] }}:3000/ with user 'admin' and password 'admin'. Note that initially the dashboard will be incomplete; after a few minutes it should have enough data collected to function properly."
+ msg: "All done! You may access your dashboard at http://{{ groups['ceph-grafana'][0] }}:3000/ with your pre-defined user and password (admin/admin by default). Note that initially the dashboard will be incomplete; after a few minutes it should have enough data collected to function properly."
# version currently only applies to containers
version: 5.0.4
datasource: Local
- # Note: changing this value won't update the password in Grafana itself;
- # change it via the web UI and then override this value to reflect.
- user: admin
+ # You need to change these in the web UI on an already deployed machine, first
+ # New deployments work fine
+ admin_user: admin
admin_password: admin
plugins:
- vonage-status-panel
value: "{{ ansible_fqdn }}"
tags: [ini]
+- name: Set admin_user in grafana.ini
+ ini_file:
+ path: /etc/grafana/grafana.ini
+ section: security
+ option: admin_user
+ value: "{{ grafana.admin_user }}"
+ no_log: true
+ tags: [ini]
+
- name: Set admin_password in grafana.ini
ini_file:
path: /etc/grafana/grafana.ini
uri:
url: http://localhost:3000/api/datasources
method: POST
- user: admin
+ user: "{{ grafana.admin_user }}"
password: "{{ grafana.admin_password }}"
force_basic_auth: yes
body_format: json
uri:
url: "http://localhost:3000/api/datasources/id/{{ grafana.datasource }}"
method: GET
- user: "{{ grafana.user }}"
+ user: "{{ grafana.admin_user }}"
password: "{{ grafana.admin_password }}"
force_basic_auth: yes
register: grafana_data_source_id
uri:
url: "http://localhost:3000/api/datasources/{{ grafana_data_source_id.json.id }}"
method: PUT
- user: "{{ grafana.user }}"
+ user: "{{ grafana.admin_user }}"
password: "{{ grafana.admin_password }}"
force_basic_auth: yes
body_format: json
uri:
url: "http://localhost:3000/api/dashboards/db/{{ item }}"
method: GET
- user: "{{ grafana.user }}"
+ user: "{{ grafana.admin_user }}"
password: "{{ grafana.admin_password }}"
force_basic_auth: yes
status_code: 200,404
uri:
url: "http://localhost:3000/api/dashboards/db"
method: POST
- user: "{{ grafana.user }}"
+ user: "{{ grafana.admin_user }}"
password: "{{ grafana.admin_password }}"
force_basic_auth: yes
status_code: 200
uri:
url: "http://localhost:3000/api/dashboards/db/ceph-at-a-glance"
method: GET
- user: "{{ grafana.user }}"
+ user: "{{ grafana.admin_user }}"
password: "{{ grafana.admin_password }}"
force_basic_auth: yes
status_code: 200
uri:
url: http://localhost:3000/api/org/preferences
method: PUT
- user: "{{ grafana.user }}"
+ user: "{{ grafana.admin_user }}"
password: "{{ grafana.admin_password }}"
force_basic_auth: yes
status_code: 200
- network-usage-by-node
- osd-node-detail
_credentials:
- user: admin
+ user: {{ grafana.admin_user }}
password: {{ grafana.admin_password }}
_grafana_port: 3000
_home_dashboard: ceph-at-a-glance