Skip to content

Glances 5.0.0

Latest

Choose a tag to compare

@nicolargo nicolargo released this 05 Dec 10:20
· 2 commits to develop since this release

Glances version 5 is a complete refactoring of Glances:

  • an asyncio collection scheduler: each plugin is collected on its own refresh
    rate into a shared stats store, read by the TUI, the REST API, the exporters
    and the MCP server
  • a REST API served by FastAPI under /api/5, with a new data model
  • a new curses TUI and a new Vue 3 WebUI
  • a new exporter base shared by all the export modules
  • a new alerts engine with an optional health IA report.

Glances version 4 continues on the support/glancesv4 branch, which
receives the 4.5.x security releases.

BREAKING CHANGES:

Command line:

  • The XML-RPC server and client are removed (no more port 61209). -s/--server
    now runs the REST API and WebUI server on port 61208 (-w/--webserver is kept
    as an alias), and -c/--client connects the TUI to a Glances 5 server through
    the REST API. A Glances 5 client cannot talk to a Glances 4 server, and the
    reverse

  • -B/--bind defaults to 127.0.0.1 (Glances 4: 0.0.0.0). Set
    [outputs] bind_address or pass -B 0.0.0.0 to listen on all interfaces.
    The Docker images listen on 0.0.0.0 through their shipped configuration file

  • --password only prompts for the server password in client mode. A server is
    protected by [outputs] password, set to the hash printed by
    glances --set-password. Glances 4 password hashes are not compatible and must
    be regenerated

  • -u/--username takes the user name as a value (Glances 4 --username
    prompted for it)

  • --api-doc no longer prints the Python API documentation: --api-doc /
    --no-api-doc turn the Swagger (/docs) and ReDoc (/redoc) pages on or off

  • --fetch templates written for Glances 4 break: they are rendered against the
    Glances 5 Python API and field names changed (for example, no
    bytes_recv_rate_per_sec / bytes_sent_rate_per_sec in the network plugin,
    gl.uptime is no longer a string)

  • Removed options:

    • --cached-time: a Glances 5 server always collects on its own schedule,
      use [<plugin>] refresh to tune its CPU usage
    • --disable-check-update: the PyPI update check is removed (no outbound
      request at startup)
    • -P/--plugins and [global] plugin_dir: external plugins are removed,
      plugins are only loaded from the installed glances.plugins package
    • --enable-process-extended: select the process and press ENTER instead
    • --trace-malloc: set PYTHONTRACEMALLOC by hand when needed
      (--memory-leak is still available)
    • --snmp-community, --snmp-port, --snmp-version, --snmp-user,
      --snmp-auth and --snmp-force: the SNMP fallback of the client mode is
      removed (and the snmp extra with it)
    • --sparkline (and the sparklines extra)
  • New options: --set-password, --no-api-doc and --no-tui (alias of
    -q/--quiet)

Configuration file:

  • Threshold keys are renamed, without alias:

    • [network] rx_* / tx_* are now bytes_recv_* / bytes_sent_*,
      and their values are ratios of the link capacity in [0,1]
      (bytes_recv_careful=0.7), not percents
    • [processlist] cpu_* / mem_* are now cpu_percent_* /
      memory_percent_*
    • [fs] <mnt>_careful (and warning, critical) are now
      <mnt>_percent_careful

    An unrecognised threshold key is ignored, with a WARNING at startup

  • Backtick command substitution in configuration values is removed
    (CVE-2026-33641)

  • The graph export writes by default in $XDG_DATA_HOME/glances/graphs
    (~/.local/share/glances/graphs), not in the shared temporary folder

  • Option names keep their case (/srv/Data and /srv/data are two
    mount points); a lower-case key still matches a mixed-case item

