2018-06-29 12:46:54 +00:00
.. _mgr-dashboard:
2019-02-28 14:10:42 +00:00
Ceph Dashboard
==============
2017-06-15 11:10:13 +00:00
2018-04-16 11:21:30 +00:00
Overview
--------
2019-02-28 14:10:42 +00:00
The Ceph Dashboard is a built-in web-based Ceph management and monitoring
2020-11-15 23:06:16 +00:00
application through which you can inspect and administer various aspects
and resources within the cluster. It is implemented as a :ref: `ceph-manager-daemon` module.
2019-02-28 14:10:42 +00:00
The original Ceph Dashboard that was shipped with Ceph Luminous started
2020-11-15 23:06:16 +00:00
out as a simple read-only view into run-time information and performance
data of Ceph clusters. It used a very simple architecture to achieve the
original goal. However, there was growing demand for richer web-based
2018-06-28 03:49:29 +00:00
management capabilities, to make it easier to administer Ceph for users that
2020-11-15 23:06:16 +00:00
prefer a WebUI over the CLI.
2018-06-28 03:49:29 +00:00
2020-11-15 23:06:16 +00:00
The new :term: `Ceph Dashboard` module adds web-based monitoring and
administration to the Ceph Manager. The architecture and functionality of this new
module are derived from
2019-02-28 14:10:42 +00:00
and inspired by the `openATTIC Ceph management and monitoring tool
2020-11-15 23:06:16 +00:00
<https://openattic.org/> `_. Development is actively driven by the
openATTIC team at `SUSE <https://www.suse.com/> `_ , with support from
companies including `Red Hat <https://redhat.com/> `_ and members of the Ceph
2019-02-28 14:10:42 +00:00
community.
2019-01-25 11:34:37 +00:00
2020-11-15 23:06:16 +00:00
The dashboard module's backend code uses the CherryPy framework and implements
a custom REST API. The WebUI implementation is based on
Angular/TypeScript and includes both functionality from the original dashboard
and new features originally developed for the standalone version
of openATTIC. The Ceph Dashboard module is implemented as an
application that provides a graphical representation of information and statistics
through a web server hosted by `` ceph-mgr `` .
2018-03-06 18:23:52 +00:00
2019-02-28 14:10:42 +00:00
Feature Overview
^^^^^^^^^^^^^^^^
The dashboard provides the following features:
2018-03-06 18:23:52 +00:00
2018-09-11 12:12:04 +00:00
* **Multi-User and Role Management** : The dashboard supports multiple user
2020-11-15 23:06:16 +00:00
accounts with different permissions (roles). User accounts and roles
can be managed via both the command line and the WebUI. The dashboard
supports various methods to enhance password security. Password
complexity rules may be configured, requiring users to change their password
2020-03-12 13:19:52 +00:00
after the first login or after a configurable time period. See
:ref: `dashboard-user-role-management` for details.
2020-11-15 23:06:16 +00:00
* **Single Sign-On (SSO)** : The dashboard supports authentication
2019-01-25 11:34:37 +00:00
via an external identity provider using the SAML 2.0 protocol. See
:ref: `dashboard-sso-support` for details.
2018-05-17 15:34:36 +00:00
* **SSL/TLS support** : All HTTP communication between the web browser and the
dashboard is secured via SSL. A self-signed certificate can be created with
a built-in command, but it's also possible to import custom certificates
2018-09-11 12:12:04 +00:00
signed and issued by a CA. See :ref: `dashboard-ssl-tls-support` for details.
2020-11-15 23:06:16 +00:00
* **Auditing** : The dashboard backend can be configured to log all `` PUT `` , `` POST ``
and `` DELETE `` API requests in the Ceph audit log. See :ref: `dashboard-auditing`
2019-01-25 11:34:37 +00:00
for instructions on how to enable this feature.
2020-11-15 23:06:16 +00:00
* **Internationalization (I18N)** : The language used for dashboard text can be
selected at run-time.
2019-02-28 14:10:42 +00:00
2020-11-15 23:06:16 +00:00
The Ceph Dashboard offers the following monitoring and management capabilities:
2019-02-28 14:10:42 +00:00
2020-11-15 23:06:16 +00:00
* **Overall cluster health** : Display performance and capacity metrics as well
as cluster status.
* **Embedded Grafana Dashboards** : Ceph Dashboard
`Grafana`_ dashboards may be embedded in external applications and web pages
to surface information and performance metrics gathered by
the :ref: `mgr-prometheus` module. See
2020-05-05 12:16:36 +00:00
:ref: `dashboard-grafana` for details on how to configure this functionality.
2019-05-22 10:55:47 +00:00
* **Cluster logs** : Display the latest updates to the cluster's event and
audit log files. Log entries can be filtered by priority, date or keyword.
2020-11-15 23:06:16 +00:00
* **Hosts** : Display a list of all cluster hosts along with their
storage drives, which services are running, and which version of Ceph is
2020-03-12 13:19:52 +00:00
installed.
2019-05-22 10:55:47 +00:00
* **Performance counters** : Display detailed service-specific statistics for
2018-03-06 18:23:52 +00:00
each running service.
2020-11-15 23:06:16 +00:00
* **Monitors** : List all Mons, their quorum status, and open sessions.
* **Monitoring** : Enable creation, re-creation, editing, and expiration of
Prometheus' silences, list the alerting configuration and all
2020-03-12 13:19:52 +00:00
configured and firing alerts. Show notifications for firing alerts.
2019-05-22 10:55:47 +00:00
* **Configuration Editor** : Display all available configuration options,
2020-11-15 23:06:16 +00:00
their descriptions, types, default and currently set values. These may be edited as well.
* **Pools** : List Ceph pools and their details (e.g. applications,
2020-03-12 13:19:52 +00:00
pg-autoscaling, placement groups, replication size, EC profile, CRUSH
2021-06-26 15:23:38 +00:00
rules, quotas etc.)
2020-11-15 23:06:16 +00:00
* **OSDs** : List OSDs, their status and usage statistics as well as
2019-05-22 10:55:47 +00:00
detailed information like attributes (OSD map), metadata, performance
counters and usage histograms for read/write operations. Mark OSDs
up/down/out, purge and reweight OSDs, perform scrub operations, modify
2020-11-15 23:06:16 +00:00
various scrub-related configuration options, select profiles to
adjust the level of backfilling activity. List all drives associated with an
2020-03-12 13:19:52 +00:00
OSD. Set and change the device class of an OSD, display and sort OSDs by
2020-11-15 23:06:16 +00:00
device class. Deploy OSDs on new drives and hosts.
2020-03-12 13:19:52 +00:00
* **Device management** : List all hosts known by the orchestrator. List all
2020-11-15 23:06:16 +00:00
drives attached to a host and their properties. Display drive
health predictions and SMART data. Blink enclosure LEDs.
2019-05-22 10:55:47 +00:00
* **iSCSI** : List all hosts that run the TCMU runner service, display all
2018-03-06 18:23:52 +00:00
images and their performance characteristics (read/write ops, traffic).
2020-11-15 23:06:16 +00:00
Create, modify, and delete iSCSI targets (via `` ceph-iscsi `` ). Display the
iSCSI gateway status and info about active initiators.
2020-03-12 13:19:52 +00:00
See :ref: `dashboard-iscsi-management` for instructions on how to configure
this feature.
2019-05-22 10:55:47 +00:00
* **RBD** : List all RBD images and their properties (size, objects, features).
2020-03-12 13:19:52 +00:00
Create, copy, modify and delete RBD images (incl. snapshots) and manage RBD
namespaces. Define various I/O or bandwidth limitation settings on a global,
per-pool or per-image level. Create, delete and rollback snapshots of selected
images, protect/unprotect these snapshots against modification. Copy or clone
snapshots, flatten cloned images.
2019-01-25 11:34:37 +00:00
* **RBD mirroring** : Enable and configure RBD mirroring to a remote Ceph server.
2020-11-15 23:06:16 +00:00
List active daemons and their status, pools and RBD images including
sync progress.
* **CephFS** : List active file system clients and associated pools,
including usage statistics. Evict active CephFS clients. Manage CephFS
2020-03-12 13:19:52 +00:00
quotas and snapshots. Browse a CephFS directory structure.
2019-05-22 10:55:47 +00:00
* **Object Gateway** : List all active object gateways and their performance
2018-05-02 13:49:51 +00:00
counters. Display and manage (add/edit/delete) object gateway users and their
details (e.g. quotas) as well as the users' buckets and their details (e.g.
2020-03-12 13:19:52 +00:00
placement targets, owner, quotas, versioning, multi-factor authentication).
See :ref: `dashboard-enabling-object-gateway` for configuration instructions.
2019-09-09 19:36:04 +00:00
* **NFS** : Manage NFS exports of CephFS file systems and RGW S3 buckets via NFS
2019-02-28 14:10:42 +00:00
Ganesha. See :ref: `dashboard-nfs-ganesha-management` for details on how to
enable this functionality.
2020-11-15 23:06:16 +00:00
* **Ceph Manager Modules** : Enable and disable Ceph Manager modules, manage
module-specific configuration settings.
2019-02-28 14:10:42 +00:00
2020-08-26 07:37:06 +00:00
Overview of the Dashboard Landing Page
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2020-11-15 23:06:16 +00:00
Displays overall cluster status, performance, and capacity metrics. Shows instant
feedback for changes in the cluster and provides easy access to subpages of the
2020-08-26 07:37:06 +00:00
dashboard.
2020-07-07 10:43:49 +00:00
.. _dashboard-landing-page-status:
2020-08-26 07:37:06 +00:00
Status
""""""
* **Cluster Status** : Displays overall cluster health. In case of any error it
displays a short description of the error and provides a link to the logs.
* **Hosts** : Displays the total number of hosts associated to the cluster and
2020-11-15 23:06:16 +00:00
links to a subpage that lists and describes each.
* **Monitors** : Displays mons and their quorum status and
open sessions. Links to a subpage that lists and describes each.
* **OSDs** : Displays object storage daemons (ceph-osds) and
the numbers of OSDs running (up), in service
(in), and out of the cluster (out). Provides links to
subpages providing a list of all OSDs and related management actions.
* **Managers** : Displays active and standby Ceph Manager
daemons (ceph-mgr).
* **Object Gateway** : Displays active object gateways (RGWs) and
provides links to subpages that list all object gateway daemons.
* **Metadata Servers** : Displays active and standby CephFS metadata
service daemons (ceph-mds).
* **iSCSI Gateways** : Display iSCSI gateways available,
active (up), and inactive (down). Provides a link to a subpage
showing a list of all iSCSI Gateways.
2020-08-26 07:37:06 +00:00
2020-07-07 10:43:49 +00:00
.. _dashboard-landing-page-capacity:
2020-08-26 07:37:06 +00:00
Capacity
""""""""
2020-11-15 23:06:16 +00:00
* **Raw Capacity** : Displays the capacity used out of the total
physical capacity provided by storage nodes (OSDs).
* **Objects** : Displays the number and status of RADOS objects
including the percentages of healthy, misplaced, degraded, and unfound
objects.
* **PG Status** : Displays the total number of placement groups and
their status, including the percentage clean, working,
warning, and unknown.
* **Pools** : Displays pools and links to a subpage listing details.
* **PGs per OSD** : Displays the number of placement groups assigned to
object storage daemons.
2020-08-26 07:37:06 +00:00
2020-07-07 10:43:49 +00:00
.. _dashboard-landing-page-performance:
2020-08-26 07:37:06 +00:00
Performance
"""""""""""
2020-11-15 23:06:16 +00:00
* **Client READ/Write** : Displays an overview of
client input and output operations.
* **Client Throughput** : Displays the data transfer rates to and from Ceph clients.
* **Recovery throughput** : Displays rate of cluster healing and balancing operations.
* **Scrubbing** : Displays light and deep scrub status.
2019-02-28 14:10:42 +00:00
Supported Browsers
^^^^^^^^^^^^^^^^^^
Ceph Dashboard is primarily tested and developed using the following web
browsers:
2020-08-13 13:46:56 +00:00
+---------------------------------------------------------------+---------------------------------------+
| Browser | Versions |
+===============================================================+=======================================+
| `Chrome <https://www.google.com/chrome/> `_ and | latest 2 major versions |
| `Chromium <https://www.chromium.org/> `_ based browsers | |
+---------------------------------------------------------------+---------------------------------------+
| `Firefox <https://www.mozilla.org/firefox/> `_ | latest 2 major versions |
+---------------------------------------------------------------+---------------------------------------+
| `Firefox ESR <https://www.mozilla.org/firefox/enterprise/> `_ | latest major version |
+---------------------------------------------------------------+---------------------------------------+
2019-02-28 14:10:42 +00:00
2020-11-15 23:06:16 +00:00
While Ceph Dashboard might work in older browsers, we cannot guarantee compatibility and
recommend keeping your browser up to date.
2017-07-10 13:48:50 +00:00
Enabling
--------
2019-03-07 14:31:17 +00:00
If you have installed `` ceph-mgr-dashboard `` from distribution packages, the
2020-11-15 23:06:16 +00:00
package management system should take care of installing all required
2019-03-07 14:31:17 +00:00
dependencies.
2019-02-28 14:10:42 +00:00
2020-11-15 23:06:16 +00:00
If you're building Ceph from source and want to start the dashboard from your
2019-02-28 14:10:42 +00:00
development environment, please see the files `` README.rst `` and `` HACKING.rst ``
2020-11-15 23:06:16 +00:00
in the source directory `` src/pybind/mgr/dashboard `` .
2019-02-28 14:10:42 +00:00
Within a running Ceph cluster, the Ceph Dashboard is enabled with::
2017-07-10 13:48:50 +00:00
2018-04-16 11:21:30 +00:00
$ ceph mgr module enable dashboard
2017-07-10 13:48:50 +00:00
Configuration
-------------
2018-09-11 12:12:04 +00:00
.. _dashboard-ssl-tls-support:
2018-05-17 15:34:36 +00:00
SSL/TLS Support
^^^^^^^^^^^^^^^
2018-03-19 13:21:14 +00:00
2018-06-15 14:39:09 +00:00
All HTTP connections to the dashboard are secured with SSL/TLS by default.
2017-07-10 13:48:50 +00:00
2018-05-17 15:34:36 +00:00
To get the dashboard up and running quickly, you can generate and install a
2020-11-15 23:06:16 +00:00
self-signed certificate::
2017-06-15 11:10:13 +00:00
2018-05-17 15:34:36 +00:00
$ ceph dashboard create-self-signed-cert
2020-11-15 23:06:16 +00:00
Note that most web browsers will complain about self-signed certificates
2018-05-17 15:34:36 +00:00
and require explicit confirmation before establishing a secure connection to the
dashboard.
2020-11-15 23:06:16 +00:00
To properly secure a deployment and to remove the warning, a
2018-05-17 15:34:36 +00:00
certificate that is issued by a certificate authority (CA) should be used.
For example, a key pair can be generated with a command similar to::
$ openssl req -new -nodes -x509 \
-subj "/O=IT/CN=ceph-mgr-dashboard" -days 3650 \
-keyout dashboard.key -out dashboard.crt -extensions v3_ca
The `` dashboard.crt `` file should then be signed by a CA. Once that is done, you
2020-11-15 23:06:16 +00:00
can enable it for Ceph manager instances by running the following commands::
2018-05-17 15:34:36 +00:00
2019-04-09 12:46:34 +00:00
$ ceph dashboard set-ssl-certificate -i dashboard.crt
$ ceph dashboard set-ssl-certificate-key -i dashboard.key
2018-05-17 15:34:36 +00:00
2020-11-15 23:06:16 +00:00
If unique certificates are desired for each manager instance,
2018-05-17 15:34:36 +00:00
the name of the instance can be included as follows (where `` $name `` is the name
of the `` ceph-mgr `` instance, usually the hostname)::
2019-04-09 12:46:34 +00:00
$ ceph dashboard set-ssl-certificate $name -i dashboard.crt
$ ceph dashboard set-ssl-certificate-key $name -i dashboard.key
2017-06-15 11:10:13 +00:00
2018-06-15 14:39:09 +00:00
SSL can also be disabled by setting this configuration value::
$ ceph config set mgr mgr/dashboard/ssl false
This might be useful if the dashboard will be running behind a proxy which does
not support SSL for its upstream servers or other situations where SSL is not
2020-03-12 13:19:52 +00:00
wanted or required. See :ref: `dashboard-proxy-configuration` for more details.
2018-06-15 14:39:09 +00:00
.. warning ::
Use caution when disabling SSL as usernames and passwords will be sent to the
dashboard unencrypted.
2018-05-17 15:34:36 +00:00
.. note ::
2017-06-15 11:10:13 +00:00
2020-11-15 23:06:16 +00:00
You must restart Ceph manager processes after changing the SSL
2018-05-17 15:34:36 +00:00
certificate and key. This can be accomplished by either running `` ceph mgr
fail mgr`` or by disabling and re-enabling the dashboard module (which also
triggers the manager to respawn itself)::
$ ceph mgr module disable dashboard
$ ceph mgr module enable dashboard
2020-09-08 15:06:33 +00:00
.. _dashboard-host-name-and-port:
2019-02-28 14:10:42 +00:00
Host Name and Port
2018-05-17 15:34:36 +00:00
^^^^^^^^^^^^^^^^^^
2020-11-15 23:06:16 +00:00
Like most web applications, the dashboard binds to a TCP/IP address and TCP port.
2018-05-17 15:34:36 +00:00
By default, the `` ceph-mgr `` daemon hosting the dashboard (i.e., the currently
2018-06-15 14:39:09 +00:00
active manager) will bind to TCP port 8443 or 8080 when SSL is disabled.
If no specific address has been configured, the web app will bind to `` :: `` ,
which corresponds to all available IPv4 and IPv6 addresses.
2018-05-17 15:34:36 +00:00
These defaults can be changed via the configuration key facility on a
cluster-wide level (so they apply to all manager instances) as follows::
2017-06-26 12:49:28 +00:00
2018-04-16 21:30:18 +00:00
$ ceph config set mgr mgr/dashboard/server_addr $IP
$ ceph config set mgr mgr/dashboard/server_port $PORT
2019-03-12 13:12:55 +00:00
$ ceph config set mgr mgr/dashboard/ssl_server_port $PORT
2017-06-26 12:49:28 +00:00
2020-11-15 23:06:16 +00:00
Since each `` ceph-mgr `` hosts its own instance of the dashboard, it may be
2018-05-17 15:34:36 +00:00
necessary to configure them separately. The IP address and port for a specific
manager instance can be changed with the following commands::
$ ceph config set mgr mgr/dashboard/$name/server_addr $IP
$ ceph config set mgr mgr/dashboard/$name/server_port $PORT
2019-03-12 13:12:55 +00:00
$ ceph config set mgr mgr/dashboard/$name/ssl_server_port $PORT
2018-05-17 15:34:36 +00:00
2020-11-15 23:06:16 +00:00
Replace `` $name `` with the ID of the ceph-mgr instance hosting the dashboard.
2018-05-17 15:34:36 +00:00
.. note ::
2017-07-10 13:48:50 +00:00
2018-05-17 15:34:36 +00:00
The command `` ceph mgr services `` will show you all endpoints that are
2018-06-28 03:49:29 +00:00
currently configured. Look for the `` dashboard `` key to obtain the URL for
2018-05-17 15:34:36 +00:00
accessing the dashboard.
2018-03-19 13:21:14 +00:00
2019-02-28 14:10:42 +00:00
Username and Password
2018-03-19 13:21:14 +00:00
^^^^^^^^^^^^^^^^^^^^^
2018-06-01 11:16:27 +00:00
In order to be able to log in, you need to create a user account and associate
it with at least one role. We provide a set of predefined *system roles* that
you can use. For more details please refer to the `User and Role Management`_
section.
2018-02-23 15:28:09 +00:00
2018-06-01 11:16:27 +00:00
To create a user with the administrator role you can use the following
commands::
2020-12-15 08:28:46 +00:00
$ ceph dashboard ac-user-create <username> -i <file-containing-password> administrator
2018-02-23 15:28:09 +00:00
2020-12-10 08:05:38 +00:00
Account Lock-out
^^^^^^^^^^^^^^^^
It disables a user account if a user repeatedly enters the wrong credentials
for multiple times. It is enabled by default to prevent brute-force or dictionary
attacks. The user can get or set the default number of lock-out attempts using
these commands respectively::
$ ceph dashboard get-account-lockout-attempts
$ ceph dashboard set-account-lockout-attempts <value:int>
.. warning ::
This feature can be disabled by setting the default number of lock-out attempts to 0.
However, by disabling this feature, the account is more vulnerable to brute-force or
dictionary based attacks. This can be disabled by::
$ ceph dashboard set-account-lockout-attempts 0
Enable a Locked User
^^^^^^^^^^^^^^^^^^^^
If a user account is disabled as a result of multiple invalid login attempts, then
it needs to be manually enabled by the administrator. This can be done by the following
command::
$ ceph dashboard ac-user-enable <username>
2020-03-12 13:21:11 +00:00
Accessing the Dashboard
^^^^^^^^^^^^^^^^^^^^^^^
You can now access the dashboard using your (JavaScript-enabled) web browser, by
pointing it to any of the host names or IP addresses and the selected TCP port
where a manager instance is running: e.g., `` http(s)://<$IP>:<$PORT>/ `` .
2020-11-15 23:06:16 +00:00
The dashboard page displays and requests a previously defined username and
password.
2020-03-12 13:21:11 +00:00
2019-02-28 14:10:42 +00:00
.. _dashboard-enabling-object-gateway:
2018-02-23 15:28:09 +00:00
2019-02-28 14:10:42 +00:00
Enabling the Object Gateway Management Frontend
2018-07-24 09:52:29 +00:00
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2018-04-16 11:21:30 +00:00
2021-07-08 20:19:42 +00:00
When RGW is deployed with cephadm, the RGW credentials used by the
2021-08-06 06:57:47 +00:00
dashboard will be automatically configured. You can also manually force the
credentials to be set up with::
2018-04-16 11:21:30 +00:00
2021-08-06 06:57:47 +00:00
$ ceph dashboard set-rgw-credentials
2018-04-16 11:21:30 +00:00
2021-07-08 20:19:42 +00:00
This will create an RGW user with uid `` dashboard `` for each realm in
the system.
2018-04-16 11:21:30 +00:00
2021-08-06 06:57:47 +00:00
If you've configured a custom 'admin' resource in your RGW admin API, you should set it here also::
$ ceph dashboard set-rgw-api-admin-resource <admin_resource>
2020-11-15 23:06:16 +00:00
If you are using a self-signed certificate in your Object Gateway setup,
2018-08-03 06:48:00 +00:00
you should disable certificate verification in the dashboard to avoid refused
connections, e.g. caused by certificates signed by unknown CA or not matching
the host name::
$ ceph dashboard set-rgw-api-ssl-verify False
2018-07-24 09:52:29 +00:00
If the Object Gateway takes too long to process requests and the dashboard runs
2020-11-15 23:06:16 +00:00
into timeouts, you can set the timeout value to your needs::
2018-07-24 09:52:29 +00:00
$ ceph dashboard set-rest-requests-timeout <seconds>
The default value is 45 seconds.
2019-02-28 14:10:42 +00:00
.. _dashboard-iscsi-management:
2018-10-24 12:42:23 +00:00
Enabling iSCSI Management
^^^^^^^^^^^^^^^^^^^^^^^^^
2019-03-31 18:32:15 +00:00
The Ceph Dashboard can manage iSCSI targets using the REST API provided by the
2020-11-15 23:06:16 +00:00
`` rbd-target-api `` service of the :ref: `ceph-iscsi` . Please make sure that it is
2019-03-31 18:32:15 +00:00
installed and enabled on the iSCSI gateways.
.. note ::
2020-01-02 14:04:14 +00:00
2019-03-31 18:32:15 +00:00
The iSCSI management functionality of Ceph Dashboard depends on the latest
version 3 of the `ceph-iscsi <https://github.com/ceph/ceph-iscsi> `_ project.
Make sure that your operating system provides the correct version, otherwise
2020-11-15 23:06:16 +00:00
the dashboard will not enable the management features.
2018-10-24 12:42:23 +00:00
2020-11-15 23:06:16 +00:00
If the `` ceph-iscsi `` REST API is configured in HTTPS mode and its using a self-signed
certificate, you need to configure the dashboard to avoid SSL certificate
2019-03-11 15:44:03 +00:00
verification when accessing ceph-iscsi API.
2019-03-26 20:52:12 +00:00
To disable API SSL verification run the following command::
2019-03-11 15:44:03 +00:00
2020-01-02 14:04:14 +00:00
$ ceph dashboard set-iscsi-api-ssl-verification false
2019-03-15 13:50:09 +00:00
The available iSCSI gateways must be defined using the following commands::
2020-01-02 14:04:14 +00:00
$ ceph dashboard iscsi-gateway-list
2020-12-15 08:28:46 +00:00
$ # Gateway URL format for a new gateway: <scheme>://<username>:<password> @<host>[:port]
$ ceph dashboard iscsi-gateway-add -i <file-containing-gateway-url> [<gateway_name> ]
2020-01-02 14:04:14 +00:00
$ ceph dashboard iscsi-gateway-rm <gateway_name>
2019-03-11 15:44:03 +00:00
2019-02-28 14:10:42 +00:00
.. _dashboard-grafana:
2018-04-19 07:29:41 +00:00
Enabling the Embedding of Grafana Dashboards
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2020-11-15 23:06:16 +00:00
`Grafana`_ pulls data from `Prometheus <https://prometheus.io/> `_ . Although
2020-05-05 12:16:36 +00:00
Grafana can use other data sources, the Grafana dashboards we provide contain
queries that are specific to Prometheus. Our Grafana dashboards therefore
2020-11-15 23:06:16 +00:00
require Prometheus as the data source. The Ceph :ref: `mgr-prometheus`
module exports its data in the Prometheus exposition format. These Grafana
dashboards rely on metric names from the Prometheus module and `Node exporter
2020-05-05 12:16:36 +00:00
<https://prometheus.io/docs/guides/node-exporter/> `_. The Node exporter is a
separate application that provides machine metrics.
.. note ::
Prometheus' security model presumes that untrusted users have access to the
Prometheus HTTP endpoint and logs. Untrusted users have access to all the
(meta)data Prometheus collects that is contained in the database, plus a
variety of operational and debugging information.
However, Prometheus' HTTP API is limited to read-only operations.
Configurations can *not* be changed using the API and secrets are not
exposed. Moreover, Prometheus has some built-in measures to mitigate the
impact of denial of service attacks.
Please see `Prometheus' Security model
<https://prometheus.io/docs/operating/security/>` for more detailed
information.
2020-05-06 14:08:16 +00:00
Installation and Configuration using cephadm
""""""""""""""""""""""""""""""""""""""""""""
2018-04-19 07:29:41 +00:00
2020-05-06 14:08:16 +00:00
Grafana and Prometheus can be installed using :ref: `cephadm` . They will
2020-11-15 23:06:16 +00:00
automatically be configured by `` cephadm `` . Please see
2020-05-06 14:08:16 +00:00
:ref: `mgr-cephadm-monitoring` documentation for more details on how to use
2020-11-15 23:06:16 +00:00
`` cephadm `` for installing and configuring Prometheus and Grafana.
2018-04-19 07:29:41 +00:00
2020-05-06 14:08:16 +00:00
Manual Installation and Configuration
"""""""""""""""""""""""""""""""""""""
2018-04-19 07:29:41 +00:00
2020-05-06 14:08:16 +00:00
The following process describes how to configure Grafana and Prometheus
2020-11-15 23:06:16 +00:00
manually. After you have installed Prometheus, Grafana, and the Node exporter
on appropriate hosts, proceed with the following steps.
2018-04-19 07:29:41 +00:00
2020-05-06 14:08:16 +00:00
#. Enable the Ceph Exporter which comes as Ceph Manager module by running::
2018-04-19 07:29:41 +00:00
2020-05-06 14:08:16 +00:00
$ ceph mgr module enable prometheus
2018-04-19 07:29:41 +00:00
2020-05-06 14:08:16 +00:00
More details can be found in the documentation of the :ref: `mgr-prometheus` .
2018-04-19 07:29:41 +00:00
2020-05-06 14:08:16 +00:00
#. Add the corresponding scrape configuration to Prometheus. This may look
like::
2018-04-19 07:29:41 +00:00
2020-05-06 14:08:16 +00:00
global:
scrape_interval: 5s
2018-04-19 07:29:41 +00:00
2020-05-06 14:08:16 +00:00
scrape_configs:
- job_name: 'prometheus'
static_configs:
- targets: ['localhost:9090']
- job_name: 'ceph'
static_configs:
- targets: ['localhost:9283']
- job_name: 'node-exporter'
static_configs:
- targets: ['localhost:9100']
2018-04-19 07:29:41 +00:00
2020-05-06 14:08:16 +00:00
.. note ::
2018-10-10 07:34:22 +00:00
2020-11-15 23:06:16 +00:00
Please note that in the above example, Prometheus is configured
2020-05-06 14:08:16 +00:00
to scrape data from itself (port 9090), the Ceph manager module
2020-11-15 23:06:16 +00:00
`prometheus` (port 9283), which exports Ceph internal data, and the Node
Exporter (port 9100), which provides OS and hardware metrics for each host.
2019-02-04 18:06:12 +00:00
2020-05-06 14:08:16 +00:00
Depending on your configuration, you may need to change the hostname in
2020-11-15 23:06:16 +00:00
or add additional configuration entries for the Node
Exporter. It is unlikely that you will need to change the default TCP ports.
2018-10-10 07:34:22 +00:00
2020-05-06 14:08:16 +00:00
Moreover, you don't *need* to have more than one target for Ceph specific
data, provided by the `prometheus` mgr module. But it is recommended to
configure Prometheus to scrape Ceph specific data from all existing Ceph
2020-11-15 23:06:16 +00:00
managers. This enables a built-in high availability mechanism, so that
services run on a manager host will be restarted automatically on a different
manager host if one Ceph Manager goes down.
2018-10-10 07:34:22 +00:00
2020-05-06 14:08:16 +00:00
#. Add Prometheus as data source to Grafana `using the Grafana Web UI
<https://grafana.com/docs/grafana/latest/features/datasources/add-a-data-source/>`_.
2019-02-04 18:06:12 +00:00
2020-05-06 14:08:16 +00:00
#. Install the `vonage-status-panel and grafana-piechart-panel` plugins using::
2018-04-19 07:29:41 +00:00
2020-05-06 14:08:16 +00:00
grafana-cli plugins install vonage-status-panel
grafana-cli plugins install grafana-piechart-panel
2018-04-19 07:29:41 +00:00
2020-11-15 23:06:16 +00:00
#. Add Dashboards to Grafana:
2018-04-19 07:29:41 +00:00
2020-05-06 14:08:16 +00:00
Dashboards can be added to Grafana by importing dashboard JSON files.
Use the following command to download the JSON files::
2022-02-07 10:53:29 +00:00
wget https://raw.githubusercontent.com/ceph/ceph/master/monitoring/ceph-mixin/dashboards_out/<Dashboard-name>.json
2020-05-06 14:08:16 +00:00
2020-11-15 23:06:16 +00:00
You can find various dashboard JSON files `here <https://github.com/ceph/ceph/tree/
2022-02-07 10:53:29 +00:00
master/monitoring/ceph-mixin/dashboards_out>`_ .
2020-05-06 14:08:16 +00:00
For Example, for ceph-cluster overview you can use::
2022-02-07 10:53:29 +00:00
wget https://raw.githubusercontent.com/ceph/ceph/master/monitoring/ceph-mixin/dashboards_out/ceph-cluster.json
2020-05-06 14:08:16 +00:00
2020-11-15 23:06:16 +00:00
You may also author your own dashboards.
#. Configure anonymous mode in `` /etc/grafana/grafana.ini `` ::
2020-05-06 14:08:16 +00:00
[auth.anonymous]
enabled = true
org_name = Main Org.
org_role = Viewer
In newer versions of Grafana (starting with 6.2.0-beta1) a new setting named
2020-11-15 23:06:16 +00:00
`` allow_embedding `` has been introduced. This setting must be explicitly
set to `` true `` for the Grafana integration in Ceph Dashboard to work, as the
2020-05-06 14:08:16 +00:00
default is `` false `` .
::
[security]
allow_embedding = true
2020-01-02 12:17:40 +00:00
2020-09-14 10:41:56 +00:00
Enabling RBD-Image monitoring
"""""""""""""""""""""""""""""
2020-11-15 23:06:16 +00:00
Monitoring of RBD images is disabled by default, as it can significantly impact
performance. For more information please see :ref: `prometheus-rbd-io-statistics` .
When disabled, the overview and details dashboards will be empty in Grafana and
metrics will not be visible in Prometheus.
2020-01-02 12:17:40 +00:00
2020-05-06 14:08:16 +00:00
Configuring Dashboard
"""""""""""""""""""""
2020-01-02 12:17:40 +00:00
2018-05-18 07:38:20 +00:00
After you have set up Grafana and Prometheus, you will need to configure the
2019-02-28 14:10:42 +00:00
connection information that the Ceph Dashboard will use to access Grafana.
2018-05-18 07:38:20 +00:00
2020-11-03 12:47:23 +00:00
You need to tell the dashboard on which URL the Grafana instance is
running/deployed::
2018-05-18 07:38:20 +00:00
2018-10-04 15:55:31 +00:00
$ ceph dashboard set-grafana-api-url <grafana-server-url> # default: ''
2018-05-18 07:38:20 +00:00
2018-10-04 15:55:31 +00:00
The format of url is : `<protocol>:<IP-address>:<port>`
2019-02-28 14:10:42 +00:00
.. note ::
2020-01-02 14:04:14 +00:00
2020-11-15 23:06:16 +00:00
The Ceph Dashboard embeds Grafana dashboards via `` iframe `` HTML elements.
2019-02-28 14:10:42 +00:00
If Grafana is configured without SSL/TLS support, most browsers will block the
2020-11-15 23:06:16 +00:00
embedding of insecure content if SSL support is
enabled for the dashboard (which is the default). If you
2019-02-28 14:10:42 +00:00
can't see the embedded Grafana dashboards after enabling them as outlined
above, check your browser's documentation on how to unblock mixed content.
Alternatively, consider enabling SSL/TLS support in Grafana.
2019-05-22 10:55:47 +00:00
2020-11-15 23:06:16 +00:00
If you are using a self-signed certificate for Grafana,
2019-10-24 11:51:08 +00:00
disable certificate verification in the dashboard to avoid refused connections,
2020-11-15 23:06:16 +00:00
which can be a result of certificates signed by an unknown CA or that do not
matchn the host name::
2019-10-24 11:51:08 +00:00
$ ceph dashboard set-grafana-api-ssl-verify False
2020-11-15 23:06:16 +00:00
You can also access Grafana directly to monitor your cluster.
.. note ::
Ceph Dashboard configuration information can also be unset. For example, to
clear the Grafana API URL we configured above::
$ ceph dashboard reset-grafana-api-url
2018-04-19 07:29:41 +00:00
2020-11-03 12:47:23 +00:00
Alternative URL for Browsers
""""""""""""""""""""""""""""
The Ceph Dashboard backend requires the Grafana URL to be able to verify the
existence of Grafana Dashboards before the frontend even loads them. Due to the
nature of how Grafana is implemented in Ceph Dashboard, this means that two
working connections are required in order to be able to see Grafana graphs in
Ceph Dashboard:
- The backend (Ceph Mgr module) needs to verify the existence of the requested
graph. If this request succeeds, it lets the frontend know that it can safely
access Grafana.
- The frontend then requests the Grafana graphs directly from the user's
browser using an iframe. The Grafana instance is accessed directly without any
detour through Ceph Dashboard.
Now, it might be the case that your environment makes it difficult for the
user's browser to directly access the URL configured in Ceph Dashboard. To solve
this issue, a separate URL can be configured which will solely be used to tell
the frontend (the user's browser) which URL it should use to access Grafana.
This setting won't ever be changed automatically, unlike the GRAFANA_API_URL
which is set by :ref: `cephadm` (only if cephadm is used to deploy monitoring
services).
To change the URL that is returned to the frontend issue the following command::
$ ceph dashboard set-grafana-frontend-api-url <grafana-server-url>
If no value is set for that option, it will simply fall back to the value of the
GRAFANA_API_URL option. If set, it will instruct the browser to use this URL to
access Grafana.
2019-01-25 11:34:37 +00:00
.. _dashboard-sso-support:
2018-06-11 09:29:08 +00:00
Enabling Single Sign-On (SSO)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2019-02-28 14:10:42 +00:00
The Ceph Dashboard supports external authentication of users via the
2020-11-15 23:06:16 +00:00
`SAML 2.0 <https://en.wikipedia.org/wiki/SAML_2.0> `_ protocol. You need to
first create user accounts and associate them with desired roles, as
authorization is performed by the Dashboard. However, the authentication
process can be performed by an existing Identity Provider (IdP).
2018-06-11 09:29:08 +00:00
.. note ::
2020-01-02 14:04:14 +00:00
2018-06-11 09:29:08 +00:00
Ceph Dashboard SSO support relies on onelogin's
`python-saml <https://pypi.org/project/python-saml/> `_ library.
Please ensure that this library is installed on your system, either by using
your distribution's package management or via Python's `pip` installer.
To configure SSO on Ceph Dashboard, you should use the following command::
$ ceph dashboard sso setup saml2 <ceph_dashboard_base_url> <idp_metadata> {<idp_username_attribute>} {<idp_entity_id>} {<sp_x_509_cert>} {<sp_private_key>}
Parameters:
2019-01-14 13:24:56 +00:00
* **<ceph_dashboard_base_url>** : Base URL where Ceph Dashboard is accessible (e.g., `https://cephdashboard.local` )
mgr/dashboard: fix SAML input argument handling
Currently dashboard provides a Ceph command to specify location or
contents of SAML2 IdP XML (`idp_metadata` argument). This loose
interface is implemented by trying to:
- First, opens HTTPS connection to whatever that argument contains (it
might be a proper remote URL, a local file or XML contents).
- Then, tries to open the local file
- Finally, assumes the input argument is an XML and proceeds to parse
it.
However, as the XML can have an undefined length, when fed as a filename
it results in FreeBSD raising a OSError exception (`Max filename length
exceeded`, 1K). This essentially means that this handling results in
unexpected behaviour, as it pushes the validation & error handling to
the underlying methods.
In this fix, some preliminary validation is performed. Especifically:
- Is the input argument a potential filename?
- Is the input argument complying with URL syntax?
Only if the above checks fail, the input argument is fed into the XML
parser.
Additionally, previous syntax is deprecated, so now, `idp_metadata`
enforces 2 syntaxes:
- Raw XML contents
- URL specification (http, https, and file schemas accepted). For local
file, URL 'file://<path>' should be used instead.
Fixes: https://tracker.ceph.com/issues/41358
Signed-off-by: Ernesto Puerta <epuertat@redhat.com>
2019-08-23 11:45:45 +00:00
* **<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` ).
2019-01-14 13:24:56 +00:00
* **<idp_username_attribute>** *(optional)* : Attribute that should be used to get the username from the authentication response. Defaults to `uid` .
* **<idp_entity_id>** *(optional)* : Use this when more than one entity id exists on the IdP metadata.
2021-08-06 12:18:32 +00:00
* **<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 (these file paths should be accessible from the active ceph-mgr instance).
2018-06-11 09:29:08 +00:00
2019-01-14 13:24:56 +00:00
.. note ::
2020-01-02 14:04:14 +00:00
2019-01-14 13:24:56 +00:00
The issuer value of SAML requests will follow this pattern: **<ceph_dashboard_base_url>** /auth/saml2/metadata
2018-06-11 09:29:08 +00:00
To display the current SAML 2.0 configuration, use the following command::
$ ceph dashboard sso show saml2
.. note ::
2020-01-02 14:04:14 +00:00
2018-06-11 09:29:08 +00:00
For more information about `onelogin_settings`, please check the `onelogin documentation <https://github.com/onelogin/python-saml> `_ .
To disable SSO::
$ ceph dashboard sso disable
To check if SSO is enabled::
$ ceph dashboard sso status
To enable SSO::
$ ceph dashboard sso enable saml2
2020-03-03 16:32:41 +00:00
.. _dashboard-alerting:
2019-02-28 14:10:42 +00:00
Enabling Prometheus Alerting
2018-11-06 12:43:03 +00:00
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2020-11-15 23:06:16 +00:00
To use Prometheus for alerting you must define `alerting rules
2018-11-06 12:43:03 +00:00
<https://prometheus.io/docs/prometheus/latest/configuration/alerting_rules> `_.
2020-11-15 23:06:16 +00:00
These are managed by the `Alertmanager
2018-11-06 12:43:03 +00:00
<https://prometheus.io/docs/alerting/alertmanager> `_.
2020-11-15 23:06:16 +00:00
If you are not yet using the Alertmanager, `install it
<https://github.com/prometheus/alertmanager#install> `_ as it receives
and manages alerts from Prometheus.
2018-11-06 12:43:03 +00:00
2020-11-15 23:06:16 +00:00
Alertmanager capabilities can be consumed by the dashboard in three different
2018-11-06 12:43:03 +00:00
ways:
#. Use the notification receiver of the dashboard.
#. Use the Prometheus Alertmanager API.
#. Use both sources simultaneously.
2020-11-15 23:06:16 +00:00
All three methods notify you about alerts. You won't be notified
2019-03-22 16:44:00 +00:00
twice if you use both sources, but you need to consume at least the Alertmanager API
in order to manage silences.
2018-11-06 12:43:03 +00:00
2020-01-02 14:04:14 +00:00
1. Use the notification receiver of the dashboard
2018-11-06 12:43:03 +00:00
2020-01-02 14:04:14 +00:00
This allows you to get notifications as `configured
<https://prometheus.io/docs/alerting/configuration/>`_ from the Alertmanager.
You will get notified inside the dashboard once a notification is send out,
but you are not able to manage alerts.
2018-11-06 12:43:03 +00:00
2020-01-02 14:04:14 +00:00
Add the dashboard receiver and the new route to your Alertmanager
configuration. This should look like::
2018-11-06 12:43:03 +00:00
2020-01-02 14:04:14 +00:00
route:
receiver: 'ceph-dashboard'
...
receivers:
- name: 'ceph-dashboard'
webhook_configs:
- url: '<url-to-dashboard>/api/prometheus_receiver'
2018-11-06 12:43:03 +00:00
2020-11-15 23:06:16 +00:00
Ensure that the Alertmanager considers your SSL certificate in terms
2020-01-02 14:04:14 +00:00
of the dashboard as valid. For more information about the correct
configuration checkout the `<http_config> documentation
<https://prometheus.io/docs/alerting/configuration/#%3Chttp_config%3E>`_.
2018-11-06 12:43:03 +00:00
2020-01-02 14:04:14 +00:00
2. Use the API of Prometheus and the Alertmanager
2018-11-06 12:43:03 +00:00
2020-11-15 23:06:16 +00:00
This allows you to manage alerts and silences and will enable the "Active
2020-01-02 14:04:14 +00:00
Alerts", "All Alerts" as well as the "Silences" tabs in the "Monitoring"
section of the "Cluster" menu entry.
2019-03-22 16:44:00 +00:00
2020-01-02 14:04:14 +00:00
Alerts can be sorted by name, job, severity, state and start time.
Unfortunately it's not possible to know when an alert was sent out through a
notification by the Alertmanager based on your configuration, that's why the
dashboard will notify the user on any visible change to an alert and will
notify the changed alert.
2018-11-06 12:43:03 +00:00
2020-01-02 14:04:14 +00:00
Silences can be sorted by id, creator, status, start, updated and end time.
Silences can be created in various ways, it's also possible to expire them.
2019-03-22 16:44:00 +00:00
2020-01-02 14:04:14 +00:00
#. Create from scratch
2019-03-22 16:44:00 +00:00
2020-01-02 14:04:14 +00:00
#. Based on a selected alert
2019-03-22 16:44:00 +00:00
2020-01-02 14:04:14 +00:00
#. Recreate from expired silence
2019-03-22 16:44:00 +00:00
2020-01-02 14:04:14 +00:00
#. Update a silence (which will recreate and expire it (default Alertmanager behaviour))
2018-11-06 12:43:03 +00:00
2020-01-02 14:04:14 +00:00
To use it, specify the host and port of the Alertmanager server::
2018-11-06 12:43:03 +00:00
2020-01-02 14:04:14 +00:00
$ ceph dashboard set-alertmanager-api-host <alertmanager-host:port> # default: ''
2018-11-06 12:43:03 +00:00
2020-01-02 14:04:14 +00:00
For example::
2018-11-06 12:43:03 +00:00
2020-01-02 14:04:14 +00:00
$ ceph dashboard set-alertmanager-api-host 'http://localhost:9093'
2018-11-06 12:43:03 +00:00
2020-01-02 14:04:14 +00:00
To be able to see all configured alerts, you will need to configure the URL to
the Prometheus API. Using this API, the UI will also help you in verifying
that a new silence will match a corresponding alert.
2019-12-02 13:30:30 +00:00
2020-01-02 14:04:14 +00:00
::
2019-03-22 16:44:00 +00:00
2020-01-02 14:04:14 +00:00
$ ceph dashboard set-prometheus-api-host <prometheus-host:port> # default: ''
2019-03-22 16:44:00 +00:00
2020-01-02 14:04:14 +00:00
For example::
2019-03-22 16:44:00 +00:00
2020-01-02 14:04:14 +00:00
$ ceph dashboard set-prometheus-api-host 'http://localhost:9090'
2019-03-22 16:44:00 +00:00
2020-11-15 23:06:16 +00:00
After setting up the hosts, refresh your browser's dashboard window or tab.
2018-11-06 12:43:03 +00:00
2020-01-02 14:04:14 +00:00
3. Use both methods
2018-11-06 12:43:03 +00:00
2020-11-15 23:06:16 +00:00
The behaviors of both methods are configured in a way that they
should not disturb each other, through annoying duplicated notifications
may pop up.
2018-11-06 12:43:03 +00:00
2020-10-12 15:57:00 +00:00
If you are using a self-signed certificate in your Prometheus or your
Alertmanager setup, you should disable certificate verification in the
2020-11-15 23:06:16 +00:00
dashboard to avoid refused connections caused by certificates signed by
an unknown CA or that do not match the host name.
2020-10-12 15:57:00 +00:00
- For Prometheus::
$ ceph dashboard set-prometheus-api-ssl-verify False
- For Alertmanager::
$ ceph dashboard set-alertmanager-api-ssl-verify False
2018-09-11 12:12:04 +00:00
.. _dashboard-user-role-management:
2018-06-01 11:16:27 +00:00
User and Role Management
------------------------
2020-01-27 09:25:08 +00:00
Password Policy
^^^^^^^^^^^^^^^
2020-11-15 23:06:16 +00:00
By default the password policy feature is enabled, which includes the
following checks:
2020-01-27 09:25:08 +00:00
- Is the password longer than N characters?
- Are the old and new password the same?
The password policy feature can be switched on or off completely::
$ ceph dashboard set-pwd-policy-enabled <true|false>
2020-11-15 23:06:16 +00:00
The following individual checks can also be switched on or off::
2020-01-27 09:25:08 +00:00
$ ceph dashboard set-pwd-policy-check-length-enabled <true|false>
$ ceph dashboard set-pwd-policy-check-oldpwd-enabled <true|false>
$ ceph dashboard set-pwd-policy-check-username-enabled <true|false>
$ ceph dashboard set-pwd-policy-check-exclusion-list-enabled <true|false>
$ ceph dashboard set-pwd-policy-check-complexity-enabled <true|false>
$ ceph dashboard set-pwd-policy-check-sequential-chars-enabled <true|false>
$ ceph dashboard set-pwd-policy-check-repetitive-chars-enabled <true|false>
2020-11-15 23:06:16 +00:00
Additionally the following options are available to configure password
policy.
2020-01-27 09:25:08 +00:00
2020-11-15 23:06:16 +00:00
- Minimum password length (defaults to 8)::
2020-01-27 09:25:08 +00:00
$ ceph dashboard set-pwd-policy-min-length <N>
2020-11-15 23:06:16 +00:00
- Minimum password complexity (defaults to 10)::
2020-01-27 09:25:08 +00:00
$ ceph dashboard set-pwd-policy-min-complexity <N>
2020-11-15 23:06:16 +00:00
Password complexity is calculated by classifying each character in
2020-01-27 09:25:08 +00:00
the password. The complexity count starts by 0. A character is rated by
the following rules in the given order.
- Increase by 1 if the character is a digit.
- Increase by 1 if the character is a lower case ASCII character.
- Increase by 2 if the character is an upper case ASCII character.
- Increase by 3 if the character is a special character like `` !"#$%&'()*+,-./:;<=>?@[\]^_ ` {|}~ `` .
- Increase by 5 if the character has not been classified by one of the previous rules.
- A list of comma separated words that are not allowed to be used in a
password::
$ ceph dashboard set-pwd-policy-exclusion-list <word>[,...]
2018-06-01 11:16:27 +00:00
User Accounts
^^^^^^^^^^^^^
2020-11-15 23:06:16 +00:00
The Ceph Dashboard supports multiple user accounts. Each user account
2018-06-01 11:16:27 +00:00
consists of a username, a password (stored in encrypted form using `` bcrypt `` ),
an optional name, and an optional email address.
2020-11-15 23:06:16 +00:00
If a new user is created via the Web UI, it is possible to set an option that the
2020-01-13 09:06:25 +00:00
user must assign a new password when they log in for the first time.
2020-11-15 23:06:16 +00:00
User accounts are stored in the monitors' configuration database, and are
available to all `` ceph-mgr `` instances.
2018-06-01 11:16:27 +00:00
We provide a set of CLI commands to manage user accounts:
- *Show User(s)* ::
$ ceph dashboard ac-user-show [<username> ]
- *Create User* ::
2020-12-15 08:28:46 +00:00
$ ceph dashboard ac-user-create [--enabled] [--force-password] [--pwd_update_required] <username> -i <file-containing-password> [<rolename> ] [<name> ] [<email> ] [<pwd_expiration_date> ]
2020-02-26 08:17:18 +00:00
2020-11-15 23:06:16 +00:00
To bypass password policy checks use the `force-password` option.
Add the option `pwd_update_required` so that a newly created user has
2020-02-26 08:17:18 +00:00
to change their password after the first login.
2018-06-01 11:16:27 +00:00
- *Delete User* ::
$ ceph dashboard ac-user-delete <username>
- *Change Password* ::
2020-12-15 08:28:46 +00:00
$ ceph dashboard ac-user-set-password [--force-password] <username> -i <file-containing-password>
2018-06-01 11:16:27 +00:00
2019-07-19 14:31:20 +00:00
- *Change Password Hash* ::
2020-12-15 08:28:46 +00:00
$ ceph dashboard ac-user-set-password-hash <username> -i <file-containing-password-hash>
2019-07-19 14:31:20 +00:00
The hash must be a bcrypt hash and salt, e.g. `` $2b$12$Pt3Vq/rDt2y9glTPSV.VFegiLkQeIpddtkhoFetNApYmIJOY8gau2 `` .
This can be used to import users from an external database.
2018-06-01 11:16:27 +00:00
- *Modify User (name, and email)* ::
$ ceph dashboard ac-user-set-info <username> <name> <email>
2019-07-11 16:20:31 +00:00
- *Disable User* ::
$ ceph dashboard ac-user-disable <username>
- *Enable User* ::
$ ceph dashboard ac-user-enable <username>
2018-06-01 11:16:27 +00:00
User Roles and Permissions
^^^^^^^^^^^^^^^^^^^^^^^^^^
2020-11-15 23:06:16 +00:00
User accounts are associated with a set of roles that define which
dashboard functionality can be accessed.
2018-06-01 11:16:27 +00:00
2018-06-28 03:49:29 +00:00
The Dashboard functionality/modules are grouped within a *security scope* .
2018-09-18 03:19:18 +00:00
Security scopes are predefined and static. The current available security
2018-06-01 11:16:27 +00:00
scopes are:
- **hosts** : includes all features related to the `` Hosts `` menu
entry.
- **config-opt** : includes all features related to management of Ceph
configuration options.
- **pool** : includes all features related to pool management.
- **osd** : includes all features related to OSD management.
2020-11-15 23:06:16 +00:00
- **monitor** : includes all features related to monitor management.
2018-06-01 11:16:27 +00:00
- **rbd-image** : includes all features related to RBD image
management.
2020-11-15 23:06:16 +00:00
- **rbd-mirroring** : includes all features related to RBD mirroring
2018-06-01 11:16:27 +00:00
management.
- **iscsi** : includes all features related to iSCSI management.
2020-11-15 23:06:16 +00:00
- **rgw** : includes all features related to RADOS Gateway (RGW) management.
2018-06-01 11:16:27 +00:00
- **cephfs** : includes all features related to CephFS management.
2021-04-22 12:10:25 +00:00
- **nfs-ganesha** : includes all features related to NFS Ganesha management.
2018-06-01 11:16:27 +00:00
- **manager** : include all features related to Ceph Manager
management.
- **log** : include all features related to Ceph logs management.
- **grafana** : include all features related to Grafana proxy.
2018-11-06 12:43:03 +00:00
- **prometheus** : include all features related to Prometheus alert management.
2018-06-07 11:49:39 +00:00
- **dashboard-settings** : allows to change dashboard settings.
2018-06-01 11:16:27 +00:00
A *role* specifies a set of mappings between a *security scope* and a set of
*permissions* . There are four types of permissions:
- **read**
- **create**
- **update**
- **delete**
2020-11-15 23:06:16 +00:00
See below for an example of a role specification, in the form of a Python dictionary::
2018-06-01 11:16:27 +00:00
# example of a role
{
'role': 'my_new_role',
'description': 'My new role',
'scopes_permissions': {
'pool': ['read', 'create'],
'rbd-image': ['read', 'create', 'update', 'delete']
}
}
The above role dictates that a user has *read* and *create* permissions for
features related to pool management, and has full permissions for
features related to RBD image management.
2020-11-15 23:06:16 +00:00
The Dashboard provides a set of predefined roles that we call
*system roles* , which can be used right away by a fresh Ceph Dashboard
2018-06-01 11:16:27 +00:00
installation.
The list of system roles are:
2020-11-15 23:06:16 +00:00
- **administrator** : allows full permissions for all security scopes.
- **read-only** : allows *read* permission for all security scopes except
dashboard settings.
- **block-manager** : allows full permissions for *rbd-image* ,
2018-06-01 11:16:27 +00:00
*rbd-mirroring* , and *iscsi* scopes.
2020-11-15 23:06:16 +00:00
- **rgw-manager** : allows full permissions for the *rgw* scope
- **cluster-manager** : allows full permissions for the *hosts* , *osd* ,
2018-06-01 11:16:27 +00:00
*monitor* , *manager* , and *config-opt* scopes.
2020-11-15 23:06:16 +00:00
- **pool-manager** : allows full permissions for the *pool* scope.
- **cephfs-manager** : allows full permissions for the *cephfs* scope.
2018-06-01 11:16:27 +00:00
2020-11-15 23:06:16 +00:00
The list of available roles can be retrieved with the following command::
2018-06-01 11:16:27 +00:00
$ ceph dashboard ac-role-show [<rolename> ]
2020-11-15 23:06:16 +00:00
You can also use the CLI to create new roles. The available commands are the
following:
2018-06-01 11:16:27 +00:00
- *Create Role* ::
$ ceph dashboard ac-role-create <rolename> [<description> ]
- *Delete Role* ::
$ ceph dashboard ac-role-delete <rolename>
- *Add Scope Permissions to Role* ::
$ ceph dashboard ac-role-add-scope-perms <rolename> <scopename> <permission> [<permission> ...]
- *Delete Scope Permission from Role* ::
2019-09-10 13:11:36 +00:00
$ ceph dashboard ac-role-del-scope-perms <rolename> <scopename>
2018-06-01 11:16:27 +00:00
2020-11-15 23:06:16 +00:00
To assign roles to users, the following commands are available:
2018-06-01 11:16:27 +00:00
- *Set User Roles* ::
$ ceph dashboard ac-user-set-roles <username> <rolename> [<rolename> ...]
- *Add Roles To User* ::
$ ceph dashboard ac-user-add-roles <username> <rolename> [<rolename> ...]
- *Delete Roles from User* ::
$ ceph dashboard ac-user-del-roles <username> <rolename> [<rolename> ...]
2019-02-28 14:10:42 +00:00
Example of User and Custom Role Creation
2018-06-01 11:16:27 +00:00
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2020-11-15 23:06:16 +00:00
In this section we show a complete example of the commands that
create a user account that can manage RBD images, view and create Ceph pools,
and has read-only access to other scopes.
2018-06-01 11:16:27 +00:00
1. *Create the user* ::
2020-12-15 08:28:46 +00:00
$ ceph dashboard ac-user-create bob -i <file-containing-password>
2018-06-01 11:16:27 +00:00
2. *Create role and specify scope permissions* ::
$ ceph dashboard ac-role-create rbd/pool-manager
$ ceph dashboard ac-role-add-scope-perms rbd/pool-manager rbd-image read create update delete
$ ceph dashboard ac-role-add-scope-perms rbd/pool-manager pool read create
3. *Associate roles to user* ::
$ ceph dashboard ac-user-set-roles bob rbd/pool-manager read-only
2020-03-12 13:19:52 +00:00
.. _dashboard-proxy-configuration:
2018-06-01 11:16:27 +00:00
2019-04-14 14:28:30 +00:00
Proxy Configuration
-------------------
2020-11-15 23:06:16 +00:00
In a Ceph cluster with multiple `` ceph-mgr `` instances, only the dashboard
running on the currently active `` ceph-mgr `` daemon will serve incoming requests.
Connections to the dashboard's TCP port on standby `` ceph-mgr `` instances
will receive an HTTP redirect (303) to the active manager's dashboard URL.
This enables you to point your browser to any `` ceph-mgr `` instance in
order to access the dashboard.
2019-04-14 14:28:30 +00:00
If you want to establish a fixed URL to reach the dashboard or if you don't want
to allow direct connections to the manager nodes, you could set up a proxy that
2020-11-15 23:06:16 +00:00
automatically forwards incoming requests to the active `` ceph-mgr ``
2019-04-14 14:28:30 +00:00
instance.
Configuring a URL Prefix
^^^^^^^^^^^^^^^^^^^^^^^^
2017-08-21 17:21:10 +00:00
2020-11-15 23:06:16 +00:00
If you are accessing the dashboard via a reverse proxy,
2019-04-14 14:28:30 +00:00
you may wish to service it under a URL prefix. To get the dashboard
2018-01-09 22:23:33 +00:00
to use hyperlinks that include your prefix, you can set the
`` url_prefix `` setting:
2017-08-21 17:21:10 +00:00
2018-01-09 22:23:33 +00:00
::
2017-08-21 17:21:10 +00:00
2018-04-16 21:30:18 +00:00
ceph config set mgr mgr/dashboard/url_prefix $PREFIX
2017-08-21 17:21:10 +00:00
2018-03-19 13:21:14 +00:00
so you can access the dashboard at `` http://$IP:$PORT/$PREFIX/ `` .
2018-10-08 07:28:57 +00:00
2019-07-16 13:44:36 +00:00
Disable the redirection
^^^^^^^^^^^^^^^^^^^^^^^
If the dashboard is behind a load-balancing proxy like `HAProxy <https://www.haproxy.org/> `_
2020-11-15 23:06:16 +00:00
you might want to disable redirection to prevent situations in which
internal (unresolvable) URLs are published to the frontend client. Use the
following command to get the dashboard to respond with an HTTP error (500 by default)
2019-07-16 13:44:36 +00:00
instead of redirecting to the active dashboard::
$ ceph config set mgr mgr/dashboard/standby_behaviour "error"
2020-11-15 23:06:16 +00:00
To reset the setting to default redirection, use the following command::
2019-07-16 13:44:36 +00:00
$ ceph config set mgr mgr/dashboard/standby_behaviour "redirect"
Configure the error status code
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2020-11-15 23:06:16 +00:00
When redirection is disabled, you may want to customize the HTTP status
2019-07-16 13:44:36 +00:00
code of standby dashboards. To do so you need to run the command::
$ ceph config set mgr mgr/dashboard/standby_error_status_code 503
HAProxy example configuration
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2020-11-15 23:06:16 +00:00
Below you will find an example configuration for SSL/TLS passthrough using
2019-07-16 13:44:36 +00:00
`HAProxy <https://www.haproxy.org/> `_ .
2020-11-15 23:06:16 +00:00
Please note that this configuration works under the following conditions.
2019-07-16 13:44:36 +00:00
If the dashboard fails over, the front-end client might receive a HTTP redirect
(303) response and will be redirected to an unresolvable host. This happens when
2020-11-15 23:06:16 +00:00
failover occurs between two HAProxy health checks. In this situation the
2019-07-16 13:44:36 +00:00
previously active dashboard node will now respond with a 303 which points to
2020-11-15 23:06:16 +00:00
the new active node. To prevent that situation you should consider disabling
redirection on standby nodes.
2019-07-16 13:44:36 +00:00
::
defaults
log global
option log-health-checks
timeout connect 5s
timeout client 50s
timeout server 450s
frontend dashboard_front
mode http
bind *:80
option httplog
redirect scheme https code 301 if !{ ssl_fc }
frontend dashboard_front_ssl
mode tcp
bind *:443
option tcplog
default_backend dashboard_back_ssl
backend dashboard_back_ssl
mode tcp
option httpchk GET /
http-check expect status 200
2020-07-15 11:55:25 +00:00
server x <HOST>:<PORT> ssl check verify none
server y <HOST>:<PORT> ssl check verify none
server z <HOST>:<PORT> ssl check verify none
2019-04-14 14:28:30 +00:00
2019-01-25 11:34:37 +00:00
.. _dashboard-auditing:
2018-10-08 07:28:57 +00:00
2019-02-28 14:10:42 +00:00
Auditing API Requests
---------------------
2018-10-08 07:28:57 +00:00
2020-11-15 23:06:16 +00:00
The REST API can log PUT, POST and DELETE requests to the Ceph
2018-10-08 07:28:57 +00:00
audit log. This feature is disabled by default, but can be enabled with the
following command::
$ ceph dashboard set-audit-api-enabled <true|false>
If enabled, the following parameters are logged per each request:
* from - The origin of the request, e.g. https://[::1]:44410
* path - The REST API path, e.g. /api/auth
* method - e.g. PUT, POST or DELETE
* user - The name of the user, otherwise 'None'
The logging of the request payload (the arguments and their values) is enabled
by default. Execute the following command to disable this behaviour::
$ ceph dashboard set-audit-api-log-payload <true|false>
A log entry may look like this::
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"}'
2019-01-31 09:41:51 +00:00
2019-02-28 14:10:42 +00:00
.. _dashboard-nfs-ganesha-management:
2019-01-31 09:41:51 +00:00
NFS-Ganesha Management
----------------------
2021-08-26 10:05:54 +00:00
The dashboard requires enabling the NFS module which will be used to manage
NFS clusters and NFS exports. For more information check :ref: `mgr-nfs` .
2019-02-04 18:06:12 +00:00
Plug-ins
--------
2020-11-15 23:06:16 +00:00
Plug-ins extend the functionality of the Ceph Dashboard in a modular
2019-10-10 09:25:49 +00:00
and loosely coupled fashion.
2019-02-04 18:06:12 +00:00
2020-05-05 12:16:36 +00:00
.. _Grafana: https://grafana.com/
2019-02-06 17:04:23 +00:00
.. include :: dashboard_plugins/feature_toggles.inc.rst
2019-10-10 09:25:49 +00:00
.. include :: dashboard_plugins/debug.inc.rst
2021-07-05 09:49:33 +00:00
.. include :: dashboard_plugins/motd.inc.rst
2020-04-21 14:07:21 +00:00
Troubleshooting the Dashboard
-----------------------------
Locating the Dashboard
^^^^^^^^^^^^^^^^^^^^^^
If you are unsure of the location of the Ceph Dashboard, run the following command::
$ ceph mgr services | jq .dashboard
"https://host:port"
The command returns the URL where the Ceph Dashboard is located: `` https://<host>:<port>/ ``
.. note ::
2020-11-15 23:06:16 +00:00
Many Ceph tools return results in JSON format. We suggest that
you install the `jq <https://stedolan.github.io/jq> `_ command-line
2021-12-08 11:43:27 +00:00
utility to facilitate working with JSON data.
2020-04-21 14:07:21 +00:00
Accessing the Dashboard
^^^^^^^^^^^^^^^^^^^^^^^
2020-11-15 23:06:16 +00:00
If you are unable to access the Ceph Dashboard, run the following
2020-04-21 14:07:21 +00:00
commands:
#. Verify the Ceph Dashboard module is enabled::
$ ceph mgr module ls | jq .enabled_modules
Ensure the Ceph Dashboard module is listed in the return value of the
command. Example snipped output from the command above::
[
"dashboard",
"iostat",
"restful"
]
#. If it is not listed, activate the module with the following command::
$ ceph mgr module enable dashboard
2020-11-15 23:06:16 +00:00
#. Check the Ceph Dashboard and/or `` ceph-mgr `` log files for any errors.
2020-04-21 14:07:21 +00:00
2020-11-15 23:06:16 +00:00
* Check if `` ceph-mgr `` log messages are written to a file by::
2020-04-21 14:07:21 +00:00
$ ceph config get mgr log_to_file
true
* Get the location of the log file (it's `` /var/log/ceph/<cluster-name>-<daemon-name>.log ``
by default)::
$ ceph config get mgr log_file
/var/log/ceph/$cluster-$name.log
#. Ensure the SSL/TSL support is configured properly:
* Check if the SSL/TSL support is enabled::
$ ceph config get mgr mgr/dashboard/ssl
* If the command returns `` true `` , verify a certificate exists by::
$ ceph config-key get mgr/dashboard/crt
and::
$ ceph config-key get mgr/dashboard/key
2020-11-15 23:06:16 +00:00
* If it doesn't return `` true `` , run the following command to generate a self-signed
2020-04-21 14:07:21 +00:00
certificate or follow the instructions outlined in
:ref: `dashboard-ssl-tls-support` ::
$ ceph dashboard create-self-signed-cert
Trouble Logging into the Dashboard
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
If you are unable to log into the Ceph Dashboard and you receive the following
error, run through the procedural checks below:
.. image :: ../images/dashboard/invalid-credentials.png
:align: center
#. Check that your user credentials are correct. If you are seeing the
notification message above when trying to log into the Ceph Dashboard, it
is likely you are using the wrong credentials. Double check your username
2020-11-15 23:06:16 +00:00
and password, and ensure that your keyboard's caps lock is not enabled by accident.
2020-04-21 14:07:21 +00:00
#. If your user credentials are correct, but you are experiencing the same
error, check that the user account exists::
$ ceph dashboard ac-user-show <username>
This command returns your user data. If the user does not exist, it will
print::
$ Error ENOENT: User <username> does not exist
#. Check if the user is enabled::
$ ceph dashboard ac-user-show <username> | jq .enabled
true
Check if `` enabled `` is set to `` true `` for your user. If not the user is
not enabled, run::
$ ceph dashboard ac-user-enable <username>
Please see :ref: `dashboard-user-role-management` for more information.
A Dashboard Feature is Not Working
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
When an error occurs on the backend, you will usually receive an error
notification on the frontend. Run through the following scenarios to debug.
2020-11-15 23:06:16 +00:00
#. Check the Ceph Dashboard and `` ceph-mgr `` logfile(s) for any errors. These can
found by searching for keywords, such as *500 Internal Server Error* ,
2020-04-21 14:07:21 +00:00
followed by `` traceback `` . The end of a traceback contains more details about
what exact error occurred.
#. Check your web browser's Javascript Console for any errors.
Ceph Dashboard Logs
^^^^^^^^^^^^^^^^^^^
Dashboard Debug Flag
2020-05-06 14:08:16 +00:00
""""""""""""""""""""
2020-04-21 14:07:21 +00:00
2020-11-15 23:06:16 +00:00
With this flag enabled, error traceback is included in backend responses.
2020-04-21 14:07:21 +00:00
To enable this flag via the Ceph Dashboard, navigate from *Cluster* to *Manager
modules*. Select * Dashboard module* and click the edit button. Click the
*debug* checkbox and update.
To enable it via the CLI, run the following command::
$ ceph dashboard debug enable
Setting Logging Level of Dashboard Module
2020-05-06 14:08:16 +00:00
"""""""""""""""""""""""""""""""""""""""""
2020-04-21 14:07:21 +00:00
Setting the logging level to debug makes the log more verbose and helpful for
debugging.
#. Increase the logging level of manager daemons::
$ ceph tell mgr config set debug_mgr 20
#. Adjust the logging level of the Ceph Dashboard module via the Dashboard or
CLI:
* Navigate from *Cluster* to *Manager modules* . Select *Dashboard module*
and click the edit button. Modify the `` log_level `` configuration.
* To adjust it via the CLI, run the following command::
$ bin/ceph config set mgr mgr/dashboard/log_level debug
2020-11-15 23:06:16 +00:00
#. High log levels can result in considerable log volume, which can
easily fill up your filesystem. Set a calendar reminder for an hour, a day,
or a week in the future to revert this temporary logging increase. This looks
something like this::
$ ceph config log
2020-11-03 12:47:23 +00:00
...
2020-11-15 23:06:16 +00:00
--- 11 --- 2020-11-07 11:11:11.960659 --- mgr.x/dashboard/log_level = debug ---
...
$ ceph config reset 11
2021-08-24 09:55:42 +00:00
Reporting issues from Dashboard
"""""""""""""""""""""""""""""""
2021-08-26 10:05:54 +00:00
Ceph-Dashboard provides two ways to create an issue in the Ceph Issue Tracker,
2021-08-24 09:55:42 +00:00
either using the Ceph command line interface or by using the Ceph Dashboard
2021-08-26 10:05:54 +00:00
user interface.
2021-08-24 09:55:42 +00:00
To create an issue in the Ceph Issue Tracker, a user needs to have an account
on the issue tracker. Under the `` my account `` tab in the Ceph Issue Tracker,
the user can see their API access key. This key is used for authentication
when creating a new issue. To store the Ceph API access key, in the CLI run:
`` ceph dashboard set-issue-tracker-api-key -i <file-containing-key> ``
Then on successful update, you can create an issue using:
`` ceph dashboard create issue <project> <tracker_type> <subject> <description> ``
The available projects to create an issue on are:
#. dashboard
#. block
2021-08-26 10:05:54 +00:00
#. object
#. file_system
2021-08-24 09:55:42 +00:00
#. ceph_manager
#. orchestrator
#. ceph_volume
#. core_ceph
The available tracker types are:
#. bug
#. feature
2021-08-26 10:05:54 +00:00
The subject and description are then set by the user.
2021-08-24 09:55:42 +00:00
The user can also create an issue using the Dashboard user interface. The settings
icon drop down menu on the top right of the navigation bar has the option to
`` Raise an issue `` . On clicking it, a modal dialog opens that has the option to
2021-08-26 10:05:54 +00:00
select the project and tracker from their respective drop down menus. The subject
2021-08-24 09:55:42 +00:00
and multiline description are added by the user. The user can then submit the issue.