Repository navigation
feat(logs-and-metrics): ship container logs and metrics to external providers via Vector - #5624
Merged
Merged
Conversation
…roviders via Vector
narcisonunez
force-pushed
the
feat/logs-and-metrics
branch
from
October 8, 2026 14:08
876896a to
b329595
Compare
imrja8
approved these changes
Oct 14, 2026
1 of 3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Supersedes #5408. Same code base as Log Management, renamed to Logs & Metrics, with metrics added, a single migration and a redesigned agent lifecycle. Docs: Dokploy/website#197 (supersedes Dokploy/website#196).
Adds a Logs & Metrics feature (free tier): Dokploy ships a server's container logs and its host and container metrics to external providers for retention, search, dashboards and alerting. It doesn't replace the live log viewer or the Monitoring page.
dokploy-vector, pinned totimberio/vector:0.58.0-alpine), plus the local agent on the Dokploy host (self-hosted only). Dokploy has no shipping code of its own: a provider is saved credentials translated into Vector sinks.Loki prod (logs),Splunk (metrics),Datadog (logs and metrics)). One Deploy applies the selection; Remove stops the agent on that server.host_metricsplus aprometheus_scrapeof a cAdvisor sidecar (dokploy-cadvisor,ghcr.io/google/cadvisor:v0.60.6, listening on127.0.0.1:4510). cAdvisor runs only on hosts with a metrics provider. Logs and metrics carrydokploy_*tags (organization, project, environment, application, service, server) built from thedokploy.*labels that applications, compose services and databases now get.telemetryProviderIds) andreconcileVectorAgentmakes the host match the DB: it builds, validates and applies the YAML, deploys Vector, and adds or removes cAdvisor. With nothing left to ship it removes the agent. Editing, disabling or deleting a provider re-applies every server that uses it. A failed deploy keeps the selection saved and the previous config running, shows the redacted error on the card, and Redeploy retries. There is no rollback on purpose: the DB is the source of truth (this replaces the deploy/remove layer Greptile flagged on feat(log-management): ship container logs to external providers via Vector #5408).vectorAgentOrganizationId), taken and released atomically. Other organizations get a conflict and don't see the local host. Agents on the local host only ship the owner's containers.vector.yamlis validated (vector validate) before it is applied, with secrets redacted from any error. Reconciles of the same host are serialized, and a config-only Redeploy reloads without restarting the task.PutMetricData, the only way to checkcloudwatch:PutMetricData(new dependency@aws-sdk/client-cloudwatch).One migration (
0197_logs_and_metrics). Nothing from #5408 reached production, so the rename needs no data migration.What is this PR about?
Ship container logs and host/container metrics from Dokploy servers to external providers (Loki, Prometheus/Mimir/VictoriaMetrics/Grafana Cloud, New Relic, InfluxDB, Datadog, CloudWatch, Splunk, Elasticsearch/OpenSearch, Better Stack) through a Vector agent managed by Dokploy. It replaces #5408.
Checklist
Before submitting this PR, please make sure that:
canarybranch.Tested locally (Docker Desktop, Swarm, dev server):
dokploy_*tags.$works.$deploys with literal labels.vector validateruns in a test against the generated configs for every provider type. Grafana Cloud, New Relic, Datadog, AWS CloudWatch and Better Stack still need testing with real accounts.Issues related (if applicable)
Supersedes #5408.
Screenshots (if applicable)
The latest changes appear safe to merge; no new actionable issue was established.
What we checked:
guardedLookupchecks the addresses returned to the socket, rather than doing a separate lookup before the request.Summary
This PR adds Logs & Metrics shipping through Vector, with provider settings, server selections, container labels, and agent cleanup.
Reviews (2) · Last reviewed commit: "feat(logs-and-metrics): ship container l..." · Reviewed by Greptile