Bird
0
0

You want to monitor multiple Docker hosts with Prometheus and cAdvisor. Which setup is best?

hard📝 Workflow Q15 of 15
Docker - Logging and Monitoring
You want to monitor multiple Docker hosts with Prometheus and cAdvisor. Which setup is best?
ARun cAdvisor on each host exposing metrics, configure Prometheus to scrape all hosts
BRun one cAdvisor container on a central host to monitor all hosts
CRun Prometheus on each host and aggregate metrics manually
DUse Docker Compose to run a single cAdvisor and Prometheus on one host only
Step-by-Step Solution
Solution:
  1. Step 1: Understand cAdvisor scope

    cAdvisor monitors containers on the host it runs on; to monitor multiple hosts, run cAdvisor on each host.
  2. Step 2: Configure Prometheus for multi-host scraping

    Prometheus can scrape metrics from multiple cAdvisor instances by listing all hosts in its config.
  3. Step 3: Evaluate other options

    Central cAdvisor cannot monitor other hosts; running Prometheus on each host complicates aggregation; single host setup misses other hosts.
  4. Final Answer:

    Run cAdvisor on each host exposing metrics, configure Prometheus to scrape all hosts -> Option A
  5. Quick Check:

    One cAdvisor per host + Prometheus scrape all = Run cAdvisor on each host exposing metrics, configure Prometheus to scrape all hosts [OK]
Quick Trick: One cAdvisor per host, Prometheus scrapes all [OK]
Common Mistakes:
  • Thinking one cAdvisor can monitor all hosts
  • Running multiple Prometheus instances unnecessarily
  • Ignoring multi-host scraping config

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Docker Quizzes