]> git.proxmox.com Git - ceph.git/blame - ceph/doc/mgr/dashboard.rst
import ceph 15.2.14
[ceph.git] / ceph / doc / mgr / dashboard.rst
CommitLineData
11fdf7f2 1.. _mgr-dashboard:
31f18b77 2
11fdf7f2
TL
3Ceph Dashboard
4==============
5
6Overview
7--------
8
9The Ceph Dashboard is a built-in web-based Ceph management and monitoring
10application to administer various aspects and objects of the cluster. It is
11implemented as a :ref:`ceph-manager-daemon` module.
12
13The original Ceph Dashboard that was shipped with Ceph Luminous started
14out as a simple read-only view into various run-time information and performance
15data of a Ceph cluster. It used a very simple architecture to achieve the
16original goal. However, there was a growing demand for adding more web-based
17management capabilities, to make it easier to administer Ceph for users that
18prefer a WebUI over using the command line.
19
20The new :term:`Ceph Dashboard` module is a replacement of the previous one and
21adds a built-in web based monitoring and administration application to the Ceph
9f95a23c 22Manager. The architecture and functionality of this new module is derived from
11fdf7f2
TL
23and inspired by the `openATTIC Ceph management and monitoring tool
24<https://openattic.org/>`_. The development is actively driven by the team
25behind openATTIC at `SUSE <https://www.suse.com/>`_, with a lot of support from
26companies like `Red Hat <https://redhat.com/>`_ and other members of the Ceph
27community.
28
29The dashboard module's backend code uses the CherryPy framework and a custom
30REST API implementation. The WebUI implementation is based on
31Angular/TypeScript, merging both functionality from the original dashboard as
32well as adding new functionality originally developed for the standalone version
33of openATTIC. The Ceph Dashboard module is implemented as a web
34application that visualizes information and statistics about the Ceph cluster
35using a web server hosted by ``ceph-mgr``.
36
37Feature Overview
38^^^^^^^^^^^^^^^^
39
40The dashboard provides the following features:
41
42* **Multi-User and Role Management**: The dashboard supports multiple user
43 accounts with different permissions (roles). The user accounts and roles
9f95a23c
TL
44 can be modified on both the command line and via the WebUI. The dashboard
45 supports various methods to enhance password security, e.g. by enforcing
46 configurable password complexity rules, forcing users to change their password
47 after the first login or after a configurable time period. See
48 :ref:`dashboard-user-role-management` for details.
11fdf7f2
TL
49* **Single Sign-On (SSO)**: the dashboard supports authentication
50 via an external identity provider using the SAML 2.0 protocol. See
51 :ref:`dashboard-sso-support` for details.
52* **SSL/TLS support**: All HTTP communication between the web browser and the
53 dashboard is secured via SSL. A self-signed certificate can be created with
54 a built-in command, but it's also possible to import custom certificates
55 signed and issued by a CA. See :ref:`dashboard-ssl-tls-support` for details.
56* **Auditing**: the dashboard backend can be configured to log all PUT, POST
57 and DELETE API requests in the Ceph audit log. See :ref:`dashboard-auditing`
58 for instructions on how to enable this feature.
494da23a
TL
59* **Internationalization (I18N)**: the dashboard can be used in different
60 languages that can be selected at run-time.
11fdf7f2
TL
61
62Currently, Ceph Dashboard is capable of monitoring and managing the following
63aspects of your Ceph cluster:
64
494da23a 65* **Overall cluster health**: Display overall cluster status, performance
11fdf7f2
TL
66 and capacity metrics.
67* **Embedded Grafana Dashboards**: Ceph Dashboard is capable of embedding
e306af50
TL
68 `Grafana`_ dashboards in many locations, to display additional information
69 and performance metrics gathered by the :ref:`mgr-prometheus`. See
70 :ref:`dashboard-grafana` for details on how to configure this functionality.
494da23a
TL
71* **Cluster logs**: Display the latest updates to the cluster's event and
72 audit log files. Log entries can be filtered by priority, date or keyword.
73* **Hosts**: Display a list of all hosts associated to the cluster, which
9f95a23c
TL
74 disks are attached, which services are running and which version of Ceph is
75 installed.
494da23a 76* **Performance counters**: Display detailed service-specific statistics for
11fdf7f2 77 each running service.
494da23a 78* **Monitors**: List all MONs, their quorum status, open sessions.
9f95a23c
TL
79* **Monitoring**: Enable creation, re-creation, editing and expiration of
80 Prometheus' silences, list the alerting configuration of Prometheus and all
81 configured and firing alerts. Show notifications for firing alerts.
494da23a 82* **Configuration Editor**: Display all available configuration options,
11fdf7f2 83 their description, type and default values and edit the current values.
494da23a 84* **Pools**: List all Ceph pools and their details (e.g. applications,
9f95a23c
TL
85 pg-autoscaling, placement groups, replication size, EC profile, CRUSH
86 rulesets, quotas etc.)
494da23a
TL
87* **OSDs**: List all OSDs, their status and usage statistics as well as
88 detailed information like attributes (OSD map), metadata, performance
89 counters and usage histograms for read/write operations. Mark OSDs
90 up/down/out, purge and reweight OSDs, perform scrub operations, modify
91 various scrub-related configuration options, select different profiles to
9f95a23c
TL
92 adjust the level of backfilling activity. List all disks associated with an
93 OSD. Set and change the device class of an OSD, display and sort OSDs by
94 device class. Deploy new OSDs on new disks/hosts.
95* **Device management**: List all hosts known by the orchestrator. List all
96 disks and their properties attached to a node. Display disk health information
97 (health prediction and SMART data). Blink enclosure LEDs.
494da23a 98* **iSCSI**: List all hosts that run the TCMU runner service, display all
11fdf7f2 99 images and their performance characteristics (read/write ops, traffic).
9f95a23c
TL
100 Create, modify and delete iSCSI targets (via ``ceph-iscsi``). Display the
101 iSCSI gateway status on the landing page and info about active initiators.
102 See :ref:`dashboard-iscsi-management` for instructions on how to configure
103 this feature.
494da23a 104* **RBD**: List all RBD images and their properties (size, objects, features).
9f95a23c
TL
105 Create, copy, modify and delete RBD images (incl. snapshots) and manage RBD
106 namespaces. Define various I/O or bandwidth limitation settings on a global,
107 per-pool or per-image level. Create, delete and rollback snapshots of selected
108 images, protect/unprotect these snapshots against modification. Copy or clone
109 snapshots, flatten cloned images.
11fdf7f2
TL
110* **RBD mirroring**: Enable and configure RBD mirroring to a remote Ceph server.
111 Lists all active sync daemons and their status, pools and RBD images including
112 their synchronization state.
9f95a23c
TL
113* **CephFS**: List all active file system clients and associated pools,
114 including their usage statistics. Evict active CephFS clients. Manage CephFS
115 quotas and snapshots. Browse a CephFS directory structure.
494da23a 116* **Object Gateway**: List all active object gateways and their performance
11fdf7f2
TL
117 counters. Display and manage (add/edit/delete) object gateway users and their
118 details (e.g. quotas) as well as the users' buckets and their details (e.g.
9f95a23c
TL
119 placement targets, owner, quotas, versioning, multi-factor authentication).
120 See :ref:`dashboard-enabling-object-gateway` for configuration instructions.
121* **NFS**: Manage NFS exports of CephFS file systems and RGW S3 buckets via NFS
11fdf7f2
TL
122 Ganesha. See :ref:`dashboard-nfs-ganesha-management` for details on how to
123 enable this functionality.
124* **Ceph Manager Modules**: Enable and disable all Ceph Manager modules, change
125 the module-specific configuration settings.
126
127
128Supported Browsers
129^^^^^^^^^^^^^^^^^^
130
131Ceph Dashboard is primarily tested and developed using the following web
132browsers:
133
9f95a23c
TL
134+-----------------------------------------------+----------+
135| Browser | Versions |
136+===============================================+==========+
137| `Chrome <https://www.google.com/chrome/>`_ | 68+ |
138+-----------------------------------------------+----------+
139| `Firefox <https://www.mozilla.org/firefox/>`_ | 61+ |
140+-----------------------------------------------+----------+
11fdf7f2
TL
141
142While Ceph Dashboard might work in older browsers, we cannot guarantee it and
143recommend you to update your browser to the latest version.
224ce89b
WB
144
145Enabling
146--------
147
11fdf7f2
TL
148If you have installed ``ceph-mgr-dashboard`` from distribution packages, the
149package management system should have taken care of installing all the required
150dependencies.
151
152If you're installing Ceph from source and want to start the dashboard from your
153development environment, please see the files ``README.rst`` and ``HACKING.rst``
154in directory ``src/pybind/mgr/dashboard`` of the source code.
224ce89b 155
11fdf7f2
TL
156Within a running Ceph cluster, the Ceph Dashboard is enabled with::
157
158 $ ceph mgr module enable dashboard
224ce89b
WB
159
160Configuration
161-------------
162
11fdf7f2
TL
163.. _dashboard-ssl-tls-support:
164
165SSL/TLS Support
166^^^^^^^^^^^^^^^
167
168All HTTP connections to the dashboard are secured with SSL/TLS by default.
169
170To get the dashboard up and running quickly, you can generate and install a
171self-signed certificate using the following built-in command::
172
173 $ ceph dashboard create-self-signed-cert
174
175Note that most web browsers will complain about such self-signed certificates
176and require explicit confirmation before establishing a secure connection to the
177dashboard.
178
179To properly secure a deployment and to remove the certificate warning, a
180certificate that is issued by a certificate authority (CA) should be used.
181
182For example, a key pair can be generated with a command similar to::
183
184 $ openssl req -new -nodes -x509 \
185 -subj "/O=IT/CN=ceph-mgr-dashboard" -days 3650 \
186 -keyout dashboard.key -out dashboard.crt -extensions v3_ca
187
188The ``dashboard.crt`` file should then be signed by a CA. Once that is done, you
189can enable it for all Ceph manager instances by running the following commands::
190
494da23a
TL
191 $ ceph dashboard set-ssl-certificate -i dashboard.crt
192 $ ceph dashboard set-ssl-certificate-key -i dashboard.key
11fdf7f2
TL
193
194If different certificates are desired for each manager instance for some reason,
195the name of the instance can be included as follows (where ``$name`` is the name
196of the ``ceph-mgr`` instance, usually the hostname)::
197
494da23a
TL
198 $ ceph dashboard set-ssl-certificate $name -i dashboard.crt
199 $ ceph dashboard set-ssl-certificate-key $name -i dashboard.key
224ce89b 200
11fdf7f2 201SSL can also be disabled by setting this configuration value::
31f18b77 202
11fdf7f2 203 $ ceph config set mgr mgr/dashboard/ssl false
31f18b77 204
11fdf7f2
TL
205This might be useful if the dashboard will be running behind a proxy which does
206not support SSL for its upstream servers or other situations where SSL is not
9f95a23c 207wanted or required. See :ref:`dashboard-proxy-configuration` for more details.
224ce89b 208
11fdf7f2 209.. warning::
224ce89b 210
11fdf7f2
TL
211 Use caution when disabling SSL as usernames and passwords will be sent to the
212 dashboard unencrypted.
224ce89b 213
11fdf7f2
TL
214
215.. note::
216
217 You need to restart the Ceph manager processes manually after changing the SSL
218 certificate and key. This can be accomplished by either running ``ceph mgr
219 fail mgr`` or by disabling and re-enabling the dashboard module (which also
220 triggers the manager to respawn itself)::
221
222 $ ceph mgr module disable dashboard
223 $ ceph mgr module enable dashboard
224
225Host Name and Port
226^^^^^^^^^^^^^^^^^^
227
228Like most web applications, dashboard binds to a TCP/IP address and TCP port.
229
230By default, the ``ceph-mgr`` daemon hosting the dashboard (i.e., the currently
231active manager) will bind to TCP port 8443 or 8080 when SSL is disabled.
232
233If no specific address has been configured, the web app will bind to ``::``,
224ce89b
WB
234which corresponds to all available IPv4 and IPv6 addresses.
235
11fdf7f2
TL
236These defaults can be changed via the configuration key facility on a
237cluster-wide level (so they apply to all manager instances) as follows::
238
239 $ ceph config set mgr mgr/dashboard/server_addr $IP
240 $ ceph config set mgr mgr/dashboard/server_port $PORT
241 $ ceph config set mgr mgr/dashboard/ssl_server_port $PORT
242
243Since each ``ceph-mgr`` hosts its own instance of dashboard, it may also be
244necessary to configure them separately. The IP address and port for a specific
245manager instance can be changed with the following commands::
246
247 $ ceph config set mgr mgr/dashboard/$name/server_addr $IP
248 $ ceph config set mgr mgr/dashboard/$name/server_port $PORT
249 $ ceph config set mgr mgr/dashboard/$name/ssl_server_port $PORT
250
251Replace ``$name`` with the ID of the ceph-mgr instance hosting the dashboard web
252app.
253
254.. note::
255
256 The command ``ceph mgr services`` will show you all endpoints that are
257 currently configured. Look for the ``dashboard`` key to obtain the URL for
258 accessing the dashboard.
259
260Username and Password
261^^^^^^^^^^^^^^^^^^^^^
262
263In order to be able to log in, you need to create a user account and associate
264it with at least one role. We provide a set of predefined *system roles* that
265you can use. For more details please refer to the `User and Role Management`_
266section.
267
268To create a user with the administrator role you can use the following
269commands::
270
cd265ab1 271 $ ceph dashboard ac-user-create <username> -i <file-containing-password> administrator
11fdf7f2 272
adb31ebb
TL
273Account Lock-out
274^^^^^^^^^^^^^^^^
275
276It disables a user account if a user repeatedly enters the wrong credentials
277for multiple times. It is enabled by default to prevent brute-force or dictionary
278attacks. The user can get or set the default number of lock-out attempts using
279these commands respectively::
280
281 $ ceph dashboard get-account-lockout-attempts
282 $ ceph dashboard set-account-lockout-attempts <value:int>
283
284.. warning::
285
286 This feature can be disabled by setting the default number of lock-out attempts to 0.
287 However, by disabling this feature, the account is more vulnerable to brute-force or
288 dictionary based attacks. This can be disabled by::
289
290 $ ceph dashboard set-account-lockout-attempts 0
291
292Enable a Locked User
293^^^^^^^^^^^^^^^^^^^^
294
295If a user account is disabled as a result of multiple invalid login attempts, then
296it needs to be manually enabled by the administrator. This can be done by the following
297command::
298
299 $ ceph dashboard ac-user-enable <username>
300
9f95a23c
TL
301Accessing the Dashboard
302^^^^^^^^^^^^^^^^^^^^^^^
303
304You can now access the dashboard using your (JavaScript-enabled) web browser, by
305pointing it to any of the host names or IP addresses and the selected TCP port
306where a manager instance is running: e.g., ``http(s)://<$IP>:<$PORT>/``.
307
308You should then be greeted by the dashboard login page, requesting your
309previously defined username and password.
310
11fdf7f2
TL
311.. _dashboard-enabling-object-gateway:
312
313Enabling the Object Gateway Management Frontend
314^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
315
316To use the Object Gateway management functionality of the dashboard, you will
317need to provide the login credentials of a user with the ``system`` flag
318enabled.
319
320If you do not have a user which shall be used for providing those credentials,
321you will also need to create one::
322
323 $ radosgw-admin user create --uid=<user_id> --display-name=<display_name> \
324 --system
325
326Take note of the keys ``access_key`` and ``secret_key`` in the output of this
327command.
328
329The credentials of an existing user can also be obtained by using
330`radosgw-admin`::
331
332 $ radosgw-admin user info --uid=<user_id>
333
334Finally, provide the credentials to the dashboard::
335
cd265ab1
TL
336 $ ceph dashboard set-rgw-api-access-key -i <file-containing-access-key>
337 $ ceph dashboard set-rgw-api-secret-key -i <file-containing-secret-key>
11fdf7f2 338
81eedcae
TL
339In a typical default configuration with a single RGW endpoint, this is all you
340have to do to get the Object Gateway management functionality working. The
341dashboard will try to automatically determine the host and port of the Object
342Gateway by obtaining this information from the Ceph Manager's service map.
11fdf7f2
TL
343
344If multiple zones are used, it will automatically determine the host within the
345master zone group and master zone. This should be sufficient for most setups,
346but in some circumstances you might want to set the host and port manually::
347
348 $ ceph dashboard set-rgw-api-host <host>
349 $ ceph dashboard set-rgw-api-port <port>
350
351In addition to the settings mentioned so far, the following settings do also
352exist and you may find yourself in the situation that you have to use them::
353
354 $ ceph dashboard set-rgw-api-scheme <scheme> # http or https
355 $ ceph dashboard set-rgw-api-admin-resource <admin_resource>
356 $ ceph dashboard set-rgw-api-user-id <user_id>
357
358If you are using a self-signed certificate in your Object Gateway setup, then
359you should disable certificate verification in the dashboard to avoid refused
360connections, e.g. caused by certificates signed by unknown CA or not matching
361the host name::
362
363 $ ceph dashboard set-rgw-api-ssl-verify False
364
365If the Object Gateway takes too long to process requests and the dashboard runs
366into timeouts, then you can set the timeout value to your needs::
367
368 $ ceph dashboard set-rest-requests-timeout <seconds>
369
370The default value is 45 seconds.
371
372.. _dashboard-iscsi-management:
373
374Enabling iSCSI Management
375^^^^^^^^^^^^^^^^^^^^^^^^^
376
81eedcae
TL
377The Ceph Dashboard can manage iSCSI targets using the REST API provided by the
378`rbd-target-api` service of the :ref:`ceph-iscsi`. Please make sure that it's
379installed and enabled on the iSCSI gateways.
380
381.. note::
9f95a23c 382
81eedcae
TL
383 The iSCSI management functionality of Ceph Dashboard depends on the latest
384 version 3 of the `ceph-iscsi <https://github.com/ceph/ceph-iscsi>`_ project.
385 Make sure that your operating system provides the correct version, otherwise
386 the dashboard won't enable the management features.
11fdf7f2
TL
387
388If ceph-iscsi REST API is configured in HTTPS mode and its using a self-signed
81eedcae 389certificate, then you need to configure the dashboard to avoid SSL certificate
11fdf7f2
TL
390verification when accessing ceph-iscsi API.
391
9f95a23c 392To disable API SSL verification run the following command::
11fdf7f2 393
9f95a23c 394 $ ceph dashboard set-iscsi-api-ssl-verification false
11fdf7f2
TL
395
396The available iSCSI gateways must be defined using the following commands::
397
9f95a23c 398 $ ceph dashboard iscsi-gateway-list
cd265ab1
TL
399 $ # Gateway URL format for a new gateway: <scheme>://<username>:<password>@<host>[:port]
400 $ ceph dashboard iscsi-gateway-add -i <file-containing-gateway-url> [<gateway_name>]
9f95a23c 401 $ ceph dashboard iscsi-gateway-rm <gateway_name>
11fdf7f2
TL
402
403
404.. _dashboard-grafana:
405
406Enabling the Embedding of Grafana Dashboards
407^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
408
e306af50
TL
409`Grafana`_ requires data from `Prometheus <https://prometheus.io/>`_. Although
410Grafana can use other data sources, the Grafana dashboards we provide contain
411queries that are specific to Prometheus. Our Grafana dashboards therefore
412require Prometheus as the data source. The Ceph :ref:`mgr-prometheus` also only
413exports its data in the Prometheus' common format. The Grafana dashboards rely
414on metric names from the Prometheus module and `Node exporter
415<https://prometheus.io/docs/guides/node-exporter/>`_. The Node exporter is a
416separate application that provides machine metrics.
417
418.. note::
419
420 Prometheus' security model presumes that untrusted users have access to the
421 Prometheus HTTP endpoint and logs. Untrusted users have access to all the
422 (meta)data Prometheus collects that is contained in the database, plus a
423 variety of operational and debugging information.
424
425 However, Prometheus' HTTP API is limited to read-only operations.
426 Configurations can *not* be changed using the API and secrets are not
427 exposed. Moreover, Prometheus has some built-in measures to mitigate the
428 impact of denial of service attacks.
429
430 Please see `Prometheus' Security model
431 <https://prometheus.io/docs/operating/security/>` for more detailed
432 information.
433
11fdf7f2
TL
434Grafana and Prometheus are likely going to be bundled and installed by some
435orchestration tools along Ceph in the near future, but currently, you will have
436to install and configure both manually. After you have installed Prometheus and
437Grafana on your preferred hosts, proceed with the following steps.
438
9f95a23c 4391. Enable the Ceph Exporter which comes as Ceph Manager module by running::
11fdf7f2
TL
440
441 $ ceph mgr module enable prometheus
442
494da23a 443More details can be found in the documentation of the :ref:`mgr-prometheus`.
11fdf7f2 444
9f95a23c 4452. Add the corresponding scrape configuration to Prometheus. This may look
11fdf7f2
TL
446 like::
447
9f95a23c
TL
448 global:
449 scrape_interval: 5s
450
451 scrape_configs:
452 - job_name: 'prometheus'
453 static_configs:
454 - targets: ['localhost:9090']
455 - job_name: 'ceph'
456 static_configs:
457 - targets: ['localhost:9283']
458 - job_name: 'node-exporter'
459 static_configs:
460 - targets: ['localhost:9100']
11fdf7f2 461
9f95a23c 4623. Add Prometheus as data source to Grafana
11fdf7f2 463
9f95a23c 4644. Install the `vonage-status-panel and grafana-piechart-panel` plugins using::
11fdf7f2 465
9f95a23c
TL
466 grafana-cli plugins install vonage-status-panel
467 grafana-cli plugins install grafana-piechart-panel
11fdf7f2 468
9f95a23c 4695. Add the Dashboards to Grafana:
11fdf7f2 470
9f95a23c
TL
471 Dashboards can be added to Grafana by importing dashboard jsons.
472 Following command can be used for downloading json files::
11fdf7f2 473
9f95a23c 474 wget https://raw.githubusercontent.com/ceph/ceph/master/monitoring/grafana/dashboards/<Dashboard-name>.json
11fdf7f2 475
9f95a23c
TL
476 You can find all the dashboard jsons `here <https://github.com/ceph/ceph/tree/
477 master/monitoring/grafana/dashboards>`_ .
11fdf7f2 478
9f95a23c 479 For Example, for ceph-cluster overview you can use::
11fdf7f2 480
9f95a23c 481 wget https://raw.githubusercontent.com/ceph/ceph/master/monitoring/grafana/dashboards/ceph-cluster.json
11fdf7f2 482
9f95a23c 4836. Configure Grafana in `/etc/grafana/grafana.ini` to adapt anonymous mode::
11fdf7f2 484
9f95a23c
TL
485 [auth.anonymous]
486 enabled = true
487 org_name = Main Org.
488 org_role = Viewer
11fdf7f2 489
9f95a23c
TL
490 In newer versions of Grafana (starting with 6.2.0-beta1) a new setting named
491 ``allow_embedding`` has been introduced. This setting needs to be explicitly
492 set to ``true`` for the Grafana integration in Ceph Dashboard to work, as its
493 default is ``false``.
494
495 ::
496
497 [security]
498 allow_embedding = true
11fdf7f2 499
f91f0fd5
TL
500Enabling RBD-Image monitoring
501^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
502
503Due to performance reasons, monitoring of RBD images is disabled by default. For
504more information please see :ref:`prometheus-rbd-io-statistics`. If disabled,
505the overview and details dashboards will stay empty in Grafana and the metrics
506will not be visible in Prometheus.
507
11fdf7f2
TL
508After you have set up Grafana and Prometheus, you will need to configure the
509connection information that the Ceph Dashboard will use to access Grafana.
510
adb31ebb
TL
511You need to tell the dashboard on which URL the Grafana instance is
512running/deployed::
11fdf7f2
TL
513
514 $ ceph dashboard set-grafana-api-url <grafana-server-url> # default: ''
515
516The format of url is : `<protocol>:<IP-address>:<port>`
517
518.. note::
9f95a23c 519
11fdf7f2
TL
520 Ceph Dashboard embeds the Grafana dashboards via ``iframe`` HTML elements.
521 If Grafana is configured without SSL/TLS support, most browsers will block the
522 embedding of insecure content into a secured web page, if the SSL support in
523 the dashboard has been enabled (which is the default configuration). If you
524 can't see the embedded Grafana dashboards after enabling them as outlined
525 above, check your browser's documentation on how to unblock mixed content.
526 Alternatively, consider enabling SSL/TLS support in Grafana.
494da23a 527
92f5a8d4
TL
528If you are using a self-signed certificate in your Grafana setup, then you should
529disable certificate verification in the dashboard to avoid refused connections,
530e.g. caused by certificates signed by unknown CA or not matching the host name::
531
532 $ ceph dashboard set-grafana-api-ssl-verify False
533
11fdf7f2
TL
534You can directly access Grafana Instance as well to monitor your cluster.
535
adb31ebb
TL
536Alternative URL for Browsers
537^^^^^^^^^^^^^^^^^^^^^^^^^^^^
538
539The Ceph Dashboard backend requires the Grafana URL to be able to verify the
540existence of Grafana Dashboards before the frontend even loads them. Due to the
541nature of how Grafana is implemented in Ceph Dashboard, this means that two
542working connections are required in order to be able to see Grafana graphs in
543Ceph Dashboard:
544
545- The backend (Ceph Mgr module) needs to verify the existence of the requested
546 graph. If this request succeeds, it lets the frontend know that it can safely
547 access Grafana.
548- The frontend then requests the Grafana graphs directly from the user's
549 browser using an iframe. The Grafana instance is accessed directly without any
550 detour through Ceph Dashboard.
551
552Now, it might be the case that your environment makes it difficult for the
553user's browser to directly access the URL configured in Ceph Dashboard. To solve
554this issue, a separate URL can be configured which will solely be used to tell
555the frontend (the user's browser) which URL it should use to access Grafana.
556This setting won't ever be changed automatically, unlike the GRAFANA_API_URL
557which is set by :ref:`cephadm` (only if cephadm is used to deploy monitoring
558services).
559
560To change the URL that is returned to the frontend issue the following command::
561
562 $ ceph dashboard set-grafana-frontend-api-url <grafana-server-url>
563
564If no value is set for that option, it will simply fall back to the value of the
565GRAFANA_API_URL option. If set, it will instruct the browser to use this URL to
566access Grafana.
567
11fdf7f2
TL
568.. _dashboard-sso-support:
569
570Enabling Single Sign-On (SSO)
571^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
572
573The Ceph Dashboard supports external authentication of users via the
574`SAML 2.0 <https://en.wikipedia.org/wiki/SAML_2.0>`_ protocol. You need to create
575the user accounts and associate them with the desired roles first, as authorization
576is still performed by the Dashboard. However, the authentication process can be
577performed by an existing Identity Provider (IdP).
578
579.. note::
9f95a23c 580
11fdf7f2
TL
581 Ceph Dashboard SSO support relies on onelogin's
582 `python-saml <https://pypi.org/project/python-saml/>`_ library.
583 Please ensure that this library is installed on your system, either by using
584 your distribution's package management or via Python's `pip` installer.
585
586To configure SSO on Ceph Dashboard, you should use the following command::
587
588 $ ceph dashboard sso setup saml2 <ceph_dashboard_base_url> <idp_metadata> {<idp_username_attribute>} {<idp_entity_id>} {<sp_x_509_cert>} {<sp_private_key>}
589
590Parameters:
591
592* **<ceph_dashboard_base_url>**: Base URL where Ceph Dashboard is accessible (e.g., `https://cephdashboard.local`)
9f95a23c 593* **<idp_metadata>**: URL to remote (`http://`, `https://`) or local (`file://`) path or content of the IdP metadata XML (e.g., `https://myidp/metadata`, `file:///home/myuser/metadata.xml`).
11fdf7f2
TL
594* **<idp_username_attribute>** *(optional)*: Attribute that should be used to get the username from the authentication response. Defaults to `uid`.
595* **<idp_entity_id>** *(optional)*: Use this when more than one entity id exists on the IdP metadata.
9f95a23c 596* **<sp_x_509_cert> / <sp_private_key>** *(optional)*: File path of the certificate that should be used by Ceph Dashboard (Service Provider) for signing and encryption.
11fdf7f2
TL
597
598.. note::
9f95a23c 599
11fdf7f2
TL
600 The issuer value of SAML requests will follow this pattern: **<ceph_dashboard_base_url>**/auth/saml2/metadata
601
602To display the current SAML 2.0 configuration, use the following command::
603
604 $ ceph dashboard sso show saml2
605
606.. note::
9f95a23c 607
11fdf7f2
TL
608 For more information about `onelogin_settings`, please check the `onelogin documentation <https://github.com/onelogin/python-saml>`_.
609
610To disable SSO::
611
612 $ ceph dashboard sso disable
613
614To check if SSO is enabled::
615
616 $ ceph dashboard sso status
617
618To enable SSO::
619
620 $ ceph dashboard sso enable saml2
621
9f95a23c
TL
622.. _dashboard-alerting:
623
11fdf7f2
TL
624Enabling Prometheus Alerting
625^^^^^^^^^^^^^^^^^^^^^^^^^^^^
626
627Using Prometheus for monitoring, you have to define `alerting rules
628<https://prometheus.io/docs/prometheus/latest/configuration/alerting_rules>`_.
629To manage them you need to use the `Alertmanager
630<https://prometheus.io/docs/alerting/alertmanager>`_.
631If you are not using the Alertmanager yet, please `install it
632<https://github.com/prometheus/alertmanager#install>`_ as it's mandatory in
633order to receive and manage alerts from Prometheus.
634
635The Alertmanager capabilities can be consumed by the dashboard in three different
636ways:
637
638#. Use the notification receiver of the dashboard.
639
640#. Use the Prometheus Alertmanager API.
641
642#. Use both sources simultaneously.
643
644All three methods are going to notify you about alerts. You won't be notified
494da23a
TL
645twice if you use both sources, but you need to consume at least the Alertmanager API
646in order to manage silences.
11fdf7f2 647
9f95a23c 6481. Use the notification receiver of the dashboard
11fdf7f2 649
9f95a23c
TL
650 This allows you to get notifications as `configured
651 <https://prometheus.io/docs/alerting/configuration/>`_ from the Alertmanager.
652 You will get notified inside the dashboard once a notification is send out,
653 but you are not able to manage alerts.
11fdf7f2 654
9f95a23c
TL
655 Add the dashboard receiver and the new route to your Alertmanager
656 configuration. This should look like::
11fdf7f2 657
9f95a23c
TL
658 route:
659 receiver: 'ceph-dashboard'
660 ...
661 receivers:
662 - name: 'ceph-dashboard'
663 webhook_configs:
664 - url: '<url-to-dashboard>/api/prometheus_receiver'
11fdf7f2 665
494da23a 666
9f95a23c
TL
667 Please make sure that the Alertmanager considers your SSL certificate in terms
668 of the dashboard as valid. For more information about the correct
669 configuration checkout the `<http_config> documentation
670 <https://prometheus.io/docs/alerting/configuration/#%3Chttp_config%3E>`_.
11fdf7f2 671
9f95a23c 6722. Use the API of Prometheus and the Alertmanager
11fdf7f2 673
9f95a23c
TL
674 This allows you to manage alerts and silences. This will enable the "Active
675 Alerts", "All Alerts" as well as the "Silences" tabs in the "Monitoring"
676 section of the "Cluster" menu entry.
494da23a 677
9f95a23c
TL
678 Alerts can be sorted by name, job, severity, state and start time.
679 Unfortunately it's not possible to know when an alert was sent out through a
680 notification by the Alertmanager based on your configuration, that's why the
681 dashboard will notify the user on any visible change to an alert and will
682 notify the changed alert.
494da23a 683
9f95a23c
TL
684 Silences can be sorted by id, creator, status, start, updated and end time.
685 Silences can be created in various ways, it's also possible to expire them.
494da23a 686
9f95a23c 687 #. Create from scratch
494da23a 688
9f95a23c 689 #. Based on a selected alert
11fdf7f2 690
9f95a23c 691 #. Recreate from expired silence
11fdf7f2 692
9f95a23c 693 #. Update a silence (which will recreate and expire it (default Alertmanager behaviour))
11fdf7f2 694
9f95a23c 695 To use it, specify the host and port of the Alertmanager server::
11fdf7f2 696
9f95a23c 697 $ ceph dashboard set-alertmanager-api-host <alertmanager-host:port> # default: ''
11fdf7f2 698
9f95a23c 699 For example::
494da23a 700
9f95a23c 701 $ ceph dashboard set-alertmanager-api-host 'http://localhost:9093'
494da23a 702
9f95a23c
TL
703 To be able to see all configured alerts, you will need to configure the URL to
704 the Prometheus API. Using this API, the UI will also help you in verifying
705 that a new silence will match a corresponding alert.
494da23a 706
9f95a23c 707 ::
494da23a 708
9f95a23c 709 $ ceph dashboard set-prometheus-api-host <prometheus-host:port> # default: ''
11fdf7f2 710
9f95a23c 711 For example::
11fdf7f2 712
9f95a23c 713 $ ceph dashboard set-prometheus-api-host 'http://localhost:9090'
11fdf7f2 714
9f95a23c 715 After setting up the hosts, you have to refresh the dashboard in your browser window.
11fdf7f2 716
9f95a23c 7173. Use both methods
11fdf7f2 718
9f95a23c
TL
719 The different behaviors of both methods are configured in a way that they
720 should not disturb each other through annoying duplicated notifications
721 popping up.
11fdf7f2 722
cd265ab1
TL
723If you are using a self-signed certificate in your Prometheus or your
724Alertmanager setup, you should disable certificate verification in the
725dashboard to avoid refused connections, e.g. caused by certificates signed by
726unknown CA or not matching the host name.
727
728- For Prometheus::
729
730 $ ceph dashboard set-prometheus-api-ssl-verify False
731
732- For Alertmanager::
733
734 $ ceph dashboard set-alertmanager-api-ssl-verify False
735
11fdf7f2
TL
736.. _dashboard-user-role-management:
737
738User and Role Management
739------------------------
740
9f95a23c
TL
741Password Policy
742^^^^^^^^^^^^^^^
743
744By default the password policy feature is enabled including the following
745checks:
746
747- Is the password longer than N characters?
748- Are the old and new password the same?
749
750The password policy feature can be switched on or off completely::
751
752 $ ceph dashboard set-pwd-policy-enabled <true|false>
753
754The following individual checks can be switched on or off::
755
756 $ ceph dashboard set-pwd-policy-check-length-enabled <true|false>
757 $ ceph dashboard set-pwd-policy-check-oldpwd-enabled <true|false>
758 $ ceph dashboard set-pwd-policy-check-username-enabled <true|false>
759 $ ceph dashboard set-pwd-policy-check-exclusion-list-enabled <true|false>
760 $ ceph dashboard set-pwd-policy-check-complexity-enabled <true|false>
761 $ ceph dashboard set-pwd-policy-check-sequential-chars-enabled <true|false>
762 $ ceph dashboard set-pwd-policy-check-repetitive-chars-enabled <true|false>
763
764Additionally the following options are available to configure the password
765policy behaviour.
766
767- The minimum password length (defaults to 8)::
768
769 $ ceph dashboard set-pwd-policy-min-length <N>
770
771- The minimum password complexity (defaults to 10)::
772
773 $ ceph dashboard set-pwd-policy-min-complexity <N>
774
775 The password complexity is calculated by classifying each character in
776 the password. The complexity count starts by 0. A character is rated by
777 the following rules in the given order.
778
779 - Increase by 1 if the character is a digit.
780 - Increase by 1 if the character is a lower case ASCII character.
781 - Increase by 2 if the character is an upper case ASCII character.
782 - Increase by 3 if the character is a special character like ``!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~``.
783 - Increase by 5 if the character has not been classified by one of the previous rules.
784
785- A list of comma separated words that are not allowed to be used in a
786 password::
787
788 $ ceph dashboard set-pwd-policy-exclusion-list <word>[,...]
789
790
11fdf7f2
TL
791User Accounts
792^^^^^^^^^^^^^
793
794Ceph Dashboard supports managing multiple user accounts. Each user account
795consists of a username, a password (stored in encrypted form using ``bcrypt``),
796an optional name, and an optional email address.
797
9f95a23c
TL
798If a new user is created via Web UI, it is possible to set an option that this
799user must assign a new password when they log in for the first time.
800
11fdf7f2
TL
801User accounts are stored in MON's configuration database, and are globally
802shared across all ceph-mgr instances.
803
804We provide a set of CLI commands to manage user accounts:
805
806- *Show User(s)*::
807
808 $ ceph dashboard ac-user-show [<username>]
809
810- *Create User*::
811
cd265ab1 812 $ ceph dashboard ac-user-create [--enabled] [--force-password] [--pwd_update_required] <username> -i <file-containing-password> [<rolename>] [<name>] [<email>] [<pwd_expiration_date>]
9f95a23c
TL
813
814 To bypass the password policy checks use the `force-password` option.
815 Use the option `pwd_update_required` so that a newly created user has
816 to change their password after the first login.
11fdf7f2
TL
817
818- *Delete User*::
819
820 $ ceph dashboard ac-user-delete <username>
821
822- *Change Password*::
823
cd265ab1 824 $ ceph dashboard ac-user-set-password [--force-password] <username> -i <file-containing-password>
9f95a23c
TL
825
826- *Change Password Hash*::
827
cd265ab1 828 $ ceph dashboard ac-user-set-password-hash <username> -i <file-containing-password-hash>
9f95a23c
TL
829
830 The hash must be a bcrypt hash and salt, e.g. ``$2b$12$Pt3Vq/rDt2y9glTPSV.VFegiLkQeIpddtkhoFetNApYmIJOY8gau2``.
831 This can be used to import users from an external database.
11fdf7f2
TL
832
833- *Modify User (name, and email)*::
834
835 $ ceph dashboard ac-user-set-info <username> <name> <email>
836
9f95a23c
TL
837- *Disable User*::
838
839 $ ceph dashboard ac-user-disable <username>
840
841- *Enable User*::
842
843 $ ceph dashboard ac-user-enable <username>
11fdf7f2
TL
844
845User Roles and Permissions
846^^^^^^^^^^^^^^^^^^^^^^^^^^
847
848User accounts are also associated with a set of roles that define which
849dashboard functionality can be accessed by the user.
850
851The Dashboard functionality/modules are grouped within a *security scope*.
852Security scopes are predefined and static. The current available security
853scopes are:
854
855- **hosts**: includes all features related to the ``Hosts`` menu
856 entry.
857- **config-opt**: includes all features related to management of Ceph
858 configuration options.
859- **pool**: includes all features related to pool management.
860- **osd**: includes all features related to OSD management.
861- **monitor**: includes all features related to Monitor management.
862- **rbd-image**: includes all features related to RBD image
863 management.
864- **rbd-mirroring**: includes all features related to RBD-Mirroring
865 management.
866- **iscsi**: includes all features related to iSCSI management.
867- **rgw**: includes all features related to Rados Gateway management.
868- **cephfs**: includes all features related to CephFS management.
869- **manager**: include all features related to Ceph Manager
870 management.
871- **log**: include all features related to Ceph logs management.
872- **grafana**: include all features related to Grafana proxy.
873- **prometheus**: include all features related to Prometheus alert management.
874- **dashboard-settings**: allows to change dashboard settings.
875
876A *role* specifies a set of mappings between a *security scope* and a set of
877*permissions*. There are four types of permissions:
878
879- **read**
880- **create**
881- **update**
882- **delete**
883
884See below for an example of a role specification based on a Python dictionary::
885
886 # example of a role
887 {
888 'role': 'my_new_role',
889 'description': 'My new role',
890 'scopes_permissions': {
891 'pool': ['read', 'create'],
892 'rbd-image': ['read', 'create', 'update', 'delete']
893 }
894 }
895
896The above role dictates that a user has *read* and *create* permissions for
897features related to pool management, and has full permissions for
898features related to RBD image management.
899
900The Dashboard already provides a set of predefined roles that we call
901*system roles*, and can be used right away in a fresh Ceph Dashboard
902installation.
903
904The list of system roles are:
905
906- **administrator**: provides full permissions for all security scopes.
907- **read-only**: provides *read* permission for all security scopes except
908 the dashboard settings.
909- **block-manager**: provides full permissions for *rbd-image*,
910 *rbd-mirroring*, and *iscsi* scopes.
911- **rgw-manager**: provides full permissions for the *rgw* scope
912- **cluster-manager**: provides full permissions for the *hosts*, *osd*,
913 *monitor*, *manager*, and *config-opt* scopes.
914- **pool-manager**: provides full permissions for the *pool* scope.
915- **cephfs-manager**: provides full permissions for the *cephfs* scope.
916
917The list of currently available roles can be retrieved by the following
918command::
919
920 $ ceph dashboard ac-role-show [<rolename>]
921
922It is also possible to create new roles using CLI commands. The available
923commands to manage roles are the following:
924
925- *Create Role*::
926
927 $ ceph dashboard ac-role-create <rolename> [<description>]
928
929- *Delete Role*::
930
931 $ ceph dashboard ac-role-delete <rolename>
932
933- *Add Scope Permissions to Role*::
934
935 $ ceph dashboard ac-role-add-scope-perms <rolename> <scopename> <permission> [<permission>...]
936
937- *Delete Scope Permission from Role*::
938
9f95a23c 939 $ ceph dashboard ac-role-del-scope-perms <rolename> <scopename>
11fdf7f2
TL
940
941To associate roles to users, the following CLI commands are available:
942
943- *Set User Roles*::
944
945 $ ceph dashboard ac-user-set-roles <username> <rolename> [<rolename>...]
946
947- *Add Roles To User*::
948
949 $ ceph dashboard ac-user-add-roles <username> <rolename> [<rolename>...]
950
951- *Delete Roles from User*::
952
953 $ ceph dashboard ac-user-del-roles <username> <rolename> [<rolename>...]
954
955
956Example of User and Custom Role Creation
957^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
958
959In this section we show a full example of the commands that need to be used
960in order to create a user account, that should be able to manage RBD images,
961view and create Ceph pools, and have read-only access to any other scopes.
962
9631. *Create the user*::
964
cd265ab1 965 $ ceph dashboard ac-user-create bob -i <file-containing-password>
11fdf7f2
TL
966
9672. *Create role and specify scope permissions*::
968
969 $ ceph dashboard ac-role-create rbd/pool-manager
970 $ ceph dashboard ac-role-add-scope-perms rbd/pool-manager rbd-image read create update delete
971 $ ceph dashboard ac-role-add-scope-perms rbd/pool-manager pool read create
972
9733. *Associate roles to user*::
974
975 $ ceph dashboard ac-user-set-roles bob rbd/pool-manager read-only
976
9f95a23c 977.. _dashboard-proxy-configuration:
11fdf7f2 978
81eedcae
TL
979Proxy Configuration
980-------------------
981
982In a Ceph cluster with multiple ceph-mgr instances, only the dashboard running
983on the currently active ceph-mgr daemon will serve incoming requests. Accessing
984the dashboard's TCP port on any of the other ceph-mgr instances that are
985currently on standby will perform a HTTP redirect (303) to the currently active
986manager's dashboard URL. This way, you can point your browser to any of the
987ceph-mgr instances in order to access the dashboard.
988
989If you want to establish a fixed URL to reach the dashboard or if you don't want
990to allow direct connections to the manager nodes, you could set up a proxy that
991automatically forwards incoming requests to the currently active ceph-mgr
992instance.
993
81eedcae
TL
994Configuring a URL Prefix
995^^^^^^^^^^^^^^^^^^^^^^^^
3efd9988 996
b32b8144 997If you are accessing the dashboard via a reverse proxy configuration,
81eedcae 998you may wish to service it under a URL prefix. To get the dashboard
b32b8144
FG
999to use hyperlinks that include your prefix, you can set the
1000``url_prefix`` setting:
3efd9988 1001
b32b8144 1002::
3efd9988 1003
11fdf7f2 1004 ceph config set mgr mgr/dashboard/url_prefix $PREFIX
3efd9988 1005
b32b8144 1006so you can access the dashboard at ``http://$IP:$PORT/$PREFIX/``.
31f18b77 1007
eafe8130
TL
1008Disable the redirection
1009^^^^^^^^^^^^^^^^^^^^^^^
1010
1011If the dashboard is behind a load-balancing proxy like `HAProxy <https://www.haproxy.org/>`_
1012you might want to disable the redirection behaviour to prevent situations that
1013internal (unresolvable) URL's are published to the frontend client. Use the
1014following command to get the dashboard to respond with a HTTP error (500 by default)
1015instead of redirecting to the active dashboard::
1016
1017 $ ceph config set mgr mgr/dashboard/standby_behaviour "error"
1018
1019To reset the setting to the default redirection behaviour, use the following command::
1020
1021 $ ceph config set mgr mgr/dashboard/standby_behaviour "redirect"
1022
1023Configure the error status code
1024^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1025
1026When the redirection behaviour is disabled, then you want to customize the HTTP status
1027code of standby dashboards. To do so you need to run the command::
1028
1029 $ ceph config set mgr mgr/dashboard/standby_error_status_code 503
1030
1031HAProxy example configuration
1032^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1033
1034Below you will find an example configuration for SSL/TLS pass through using
1035`HAProxy <https://www.haproxy.org/>`_.
1036
1037Please note that the configuration works under the following conditions.
1038If the dashboard fails over, the front-end client might receive a HTTP redirect
1039(303) response and will be redirected to an unresolvable host. This happens when
1040the failover occurs during two HAProxy health checks. In this situation the
1041previously active dashboard node will now respond with a 303 which points to
1042the new active node. To prevent that situation you should consider to disable
1043the redirection behaviour on standby nodes.
1044
1045::
1046
1047 defaults
1048 log global
1049 option log-health-checks
1050 timeout connect 5s
1051 timeout client 50s
1052 timeout server 450s
1053
1054 frontend dashboard_front
1055 mode http
1056 bind *:80
1057 option httplog
1058 redirect scheme https code 301 if !{ ssl_fc }
1059
1060 frontend dashboard_front_ssl
1061 mode tcp
1062 bind *:443
1063 option tcplog
1064 default_backend dashboard_back_ssl
1065
1066 backend dashboard_back_ssl
1067 mode tcp
1068 option httpchk GET /
1069 http-check expect status 200
1070 server x <HOST>:<PORT> check-ssl check verify none
1071 server y <HOST>:<PORT> check-ssl check verify none
1072 server z <HOST>:<PORT> check-ssl check verify none
81eedcae 1073
11fdf7f2
TL
1074.. _dashboard-auditing:
1075
1076Auditing API Requests
1077---------------------
1078
1079The REST API is capable of logging PUT, POST and DELETE requests to the Ceph
1080audit log. This feature is disabled by default, but can be enabled with the
1081following command::
1082
1083 $ ceph dashboard set-audit-api-enabled <true|false>
1084
1085If enabled, the following parameters are logged per each request:
1086
1087* from - The origin of the request, e.g. https://[::1]:44410
1088* path - The REST API path, e.g. /api/auth
1089* method - e.g. PUT, POST or DELETE
1090* user - The name of the user, otherwise 'None'
1091
1092The logging of the request payload (the arguments and their values) is enabled
1093by default. Execute the following command to disable this behaviour::
1094
1095 $ ceph dashboard set-audit-api-log-payload <true|false>
1096
1097A log entry may look like this::
1098
1099 2018-10-22 15:27:01.302514 mgr.x [INF] [DASHBOARD] from='https://[::ffff:127.0.0.1]:37022' path='/api/rgw/user/klaus' method='PUT' user='admin' params='{"max_buckets": "1000", "display_name": "Klaus Mustermann", "uid": "klaus", "suspended": "0", "email": "klaus.mustermann@ceph.com"}'
1100
1101.. _dashboard-nfs-ganesha-management:
1102
1103NFS-Ganesha Management
1104----------------------
1105
1106Ceph Dashboard can manage `NFS Ganesha <http://nfs-ganesha.github.io/>`_ exports that use
1107CephFS or RadosGW as their backstore.
1108
1109To enable this feature in Ceph Dashboard there are some assumptions that need
1110to be met regarding the way NFS-Ganesha services are configured.
1111
1112The dashboard manages NFS-Ganesha config files stored in RADOS objects on the Ceph Cluster.
1113NFS-Ganesha must store part of their configuration in the Ceph cluster.
1114
1115These configuration files must follow some conventions.
11fdf7f2
TL
1116Each export block must be stored in its own RADOS object named
1117``export-<id>``, where ``<id>`` must match the ``Export_ID`` attribute of the
1118export configuration. Then, for each NFS-Ganesha service daemon there should
1119exist a RADOS object named ``conf-<daemon_id>``, where ``<daemon_id>`` is an
1120arbitrary string that should uniquely identify the daemon instance (e.g., the
1121hostname where the daemon is running).
1122Each ``conf-<daemon_id>`` object contains the RADOS URLs to the exports that
1123the NFS-Ganesha daemon should serve. These URLs are of the form::
1124
1125 %url rados://<pool_name>[/<namespace>]/export-<id>
1126
1127Both the ``conf-<daemon_id>`` and ``export-<id>`` objects must be stored in the
1128same RADOS pool/namespace.
1129
1130
1131Configuring NFS-Ganesha in the Dashboard
1132^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1133
1134To enable the management of NFS-Ganesha exports in Ceph Dashboard, we only
1135need to tell the Dashboard, in which RADOS pool and namespace the
1136configuration objects are stored. Then, Ceph Dashboard can access the objects
1137by following the naming convention described above.
1138
1139The Dashboard command to configure the NFS-Ganesha configuration objects
1140location is::
1141
1142 $ ceph dashboard set-ganesha-clusters-rados-pool-namespace <pool_name>[/<namespace>]
1143
1144After running the above command, Ceph Dashboard is able to find the NFS-Ganesha
1145configuration objects and we can start manage the exports through the Web UI.
1146
1147
1148Support for Multiple NFS-Ganesha Clusters
1149^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1150
1151Ceph Dashboard also supports the management of NFS-Ganesha exports belonging
1152to different NFS-Ganesha clusters. An NFS-Ganesha cluster is a group of
1153NFS-Ganesha service daemons sharing the same exports. Different NFS-Ganesha
1154clusters are independent and don't share the exports configuration between each
1155other.
1156
1157Each NFS-Ganesha cluster should store its configuration objects in a
1158different RADOS pool/namespace to isolate the configuration from each other.
1159
1160To specify the locations of the configuration of each NFS-Ganesha cluster we
1161can use the same command as above but with a different value pattern::
1162
1163 $ ceph dashboard set-ganesha-clusters-rados-pool-namespace <cluster_id>:<pool_name>[/<namespace>](,<cluster_id>:<pool_name>[/<namespace>])*
1164
1165The ``<cluster_id>`` is an arbitrary string that should uniquely identify the
1166NFS-Ganesha cluster.
1167
1168When configuring the Ceph Dashboard with multiple NFS-Ganesha clusters, the
1169Web UI will automatically allow to choose to which cluster an export belongs.
1170
1171
f91f0fd5
TL
1172Support for NFS-Ganesha Clusters Deployed by the Orchestrator
1173^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1174
1175Ceph Dashboard can be used to manage NFS-Ganesha clusters deployed by the
1176Orchestrator. It can detect the clusters automatically. For more details
1177on deploying NFS-Ganesha clusters with the Orchestrator, please see :ref:`orchestrator-cli-stateless-services`.
1178Or particularly, see :ref:`deploy-cephadm-nfs-ganesha` for how to deploy
1179NFS-Ganesha clusters with the Cephadm backend.
1180
1181
11fdf7f2
TL
1182Plug-ins
1183--------
1184
9f95a23c
TL
1185Dashboard Plug-ins extend the functionality of the dashboard in a modular
1186and loosely coupled fashion.
11fdf7f2 1187
e306af50
TL
1188.. _Grafana: https://grafana.com/
1189
11fdf7f2 1190.. include:: dashboard_plugins/feature_toggles.inc.rst
9f95a23c 1191.. include:: dashboard_plugins/debug.inc.rst
6d8e3169 1192.. include:: dashboard_plugins/motd.inc.rst
e306af50
TL
1193
1194
1195Troubleshooting the Dashboard
1196-----------------------------
1197
1198Locating the Dashboard
1199^^^^^^^^^^^^^^^^^^^^^^
1200
1201If you are unsure of the location of the Ceph Dashboard, run the following command::
1202
1203 $ ceph mgr services | jq .dashboard
1204 "https://host:port"
1205
1206The command returns the URL where the Ceph Dashboard is located: ``https://<host>:<port>/``
1207
1208.. note::
1209
1210 Many Ceph command line tools return results in JSON format. You may have to install
1211 the `jq <https://stedolan.github.io/jq>`_ command-line JSON processor utility on
1212 your operating system beforehand.
1213
1214
1215Accessing the Dashboard
1216^^^^^^^^^^^^^^^^^^^^^^^
1217
1218If you are unable to access the Ceph Dashboard, run through the following
1219commands:
1220
1221#. Verify the Ceph Dashboard module is enabled::
1222
1223 $ ceph mgr module ls | jq .enabled_modules
1224
1225 Ensure the Ceph Dashboard module is listed in the return value of the
1226 command. Example snipped output from the command above::
1227
1228 [
1229 "dashboard",
1230 "iostat",
1231 "restful"
1232 ]
1233
1234#. If it is not listed, activate the module with the following command::
1235
1236 $ ceph mgr module enable dashboard
1237
1238#. Check the Ceph Dashboard and/or mgr log file for any errors. The exact
1239 location of the log files depends on the Ceph configuration.
1240
1241 * Check if mgr log messages are written to a file by::
1242
1243 $ ceph config get mgr log_to_file
1244 true
1245
1246 * Get the location of the log file (it's ``/var/log/ceph/<cluster-name>-<daemon-name>.log``
1247 by default)::
1248
1249 $ ceph config get mgr log_file
1250 /var/log/ceph/$cluster-$name.log
1251
1252#. Ensure the SSL/TSL support is configured properly:
1253
1254 * Check if the SSL/TSL support is enabled::
1255
1256 $ ceph config get mgr mgr/dashboard/ssl
1257
1258 * If the command returns ``true``, verify a certificate exists by::
1259
1260 $ ceph config-key get mgr/dashboard/crt
1261
1262 and::
1263
1264 $ ceph config-key get mgr/dashboard/key
1265
1266 * If it doesn't, run the following command to generate a self-signed
1267 certificate or follow the instructions outlined in
1268 :ref:`dashboard-ssl-tls-support`::
1269
1270 $ ceph dashboard create-self-signed-cert
1271
1272
1273Trouble Logging into the Dashboard
1274^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1275
1276If you are unable to log into the Ceph Dashboard and you receive the following
1277error, run through the procedural checks below:
1278
1279.. image:: ../images/dashboard/invalid-credentials.png
1280 :align: center
1281
1282#. Check that your user credentials are correct. If you are seeing the
1283 notification message above when trying to log into the Ceph Dashboard, it
1284 is likely you are using the wrong credentials. Double check your username
1285 and password, and ensure the caps lock key is not enabled by accident.
1286
1287#. If your user credentials are correct, but you are experiencing the same
1288 error, check that the user account exists::
1289
1290 $ ceph dashboard ac-user-show <username>
1291
1292 This command returns your user data. If the user does not exist, it will
1293 print::
1294
1295 $ Error ENOENT: User <username> does not exist
1296
1297#. Check if the user is enabled::
1298
1299 $ ceph dashboard ac-user-show <username> | jq .enabled
1300 true
1301
1302 Check if ``enabled`` is set to ``true`` for your user. If not the user is
1303 not enabled, run::
1304
1305 $ ceph dashboard ac-user-enable <username>
1306
1307Please see :ref:`dashboard-user-role-management` for more information.
1308
1309
1310A Dashboard Feature is Not Working
1311^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1312
1313When an error occurs on the backend, you will usually receive an error
1314notification on the frontend. Run through the following scenarios to debug.
1315
1316#. Check the Ceph Dashboard/mgr logfile(s) for any errors. These can be
1317 identified by searching for keywords, such as *500 Internal Server Error*,
1318 followed by ``traceback``. The end of a traceback contains more details about
1319 what exact error occurred.
1320#. Check your web browser's Javascript Console for any errors.
1321
1322
1323Ceph Dashboard Logs
1324^^^^^^^^^^^^^^^^^^^
1325
1326Dashboard Debug Flag
1327''''''''''''''''''''
1328
1329With this flag enabled, traceback of errors are included in backend responses.
1330
1331To enable this flag via the Ceph Dashboard, navigate from *Cluster* to *Manager
1332modules*. Select *Dashboard module* and click the edit button. Click the
1333*debug* checkbox and update.
1334
1335To enable it via the CLI, run the following command::
1336
1337 $ ceph dashboard debug enable
1338
1339
1340Setting Logging Level of Dashboard Module
1341'''''''''''''''''''''''''''''''''''''''''
1342
1343Setting the logging level to debug makes the log more verbose and helpful for
1344debugging.
1345
1346#. Increase the logging level of manager daemons::
1347
1348 $ ceph tell mgr config set debug_mgr 20
1349
1350#. Adjust the logging level of the Ceph Dashboard module via the Dashboard or
1351 CLI:
1352
1353 * Navigate from *Cluster* to *Manager modules*. Select *Dashboard module*
1354 and click the edit button. Modify the ``log_level`` configuration.
1355 * To adjust it via the CLI, run the following command::
1356
1357 $ bin/ceph config set mgr mgr/dashboard/log_level debug