]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
doc: update docs for centralized logging 46087/head
authorAashish Sharma <aasharma@redhat.com>
Fri, 29 Apr 2022 05:13:45 +0000 (10:43 +0530)
committerAashish Sharma <aasharma@redhat.com>
Tue, 28 Jun 2022 10:52:24 +0000 (16:22 +0530)
Signed-off-by: Aashish Sharma <aasharma@redhat.com>
doc/cephadm/services/monitoring.rst
doc/mgr/dashboard.rst

index a17beba6d1e18f40285edbbd734dd4b490414bc5..5f9d828909579c06812fd85d8950315dbf3b2605 100644 (file)
@@ -83,6 +83,28 @@ steps below:
 
      ceph orch apply grafana
 
+.. _cephadm-monitoring-centralized-logs:
+
+Centralized Logging in Ceph
+~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Ceph now provides centralized logging with Loki & Promtail. Centralized Log Management (CLM) consolidates all log data and pushes it to a central repository, 
+with an accessible and easy-to-use interface. Centralized logging is designed to make your life easier. 
+Some of the advantages are:
+
+#. **Linear event timeline**: it is easier to troubleshoot issues analyzing a single chain of events than thousands of different logs from a hundred nodes.
+#. **Real-time live log monitoring**: it is impractical to follow logs from thousands of different sources.
+#. **Flexible retention policies**: with per-daemon logs, log rotation is usually set to a short interval (1-2 weeks) to save disk usage.
+#. **Increased security & backup**: logs can contain sensitive information and expose usage patterns. Additionally, centralized logging allows for HA, etc.
+
+Centralized Logging in Ceph is implemented using two new services - ``loki`` & ``promtail``.
+
+Loki: It is basically a log aggregation system and is used to query logs. It can be configured as a datasource in Grafana. 
+
+Promtail: It acts as an agent that gathers logs from the system and makes them available to Loki.
+
+These two services are not deployed by default in a Ceph cluster. To enable the centralized logging you can follow the steps mentioned here :ref:`centralized-logging`.
+
 .. _cephadm-monitoring-networks-ports:
 
 Networks and Ports
index 60fca266e3ec65ac6da6aa9be78db827e1d43e46..11fcf482b5892e90231d013ea37fec13492dbe62 100644 (file)
@@ -1369,6 +1369,36 @@ something like this::
     ...
     $ ceph config reset 11
 
+.. _centralized-logging:
+
+Enable Centralized Logging in Dashboard
+"""""""""""""""""""""""""""""""""""""""
+
+To learn more about centralized logging, see :ref:`cephadm-monitoring-centralized-logs`
+
+1. Create the Loki service on any particular host using "Create Services" option.
+
+2. Similarly create the Promtail service which will be by default deployed 
+   on all the running hosts.
+
+3. To see debug-level messages as well as info-level events, run the following command via CLI::
+
+    $ ceph config set mgr mgr/cephadm/log_to_cluster_level debug
+
+4. To enable logging to files, run the following commands via CLI::
+
+    $ ceph config set global log_to_file true
+
+    $ ceph config set global mon_cluster_log_to_file true
+
+5. Click on the Daemon Logs tab under Cluster -> Logs.
+
+6. You can find some pre-defined labels there on clicking the Log browser button such as filename,
+   job etc that can help you query the logs at one go.
+
+7. You can query the logs with LogQL for advanced search and perform some
+   calculations as well - https://grafana.com/docs/loki/latest/logql/.
+
 
 Reporting issues from Dashboard
 """""""""""""""""""""""""""""""