Applications cannot always expose Prometheus metrics natively. Exporters act as translators: they query third-party systems, databases, or operating systems and expose metrics in the standard Prometheus text exposition format.
The Prometheus Text Exposition Format
When you run curl http://localhost:9100/metrics, you see the OpenMetrics standard format:
Each metric contains:
# HELP: Human-readable documentation.# TYPE: Metric type (counter,gauge,histogram,summary).- Metric Name + Key/Value Labels.
- Float64 Value.
1. Node Exporter: Deep Linux Host Metrics
Node Exporter gathers deep operating system hardware metrics from /proc and /sys.
Key Metric Families:
node_cpu_seconds_total: CPU breakdown by core and mode (idle, user, system, iowait, steal).node_memory_*: Memory utilization, buffers, cached, available RAM.node_disk_*: Disk read/write operations, bytes transferred, disk queue time (I/O saturation).node_network_*: Inbound/outbound bytes, dropped packets, interface errors.node_filesystem_*: Free disk space and total inodes.
2. cAdvisor: Container Metrics
cAdvisor (Container Advisor) by Google auto-discovers all running Docker containers and measures CPU, memory, filesystem, and network usage per container.
Key Metric Families:
container_memory_working_set_bytes: Actual memory used (matches the Linux OOM Killer threshold).container_cpu_usage_seconds_total: Total CPU consumed by container.container_cpu_cfs_throttled_periods_total: Count of times container hit its CPU limit and was throttled!
Complete Multi-Service Stack Configuration
Here is the complete docker-compose.yml to run Prometheus, Node Exporter, and cAdvisor:
Start the containers: