Setting admin user password for Grafana
By default, cephadm does not create an admin user for Grafana. With the Ceph
Orchestrator, you can create an admin user and set the password.
With these credentials, you can log in to the storage cluster’s Grafana URL with the given password for the admin user.
Prerequisites
-
A running IBM Storage Ceph cluster with the monitoring stack installed.
-
Root-level access to the
cephadmhost. -
The
dashboardmodule enabled.
Procedure
-
As a root user, create a
grafana.ymlfile and provide the following details:Syntax
service_type: grafana spec: initial_admin_password: PASSWORDExample
service_type: grafana spec: initial_admin_password: mypassword -
Mount the
grafana.ymlfile under a directory in the container:Example
[root@host01 ~]# cephadm shell --mount grafana.yml:/var/lib/ceph/grafana.ymlNOTE: Every time you exit the shell, you have to mount the file in the container before deploying the daemon.
-
Optional: Check if the
dashboardCeph Manager module is enabled:Example
[ceph: root@host01 /]# ceph mgr module ls -
Optional: Enable the
dashboardCeph Manager module:Example
[ceph: root@host01 /]# ceph mgr module enable dashboard -
Apply the specification using the
orchcommand:Syntax
ceph orch apply -i FILE_NAME.ymlExample
[ceph: root@host01 /]# ceph orch apply -i /var/lib/ceph/grafana.yml -
Redeploy
grafanaservice:Example
[ceph: root@host01 /]# ceph orch redeploy grafanaThis creates an admin user called
adminwith the given password and the user can log in to the Grafana URL with these credentials.
Verification
-
Log in to Grafana with the credentials:
Syntax
https://HOST_NAME: PORTExample
https://host01:3000/