Exports:

  • MQTT and Prometheus: a collection item whose key holds a dot (VLAN
    eth0.100, mount point /mnt/v1.2) stays one item. MQTT publishes
    <plugin>/eth0_100/rx (Glances 4: <plugin>/eth0/100/rx) and no longer
    nests it in its parent interface; Prometheus exports
    glances_network_rx{interface_name="eth0.100"}
  • OpenTSDB metric names are reduced to [A-Za-z0-9_./-] (a mount point with
    a space stopped the export of the rest of the plugin)

TUI:

  • Key 4 shows the quicklook alone, full width (Glances 4 left LOAD and the
    per-CPU block on the row)
  • Process management: F4 opens the process filter (Glances 4: ENTER) and
    ENTER pins the selected process for its extended stats (Glances 4: e)
  • The trend arrows next to MEM, SWAP and LOAD are removed
  • The TIME column of the alerts shows the date and the time
    (YY-MM-DD HH:MM:SS)
  • The vms Name column is renamed VM, and its columns are aligned with
    the containers block
  • The containers block has no CONTAINERS N (served by …) title row any more:
    the CONTAINER column header is the title

REST API:

  • The API is /api/5, with a new data model: Glances 4 API clients must be
    migrated (see the RESTful API documentation)
  • The _min, _max and _mean fields of cpu.total, load.min1 and
    mem.percent (mmm) are removed, from the API and from the exports
  • /api/5/<plugin>/history returns a columnar {timestamps, series} object,
    with the nb, field and item query parameters (the Glances 4
    /history/<nb> and /<item>/history paths are gone). The default history
    size is 1200 points ([global] history_size)
  • Fine-grained routes: /api/5/<plugin>/<field>/value/<value> and
    /api/5/<plugin>/<field>/<item> compare values as text, an unknown field
    answers 404 (Glances 4: 200 null), and the top, value and item
    routes answer 404 on a plugin which is not a collection
  • /api/5/config/<section> and /api/5/config/<section>/<key> are removed:
    read the key from /api/5/config
  • Without a password, /api/5/config only returns the keys the WebUI uses; the
    full (redacted) configuration needs a password
  • [outputs] theme is no longer served by /api/5/config (it can be a file
    path): the WebUI reads it from the new /api/5/theme endpoint
  • A server bound on a loopback address only accepts the localhost,
    127.0.0.1 and [::1] Host headers (DNS rebinding protection): a reverse
    proxy on the same host which forwards its own Host header must be listed in
    [outputs] webui_allowed_hosts

