WIP: BREAKING CHANGES: replace promtail and cadvisor for alloy #21

Draft
fauno wants to merge 43 commits from alloy into main
Owner

closes #20

closes #20
fauno added 1 commit 2026-05-28 23:34:12 +00:00
fauno added 1 commit 2026-05-28 23:39:01 +00:00
fauno added 1 commit 2026-05-28 23:44:16 +00:00
fauno added 1 commit 2026-05-29 00:00:25 +00:00
Author
Owner

doing good progress but abyaya.la doesn't support two levels of subdomains yet so i can't keep testing! will continue soon

doing good progress but abyaya.la doesn't support two levels of subdomains yet so i can't keep testing! will continue soon
Author
Owner

TODO: reset the CONFIG_ALLOY_VERSION back to v1 before merging

TODO: reset the `CONFIG_ALLOY_VERSION` back to `v1` before merging
Owner

Thanks for this work! I also hope to do some testing with this soon.

Thanks for this work! I also hope to do some testing with this soon.
fauno added 1 commit 2026-05-29 18:41:21 +00:00
fauno added 2 commits 2026-05-29 19:04:28 +00:00
fauno added 1 commit 2026-05-29 19:16:14 +00:00
fauno added 2 commits 2026-06-02 16:24:50 +00:00
fauno added 2 commits 2026-06-02 21:01:07 +00:00
the variable is not expanded and the domain name label ends up as a
literal "$DOMAIN".
fauno added 8 commits 2026-06-02 21:50:56 +00:00
fauno added 1 commit 2026-06-02 21:51:19 +00:00
fauno added 2 commits 2026-06-02 23:19:51 +00:00
fauno added 1 commit 2026-06-03 00:00:54 +00:00
fauno added 2 commits 2026-06-03 00:06:21 +00:00
fauno added 1 commit 2026-06-03 03:19:53 +00:00
fauno added 9 commits 2026-06-17 12:53:11 +00:00
- Restrict Alloy UI to loopback
- Narrow volume mounts: drop /dev, reduce /var/run to docker.sock:ro
- Replace HTTP scrape of :12345 with prometheus.exporter.self
Match with main branch (node-exporter / promtail / cadvisor):
- Add docker_only and explicit enabled_metrics to cadvisor exporter
- Match node-exporter collector config
- Match promtail relabeling (container_name, container_id, stack_namespace,
  service_name) and external hostname label
- Add SYSLOG_FILES option to tail /var/log/*log (matches promtail)
- Fix journal path and syslog listener address
Containers opt in with prometheus.io/scrape=true and optionally set
prometheus.io/port, prometheus.io/path, and prometheus.io/auth=basic.
Reviewed-on: #24
Reviewed-by: fauno <fauno@sutty.coop.ar>
Author
Owner

i've been deploying this mainly for prometheus metrics and it's working great. i still have to test log ingestion. i'll need help with fixing the included grafana dashboards!

i've been deploying this mainly for prometheus metrics and it's working great. i still have to test log ingestion. i'll need help with fixing the included grafana dashboards!
fauno added 1 commit 2026-06-21 02:59:29 +00:00
fauno added 5 commits 2026-06-28 23:44:45 +00:00
Author
Owner

TODOs:

  • update documentation
  • implement metrics on recipes
  • set instance label as hostname, now it's docker's internal ip address
  • fix included grafana dashboards
    • node_name was set statically on node-exporter and missing from alloy
TODOs: - [ ] update documentation - [ ] implement metrics on recipes - [ ] set `instance` label as hostname, now it's docker's internal ip address - [ ] fix included grafana dashboards - [ ] `node_name` was set statically on `node-exporter` and missing from `alloy`
Author
Owner
  • grafana-stacks-dashboard.json hardcodes the cadvisor.monitoring subdomain a lot to filter by instance, removing it from the dashboard makes the graphs i tried work again, but it breaks filtering by instance
- [ ] `grafana-stacks-dashboard.json` hardcodes the `cadvisor.monitoring` subdomain a lot to filter by instance, removing it from the dashboard makes the graphs i tried work again, but it breaks filtering by instance
Owner

i checked with @p4u1 today. this is what we found out:

set instance label as hostname, now it's docker's internal ip address

in our test today this was the app domain instead

also we figured the containerd socket path needs to be included in the volumes section of the alloy service:

    volumes:
      # ...
      - /run/containerd/containerd.sock:/run/containerd/containerd.sock:ro

otherwise no containers/services are found.

i checked with @p4u1 today. this is what we found out: > set instance label as hostname, now it's docker's internal ip address in our test today this was the app domain instead also we figured the containerd socket path needs to be included in the volumes section of the alloy service: ``` volumes: # ... - /run/containerd/containerd.sock:/run/containerd/containerd.sock:ro ``` otherwise no containers/services are found.
Author
Owner

thanks @dede ! on an alpine 3.21 server this socket seems to be located at /var/run/docker/containerd/containerd.sock while in ubuntu server 24.04 it's at /var/run/containerd/containerd.sock, maybe the location changes by distribution? or they're not the same socket?

i could do something like this i think:

volumes:
- "${CONTAINERD_SOCKET:-/var/run/containerd/containerd.sock}:/var/run/containerd/containerd.sock:ro"
thanks @dede ! on an alpine 3.21 server this socket seems to be located at `/var/run/docker/containerd/containerd.sock` while in ubuntu server 24.04 it's at `/var/run/containerd/containerd.sock`, maybe the location changes by distribution? or they're not the same socket? i could do something like this i think: ```yaml volumes: - "${CONTAINERD_SOCKET:-/var/run/containerd/containerd.sock}:/var/run/containerd/containerd.sock:ro" ```
fauno added 1 commit 2026-07-31 16:58:10 +00:00
This pull request is marked as a work in progress.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin alloy:alloy
git checkout alloy
Sign in to join this conversation.