Skip to content

feat: restore cadvisor + redis-exporter metrics sidecars - #3022

Draft
goastler wants to merge 4 commits into
mainfrom
feat/restore-metrics-sidecars
Draft

goastler wants to merge 4 commits into
mainfrom
feat/restore-metrics-sidecars

Conversation

@goastler

Copy link
Copy Markdown
Member

Re-opens the work from #2676, which was merged and then backed out of main by #3019 so it could go back through review. Same branch, same commits.

goastler added 4 commits June 12, 2026 13:36
Re-add the per-container (cadvisor) and redis (redis-exporter) metrics
sidecars to the provider compose stack. These were added in #2058 then
removed in 6d7c062 because they were mis-indented under redis-stack
(so not real services) and redis-exporter lacked REDIS_ADDR.

This restores them as correctly-indented top-level services with static
IPs, fixes redis-exporter by pointing it at redis://redis-stack:6379, and
runs cadvisor privileged with /dev/kmsg per the documented setup.

Also mount the host's /proc and /sys into the vector container (with
PROCFS_ROOT/SYSFS_ROOT) so the host_metrics source reports the real host
rather than the vector container's namespaced view.

The vector.toml scrape config for cadvisor:8080 and redis-exporter:9121
already survived the revert, so no vector config changes are needed.
Add two more metrics sidecars to the provider stack and wire them into
vector's remote-write pipeline:

- mongodb-exporter (percona/mongodb_exporter): richer mongo metrics
  (replication, per-collection/index stats, query exec, connection pool)
  on :9216, beyond the basic server status from vector's built-in
  mongodb_metrics source. URI passed via env, not --mongodb.uri, to keep
  the password out of the container's process args.
- smartctl-exporter: disk SMART health (reallocated sectors, temperature,
  wear, predicted failure) on :9633, not captured by host_metrics/cadvisor.

vector.toml gains prometheus_scrape sources for both and includes them in
both OpenObserve remote-write sinks.

Also address review feedback: switch redis-exporter depends_on to the
list form (no conditional depends_on elsewhere in the repo's compose).
compose resolves `environment:` against the deploy shell and a top-level
.env, neither of which carries the provider secrets, so the interpolated
REDIS_PASSWORD/MONGODB_URI came out empty and both exporters failed auth.
# Conflicts:
#	docker/images/vector/src/vector.toml

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant