Glances System Monitor
Glances cross-platform system monitoring tool with web interface.
[i]Overview
Glances is a cross-platform system monitoring tool written in Python that provides real-time insights into system performance through both command-line and web interfaces. Originally created by Nicolas Hennion, Glances stands out from traditional monitoring tools by offering a comprehensive view of CPU, memory, disk I/O, network traffic, and process information in a single unified interface, with the ability to monitor both local and remote systems through various protocols.
This deployment runs a single Glances container using the nicolargo/glances:latest-full image, which includes all monitoring capabilities and dependencies in one container. The configuration enables web mode through the GLANCES_OPT=-w environment variable, exposing the web interface on port 61208, and mounts the Docker socket to provide container-level monitoring alongside traditional system metrics. The container runs in host PID mode to access complete system process information and mounts system files for accurate OS detection.
This setup is ideal for system administrators, DevOps teams, and homelab enthusiasts who need immediate visibility into system performance without complex multi-service deployments. The all-in-one nature makes it perfect for quick deployment scenarios, development environments, or as a lightweight monitoring solution that can export data to more comprehensive monitoring platforms like Prometheus or InfluxDB when needed.
[*]Key Features
- [+]Real-time system metrics including CPU, memory, disk I/O, network, and temperature monitoring
- [+]Docker container monitoring through mounted Docker socket integration
- [+]RESTful API endpoint at /api/3 for programmatic access to all metrics
- [+]Built-in web interface accessible via browser with responsive design
- [+]Export capabilities to InfluxDB, Prometheus, CSV, and other data formats
- [+]Configurable alerting system with threshold-based notifications
- [+]Process-level monitoring with detailed per-process resource usage
- [+]Cross-platform compatibility with automatic OS detection and adaptation
[#]Common Use Cases
- [1]Homelab monitoring for tracking server performance and resource utilization
- [2]Development environment monitoring to identify resource bottlenecks during testing
- [3]Lightweight server monitoring for small to medium-sized deployments
- [4]Container performance analysis and Docker resource usage tracking
- [5]System health dashboards for NOC displays or wall-mounted monitors
- [6]Data source for external monitoring systems through REST API integration
- [7]Quick system diagnostics and troubleshooting during performance issues
[!]Prerequisites
- [!]Docker Engine 20.0+ with access to host system resources
- [!]Minimum 100MB RAM for the Glances container itself
- [!]Port 61208 available for web interface access
- [!]Docker socket access permissions for container monitoring features
- [!]Host PID namespace access for complete process monitoring
- [!]Basic understanding of system metrics interpretation and analysis
[!]
WARNING: For development & testing. Review security settings, change default credentials, and test thoroughly before production use. See Terms
[$]docker-compose.yml
[docker-compose.yml]
1services: 2 glances: 3 image: nicolargo/glances:latest-full4 container_name: glances5 environment: 6 - TZ=${TZ}7 - GLANCES_OPT=-w8 volumes: 9 - /var/run/docker.sock:/var/run/docker.sock:ro10 - /etc/os-release:/etc/os-release:ro11 ports: 12 - "61208:61208"13 pid: host14 restart: unless-stopped15 networks: 16 - glances-network1718networks: 19 glances-network: 20 driver: bridge[$].env Template
[.env]
1# Glances2TZ=UTC[i]Usage Notes
- [1]Web UI at http://localhost:61208
- [2]REST API at :61208/api/3
- [3]Docker container stats
- [4]Export to InfluxDB, Prometheus
- [5]Alerting support
[>]Quick Start
[terminal]
1# 1. Create the compose file2cat > docker-compose.yml << 'EOF'3services:4 glances:5 image: nicolargo/glances:latest-full6 container_name: glances7 environment:8 - TZ=${TZ}9 - GLANCES_OPT=-w10 volumes:11 - /var/run/docker.sock:/var/run/docker.sock:ro12 - /etc/os-release:/etc/os-release:ro13 ports:14 - "61208:61208"15 pid: host16 restart: unless-stopped17 networks:18 - glances-network1920networks:21 glances-network:22 driver: bridge23EOF2425# 2. Create the .env file26cat > .env << 'EOF'27# Glances28TZ=UTC29EOF3031# 3. Start the services32docker compose up -d3334# 4. View logs35docker compose logs -f[>]One-Liner
Run this command to download and set up the recipe in one step:
[terminal]
1curl -fsSL https://docker.recipes/api/recipes/glances-monitoring/run | bash[?]Troubleshooting
- [!]Web interface shows 'connection refused': Verify port 61208 is not blocked by firewall and container is running with GLANCES_OPT=-w
- [!]Docker containers not visible in monitoring: Check that /var/run/docker.sock is properly mounted and accessible by the glances container
- [!]Missing process information or incomplete CPU stats: Ensure container is running with pid: host configuration for full system access
- [!]High memory usage by Glances container: Reduce monitoring frequency or disable unused plugins through GLANCES_OPT configuration
- [!]API endpoints returning empty data: Verify REST API is enabled and accessible at http://localhost:61208/api/3, check container logs for errors
- [!]Temperature sensors not detected: Install lm-sensors on host system and ensure hardware monitoring modules are loaded
Community Notes
Loading...
Loading notes...
## Download Recipe Kit
Get all files in a ready-to-deploy package
Includes docker-compose.yml, .env template, README, and license
## Components
glances
## Tags
#glances#monitoring#system#dashboard#psutil
## Category
Monitoring & ObservabilityShortcuts: C CopyF FavoriteD Download