feat(logs-and-metrics): support multi-node swarms — agent runs as 1 replica on managers only (1/N coverage, can fail to start entirely)
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 18/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- docker, typescript
- Ambito
- devops, infrastructure, observability
Direzione di ricerca
Start in packages/server/src/setup/vector-setup.ts, around the vector and cadvisor service specs (roughly lines 501-509 and 552-559), where the Replicated mode and the node.role==manager constraint are set. Reproducing the problem needs a multi-node swarm, and the design choices (Mode: Global, Swarm Config for the Vector file) are open for maintainers to decide. Done means the agent runs on every eligible node and its config reaches each one, or the dashboard warns about single-node limits.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
What problem will this feature address?
On a multi-node Docker Swarm, the Logs & Metrics agent only covers a fraction of the cluster (or fails to start entirely):
dokploy-vectoranddokploy-cadvisorare deployed asReplicated: { Replicas: 1 }withPlacement.Constraints: ["node.role==manager"](packages/server/src/setup/vector-setup.ts, ~lines 501–509 and 552–559). On a swarm with 4 managers + 3 workers, the scheduler picks one manager.- Every data source is node-local: container logs come from the bind-mounted local
/var/run/docker.sock, host metrics from the local/proc+/sysmounts, container metrics from a loopback scrape of cAdvisor (127.0.0.1:4510). So only the containers and host metrics of that single manager are shipped — coverage ≈ 1/N, and there is no placement guarantee that it is even the "interesting" node. - Worse, the Vector config is written to a node-local path (
/etc/dokploy/vector/vector.yaml) that exists only on the host where the control plane wrote it. If the scheduler places the task on a manager without that file, the bind mount fails and the task cannot start at all — the service flaps until it happens to land on the right node (0/N coverage in the meantime). Docker provides no placement guarantee for 1-replica services.
Net effect: in a multi-node swarm the feature is silently partial (logs/metrics of ~1 node out of N), and can be entirely down due to the missing bind-mount source — with no warning in the UI.
Describe the solution you'd like
Deploy the agent in a way that matches multi-node swarms:
Mode: Global(optionally with a configurable constraint, e.g. managers-only vs all nodes), so every node runs Vector + cAdvisor — this also guarantees vector↔cadvisor co-location per node, which the current loopback scrape requires.- Distribute the Vector config to every node via a Swarm Config object (instead of a node-local bind mount), so the file exists wherever the task runs; per-node identity can be injected with
{{.Node.Hostname}}env templating and attached as a tag/label to host metrics. - If per-node coverage is out of scope for now, at minimum warn in the dashboard when deploying the agent to a swarm with more than one eligible node, and document the single-node limitation.
Describe alternatives you've considered
- Enabling the agent anyway and accepting 1/N coverage (current behavior, confusing).
- Registering each node as a separate "remote server" so each gets its own agent — requires SSH-to-self connectivity per node and multiplies servers in the UI for what is one logical cluster.
- Self-managing a global Vector stack outside Dokploy (works, but leaves Dokploy's agent ecosystem behind).
Additional context
- Verified against
canarysource on 2026-11-12; observed in a real 7-node production swarm (4 managers / 3 workers). - Related: #5991 (same feature area).
- Happy to discuss the approach or send a PR if the maintainers agree on the direction (global mode + swarm config seems the smallest sound change).
- Lingua principale
- TypeScript
- Stelle
- 38.8k
- Fork
- 3.2k
- Merge medio
- 1g 10h
- PR unite (30g)
- 110
Preparare l'ambiente
Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.
- Include un Dockerfile o un file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di Dokploy/dokploy
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
Dokploy/dokploy#6151 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Healthy Swarm task shows an empty `(Error:)` suffix on the last row of the Containers tabForse già presa @AyhamJo7 l’ha presa 4 giorni fa. Apertaneeds-triage🔍
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
Dokploy/dokploy#6115 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Global search (Cmd/Ctrl+J) never sorts results by relevanceForse già presa @hamidzr l’ha presa 6 giorni fa. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
Dokploy/dokploy#6107 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
`utils/dns/ovh.ts`: the zone-listing 403 handler replaces the provider's error instead of chaining itForse già presa @SyncWithRaj l’ha presa 8 giorni fa. Apertabug
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 84/100
Dokploy/dokploy#6075 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
MongoDB with Replica Sets enabled: container exits with code 0 and restarts in a loop (generated startup script never waits on mongod)Forse già presa @ghazy2001 l’ha presa 10 giorni fa. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
Dokploy/dokploy#6051 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di Dokploy/dokploy
Issue simili
-
[Bug]: RUN_STARTED resets the run's tool-call tally even when a subscriber suppresses the eventApertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 83/100
ag-ui-protocol/ag-ui#3504 ·
I maintainer di solito rispondono entro 1 giorno
-
area/profiles area/sessions comp/desktop desktop/chat desktop/sessions P2 type/bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
NousResearch/hermes-agent#161712 ·
I maintainer di solito rispondono entro 1 giorno
-
bug p3
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
rothgar/rabble.radio#283 ·
I maintainer di solito rispondono entro 1 giorno
-
bug from-app needs-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
nightly-labs/openbot#19805 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 64/100
OHDSI/Data2Evidence#3760 ·
I maintainer di solito rispondono entro 3 giorni