Resource monitoring in docker swarm is performed with Prometheus. The following exporters are used:
- Node exporter for gathering general hardware information
- cAdvisor for gathering information about running docker containers
Example configuration file for Prometheus is at config/prometheus/prometheus.conf.
Since metrics are only updated periodically, a delay may be needed to be sure that the metric has been updated when requesting information about running system.