The following diagrams outline the involved parties and how the interact when the clients
query for the reports:
-.. seqdiag::
-
- seqdiag {
- default_note_color = lightblue;
- osd; mon; ceph-cli;
- osd => mon [ label = "update osdmap service" ];
- osd => mon [ label = "update osdmap service" ];
- ceph-cli -> mon [ label = "send 'health' command" ];
- mon -> mon [ leftnote = "gather checks from services" ];
- ceph-cli <-- mon [ label = "checks and mutes" ];
- }
-
-.. seqdiag::
-
- seqdiag {
- default_note_color = lightblue;
- osd; mon; mgr; mgr-module;
- mgr -> mon [ label = "subscribe for 'mgrdigest'" ];
- osd => mon [ label = "update osdmap service" ];
- osd => mon [ label = "update osdmap service" ];
- mon -> mgr [ label = "send MMgrDigest" ];
- mgr -> mgr [ note = "update cluster state" ];
- mon <-- mgr;
- mgr-module -> mgr [ label = "mgr.get('health')" ];
- mgr-module <-- mgr [ label = "heath reports in json" ];
- }
Where are the Reports Generated
===============================
``MDSMonitor``, it persists the health metrics in the beacon sent by the MDS daemons,
and prepares health reports when storing the pending changes.
-.. seqdiag::
-
- seqdiag {
- default_note_color = lightblue;
- mds; mon-mds; mon-health; ceph-cli;
- mds -> mon-mds [ label = "send beacon" ];
- mon-mds -> mon-mds [ note = "store health metrics in beacon" ];
- mds <-- mon-mds;
- mon-mds -> mon-mds [ note = "encode_health(checks)" ];
- ceph-cli -> mon-health [ label = "send 'health' command" ];
- mon-health => mon-mds [ label = "gather health checks" ];
- ceph-cli <-- mon-health [ label = "checks and mutes" ];
- }
So, if we want to add a new warning related to cephfs, probably the best place to
start is ``MDSMonitor::encode_pending()``, where health reports are collected from
an aggregated report to the ``MgrStatMonitor`` service on mon. As explained earlier,
this service just persists the health reports in the aggregated report to the monstore.
-.. seqdiag::
-
- seqdiag {
- default_note_color = lightblue;
- service; mgr; mon-mgr-stat; mon-health;
- service -> mgr [ label = "send(open)" ];
- mgr -> mgr [ note = "register the new service" ];
- service <-- mgr;
- mgr => service [ label = "send(configure)" ];
- service -> mgr [ label = "send(report)" ];
- mgr -> mgr [ note = "update/aggregate service metrics" ];
- service <-- mgr;
- service => mgr [ label = "send(report)" ];
- mgr -> mon-mgr-stat [ label = "send(mgr-report)" ];
- mon-mgr-stat -> mon-mgr-stat [ note = "store health checks in the report" ];
- mgr <-- mon-mgr-stat;
- mon-health => mon-mgr-stat [ label = "gather health checks" ];
- service => mgr [ label = "send(report)" ];
- service => mgr [ label = "send(close)" ];
- }