Security (post-cutover audit of 2026-10-17):

  • ClickHouse export: the table name is quoted in the INSERT statement too (a
    plugin name published by a remote server reached it raw under -c --export),
    and a remote server's plugin names must look like plugin names
  • X-Forwarded-For is ignored unless the new [outputs] forwarded_allow_ips
    lists the proxies: a local client could rotate it to escape the
    failed-authentication limit. The Server header is no longer sent
  • The password checks run at most two at a time, and filling the rate-limit
    table no longer frees a locked-out address
  • [outputs] jwt_secret_key must be at least 32 characters (the shipped example
    value is refused); tokens need exp and iat and must name the configured
    user; jwt_expire_minutes is capped to a day
  • InfluxDB 1.x and 2.x exports verify the server's TLS certificate (it was
    never checked); the new optional [influxdb]/[influxdb2] ssl_verify
    key accepts false or a CA bundle path
  • Zeroconf: an announcement pointing at a loopback, link-local, multicast,
    unspecified, broadcast or reserved address is ignored, as is one using the
    name or alias of a [serverlist] server; at most 256 discovered servers
    are followed. The TUI and Web UI browsers list a discovered server as
    <name> (zeroconf <address>), and the password prompt names the address
    and warns before sending it over clear HTTP
  • -c and --browser: a server's answer is read in a stream, cut at 32 MiB
    (100 KiB of gzip inflated to 200 MiB in memory) and within one deadline (a
    body dripped byte by byte never timed out); a body that is not JSON, too
    deep, or a token that is not one, is reported instead of stopping the
    client, and one server's malformed _levels no longer ends the browser's
    polling round for the servers after it
  • Exporters: Graphite and StatsD metric paths are filtered to
    [A-Za-z0-9_.-] (a newline in a monitored name wrote a second metric);
    a Prometheus item key is one label value, never re-parsed (eth0,src:x
    overwrote a label, a,b lost the plugin's cycle); a URL's credentials
    and query string are removed from an exported configuration value before
    it is split on ,; the RabbitMQ user and password are percent-encoded
    in the AMQP URL; NATS and restful never log a URL's credentials; a CSV
    text cell that reads as a spreadsheet formula (=, +, -, @,
    tab, CR) is prefixed with '
  • A -C path that does not exist stops Glances instead of starting with the
    defaults (and without the password that file carried)
  • /openapi.json is served only when api_doc is on
  • An on-alert or AMP command whose pipeline cannot start no longer leaves a
    process behind; the commands read nothing from the terminal
  • --hide-public-info also hides the public IP information text, which a
    {ip} template repeats (GHSA-vg43-q6xr-hp92)
  • A wrong user name takes as long to refuse as a wrong password (the password
    check always runs); /api/5/token decodes Basic credentials as UTF-8, like
    the WebUI, so a non-ASCII password works with glances -c too; a malformed
    [outputs] password value logs a CRITICAL and refuses every login instead
    of answering 500
  • Every response carries X-Content-Type-Options: nosniff,
    X-Frame-Options: DENY and Referrer-Policy: same-origin; a POST (sort,
    pin) coming from another web site (Sec-Fetch-Site: cross-site, or an
    Origin which is neither the server nor one of cors_origins) is refused
    with 403
  • glances --set-password prints pbkdf2_sha256$600000$<salt>$<hex>
    (PBKDF2-SHA256, 600 000 iterations, a 32-byte key): the server no longer does
    four times the work of an attacker testing a candidate. The <salt>$<hex>
    hashes written by the 5.0.0 betas are still accepted
  • Without a password, /api/5/args only returns the flags the WebUI reads
    (--fahrenheit, --percpu, --hide-public-info...); the whole
    (redacted) argument list, export file paths and process filter included,
    needs a password
  • An on-alert command's redirection target is written without following a
    symbolic link, a {{mustache}} value in it may only pick a file name (no
    /, .. or NUL), and >> (append) is accepted
  • Running as root, a user configuration file, a log folder or a LOG_CFG
    file not owned by root or writable by others is ignored (sudo -E keeps
    the invoking user's HOME); the log file is never opened through a link
  • ip plugin: the public API client speaks http(s) only, a redirect to
    another scheme (ftp://, file:) is refused instead of reaching the
    private network through urllib's default handlers
  • Central browser: a server discovered by Zeroconf can no longer redirect the
    poller, nor the client opened from the browser, to another address
    (GHSA-jrpw-qg6j-vqv3). -c and [serverlist] servers still follow
    redirects (a reverse proxy may send one)
  • --stdout, --stdout-csv and --fetch replace the terminal control
    characters of a stat value by ? as the TUI does; --fetch-template is
    rendered in a Jinja2 sandbox; --issue also redacts the container names
    and commands, the ports URLs, VM names, SSIDs, mount points, AMP results and
    the credentials of URLs quoted in the logged warnings
  • folders: the size walk is iterative (a thousand nested folders, which
    any user able to mkdir under a watched folder can plant, disabled the
    plugin); the default Podman socket is /run/podman/podman.sock as root
    and $XDG_RUNTIME_DIR/podman/podman.sock otherwise, no longer uid 1000's
  • Importing Glances no longer pushes the package's amps/, plugins/ and
    exports/ folders onto sys.path (import cpu resolved inside
    Glances); the unused system_exec helper and the uninstall.sh script
    (it needed the removed setup.py; use pip uninstall glances) are gone

Enhancements:

  • AI health report, on request: the H key (TUI and WebUI), the "AI report"
    button of the WebUI alerts or POST /api/5/llm_reporter/request. An LLM
    describes the current metrics, their trends, the alert incidents and the top
    processes. Opt-in through the new [llm_reporter] section (LiteLLM,
    Anthropic, OpenAI or a local Ollama)
  • WebUI user themes: [outputs] theme also accepts the path of a CSS file
    (see conf/sample_theme.css)
  • WebUI: the history curves are coloured by threshold level, and the CPU total
    has its history
  • Alerts: a STATE column (ongoing / resolved); an ongoing incident shows its
    current level, its glyph the peak level
  • /api/5/all/msgpack: all the stats in one MessagePack answer
  • [outputs] url_prefix: serve Glances under a path, for a reverse proxy
    which forwards it unchanged (/status and /healthz move under the
    prefix too). A proxy which strips the prefix needs no setting: the WebUI uses
    relative URLs
  • [outputs] webui_root_path: serve the WebUI from another folder, for a
    distribution which does not ship it
  • [containers] no_stats: do not collect the stats of the matching Docker
    containers at all (#3703)
  • [processlist] disable_virtual_memory hides the VIRT column
  • [vms] virsh_extra_option passes options to virsh (for example
    -c qemu:///system)
  • GPU: real Intel GPU load from the fdinfo engine counters, Intel GPU memory
    usage from the fdinfo resident memory (a discrete card over its PCI memory
    aperture, so only with resizable BAR; an integrated one over the system
    memory), Intel temperature from hwmon, ARM GPU temperature from the SoC
    thermal zone when there is no hwmon, and each card's temperature in the
    multi-GPU view. A temperature already shown by the sensors plugin (AMD,
    Intel) is not repeated; [gpu] hide_temperature=True hides it for every
    card, hide_temperature=False shows it for every card
  • Containers: the Podman engine reports the healthcheck status (starting,
    healthy, unhealthy) as the container status, like the Docker engine
  • psutil 8 is supported, as is Python 3.15

Special notes for package maintainers:

  • Minimal Python version is now 3.11 (Python 3.10 is end-of-life)
  • Core dependencies are psutil, requests, jinja2, shtab (all but Windows) and
    windows-curses (Windows only): defusedxml and packaging are no longer needed
  • The snmp and sparklines extras are removed
  • New server extra (browser, mcp and web): everything the
    server mode needs. The standalone TUI starts without the web extra
  • New optional extras for the AI report: llm-litellm (litellm, tenacity),
    llm-anthropic, llm-openai and llm-ollama
  • The Docker images run python -m glances with
    /etc/glances/glances.conf (copied from docker-compose/glances.conf) and
    expose port 61208 only

And finally a big thank to all the contributors:
Luis Figueroa (LuisFigueroaG), Shahnawaz106 (Shahnawaz106), RazCrimson (RazCrimson),
Daniel Yakubu (dyakubu), xu91102 (xu91102), Raphael Erik Hviding (TheSkyentist),
Param Tanna (ParamTanna), snowyukitty (snowyukitty), joyhsia (joyhsia),
anasdahani220 (anasdahani220), XXXXXQ-0206 (XXXXXQ-0206),
Shashwat Pratap Singh (Shrinet82), Santhi Prakash (santhiprakash),
Ryan Chou (ryanchou1994), Meer Khurram (imeerkhurram),
Jonatha Costa (JonathaCosta10), sgreadly (sgreadly), flyingnobita (flyingnobita),
cf3901646 (cf3901646), OrangeJuice (Juice-de-Orange), Lucas Barros (lbarrosby),
Iain (NotAFlightRisk), Enes Uygur (Enesuygurs), Carsten Haerle (chaerle),
Faris Basha TM (farisbasha) and adityajai119 (adityajai119).