Skip to content

Configure the Glances Service

The Glances service reads its configuration from a single TOML file, pointed to by the TOLOMEO_CONFIG environment variable. This guide covers the service's own [plugins.glances_stats] table; for the shared [nats] and [service] tables, see the Py ToloMEO Configure NATS guide.

Set the poll interval

[plugins.glances_stats]
# Seconds between readings. Must be positive. 5.0 is the default.
interval_s = 60.0

Choose the API version

[plugins.glances_stats]
api_version = 4

Point at the Glances server

The service polls http://<hostname>:<port>/api/<api_version>/cpu. Both parts default to a server on the same host, so you only need these keys when Glances runs elsewhere:

[plugins.glances_stats]
hostname = "localhost"  # default
port = 61208            # default

Note

With the defaults the service reaches a Glances server co-located on the same host (or dockerized on the same host/network) at http://localhost:61208. See the Glances documentation for setting up the server itself.

Run it

TOLOMEO_CONFIG=./tlm_glances.toml tlm_glances