Skip to content

Glances

Glances is a monitoring tool that allows real-time monitoring of various aspects of your system such as CPU, memory, disk, network usage, running processes, logged in users, temperatures, voltages, fan speeds etc.

Glances screenshot

Resources

Prerequisites

In the server root directory, create a folder called glances/. cd into it and create the file docker-compose.yml.

For instructions on how to use Glances as a widget on Homepage, please see Setup on Homepage (To do...)

Docker Compose

docker-compose.yml
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
---
services:
  glances:
    container_name: glances
    image: nicolargo/glances:4.1.2.1-full
    restart: unless-stopped
    ports:
      - 61208:61208
    environment:
      - TZ=Europe/Stockholm
      - GLANCES_OPT=-w # Glances option to run as a web server
    pid: host # Use the host's PID namespace
    volumes:
      # Docker socket for monitoring
      - /var/run/docker.sock:/var/run/docker.sock:ro 

Configuration

  • Ports - Select an avaliable port for the UI.
  • Environment

    • TZ - Set your local timezone.
    • GLANCES_OPT=-w: Run Glances as a webserver.
  • PID - pid: host: Use the host's PID namespace

Deploy the container

Run the Docker Compose file as a stack in Portainer or with:

docker compose up -d

Login

UI: http://server-ip:61208

API

To check if the IP works, you can run this code:

curl http://server-ip:61208/api/4/status

You should then get a JSON response like:

{"version":"4.1.2"}

Refer to the documentation for what requests are available.