mgr/dashboard: implement self-test for dashboard
self-test module allows, among other things, to run self-tests in other modules:
mgr self-test module <module>
That basically invokes a remote python method (self_test) in another module and returns its current status.In the case of the dashboard, it can be used as a post-deployment state (or periodically by a probe), to check, for example, the status of the different interfaces (or anything that would normally not fail until a user starts browsing the dashboard web UI):
- RGW client
- iSCSI client
- NFS ganesha
- Grafana, Prometheus & Alertmanager endpoints
Usually, failures at these dependent components only appear when a user accesses, in the front-end UI, the affected component (e.g.: RGW -> buckets page).
By having this self-test method we allow users to quickly ensure that everything is OK from back-end/python side, either periodically (probing) or during the validation stage of a deployment workflow.