Skip to content

Clustering

AstorisTheBrave edited this page Jun 17, 2026 · 5 revisions

Clustering

Argus supports both single-process and clustered (multi-process) deployments. The cluster label keeps them apart.

Single process

One AutoShardedBot, one Argus, one /metrics endpoint exposing all shards. cluster_id is optional (it defaults to default).

Argus(bot)

Clustered

Run one Argus per process, each with a distinct cluster_id and port:

Argus(bot, cluster_id="0", port=9191)   # process 0
Argus(bot, cluster_id="1", port=9192)   # process 1

List every port in prometheus/prometheus.yml. The state gauges carry the distinct cluster label, so the dashboards' $cluster variable separates them, while counter rates aggregate across the fleet at query time.

Do not also set a cluster target label in the scrape config: Argus already emits one on the gauges, and Prometheus would rename the target label to exported_cluster to avoid the clash.

See examples/clustered_bot.py in the repository.

Clone this wiki locally