Commit Graph

153 Commits

Author SHA1 Message Date
Vincent Bernat
ec9380289e docker: fix broken /metrics endpoint for inlet
Add some tests in e2e.
2025-09-03 08:06:46 +02:00
Vincent Bernat
b1d6382585 common/embed: replace all go:embed use by an embedded archive
Some of the files were quite big:

- asns.csv ~ 3 MB
- index.js ~ 1.5 MB
- *.svg ~ 2 MB

Use a ZIP archive to put them all and embed it. This reduce the binary
size from 89 MB to 82 MB. 🤯

This also pulls some code modernization (use of http.ServeFileFS).
2025-09-03 00:00:05 +02:00
Vincent Bernat
d102e5f20e docker: delete unused JMX-related files
We don't use JMX anymore to monitor Kafka.
2025-09-02 23:38:27 +02:00
Vincent Bernat
bee9a5de67 docker: enable HTTP compression for Traefik
Also disable healthcheck. It triggers spurious errors (which eventually
get fixed).
2025-09-02 19:47:02 +02:00
Vincent Bernat
871fc59814 docs: make it even easier to hack on the console
We add a parameter to disable the healthcheck, making the console
available quickly.
2025-08-31 15:59:41 +02:00
Vincent Bernat
e41bae008b docs: make it a bit simpler to hack Akvorado
Add ability to enable the demo flows just with a profile instead of
modifying .env. Add more instructions on how to use Docker Compose and
how to hack on the console.
2025-08-31 15:46:14 +02:00
Vincent Bernat
378c1f5e0a docker: add logs for ClickHouse 2025-08-31 10:14:16 +02:00
Vincent Bernat
413f923dcc docker: update ClickHouse to 25.8 2025-08-30 23:46:17 +02:00
Vincent Bernat
d8e5a27364 docker: make Prometheus keep metrics 1 month 2025-08-30 22:54:26 +02:00
Vincent Bernat
14aa8ff3cc docker: make logs in Loki expire 2025-08-30 22:51:32 +02:00
Vincent Bernat
94fb1c6483 build: accept building with a not up-to-date toolchain
While I was relunctant to let Go download the right toolchain if we
didn't have one, this makes everything simpler. The Go version is now
fully controlled by `go.mod`. It also a nice for people wanting to build
on older distributions.

For Nix, GOTOOLCHAIN is set to local, so we rely on `go_latest` being
up-to-date enough. But they are usually quite fast to update, so it
should be OK.
2025-08-30 19:14:59 +02:00
Vincent Bernat
1ce435efde console/frontend: add a link to GitHub on the documentation page
This is only when branding is explicitely enabled. Now, that
akvorado.net does not redirect to GitHub anymore...
2025-08-30 17:03:23 +02:00
Vincent Bernat
17dad7088f docker: accept several domains for TLS_DOMAIN
And pass everything as SANs. Internally, the first one will be used for
the main domain.
2025-08-30 15:42:45 +02:00
Vincent Bernat
6ef6454f8c docker: add healthcheck for Traefik 2025-08-30 13:29:54 +02:00
Vincent Bernat
0339a87891 docker: fix missing quote in Vector tests 2025-08-30 10:02:17 +02:00
Vincent Bernat
84a6da3b8a docker: remove unused Alloy configuration for Loki 2025-08-30 07:25:57 +02:00
Vincent Bernat
91cd91f3f8 docker: factor a bit log level normalization 2025-08-30 07:25:57 +02:00
Vincent Bernat
95e2011d0c docker: replace Alloy by Vector for parsing logs
Alloy does not allow to turn the parsed metadata into actual metadata,
without enumerating each of them. Also, Vector is far more versatile.
And you can put unittests!

Also, parse more logs. Everything should be there, except ClickHouse.

Fix #1907
2025-08-30 00:07:26 +02:00
Vincent Bernat
45ab047c80 config: also listen to 4739 for IPFIX
This is the port defined in RFC 7011.
2025-08-29 08:12:30 +02:00
Vincent Bernat
a50c47a723 docker: send alloy and loki logs to Loki
Alloy is severely limited in this aspect. Maybe we should switch to
Vector instead.
2025-08-29 07:19:18 +02:00
Vincent Bernat
560113e3af docker: monitor Redis and Kafka using Alloy internal exporter 2025-08-28 11:52:45 +02:00
Vincent Bernat
c31e0616c3 docker: add Kafka and Redis logs to Loki 2025-08-28 06:54:29 +02:00
Vincent Bernat
45c684dc67 docker: add Loki to the observability stack
Currently, only Akvorado logs are parsed.
2025-08-28 06:54:13 +02:00
Vincent Bernat
39e9ba0777 docker: fix priority of console router to be the lowest 2025-08-26 23:35:05 +02:00
Vincent Bernat
8eb7cd63b1 docker: make Alloy configuration use only Docker labels
This is a bit like Traefik. We set metrics.port on each container we
want to scrape metrics from (and optionally metrics.path).

Semi-related, but we also rely on exposed port for Traefik and we override
it for all containers to be sure we select the right one. This is less
error prone as we need at least one exposed port and some containers may
or may not have one. Just always set an exposed port if we have metrics
or traefik rules.
2025-08-26 23:22:09 +02:00
Vincent Bernat
f81299ff28 docker: group services together in alloy configuration 2025-08-26 07:04:04 +02:00
Vincent Bernat
2b3c463729 docker: switch from prometheus to alloy for scrapping metrics
The idea is that alloy can also be used for more. For example, we could
introduce Loki (with a `docker-compose-loki.yml`) and it would use alloy
too. Alloy configuration needs to be split into several parts and both
`docker-compose-prometheus.yml` and `docker-compose-loki.yml` would
define it but with an additional volume for their specific part of the
configuration (using the `extend` mechanism).

However, we don't use the bundled Node Exporter, nor the bundled
cAdvisor. It is better to have individual components to avoid reduce the
amount of code with elevated privileges (both Node Exporter and cAdvisor
need specific privileges). Also, we keep Prometheus instead of switching
to the full Grafana stack with Mimir as it is a more common setup and
this is not a goal to provide something universally scalable.

Also, Prometheus is now behind the private endpoint as it is possible to
send metrics.
2025-08-26 06:28:56 +02:00
Vincent Bernat
fe42529bbc build: switch to Go 1.25
But Go 1.24 is still supported.
2025-08-24 09:12:21 +02:00
Vincent Bernat
d06c051ec8 docker: fix target in Dockerfile 2025-08-20 15:00:38 +02:00
Vincent Bernat
883e19922e build: add end-to-end testing 2025-08-20 13:41:54 +02:00
Vincent Bernat
f8161d9375 docker: set bridge name
Docker can easily break the firewall rules such that masquerading
happens internally.

```
ip saddr 247.16.12.0/24 oifname != "br-65eaa81ed142" counter packets 812 bytes 132030 masquerade
ip saddr 247.16.12.0/24 oifname != "br-fa3db0ecc1de" counter packets 0 bytes 0 masquerade
ip saddr 247.16.12.0/24 oifname != "br-c7a7788478c5" counter packets 0 bytes 0 masquerade
```

When the "current" bridge is the second one, inter-container
communication gets masqueraded. I didn't find an associated issue.
2025-08-20 06:27:17 +02:00
Vincent Bernat
28115d7759 docker: simplify exposition of traefik metrics
We use the "expose" keyword to expose only the metric ports.
2025-08-19 00:36:04 +02:00
Vincent Bernat
ed7e1ee67f docker: update Prometheus and node-exporter
Also fix configuration of node-exporter to really monitor the host. And
fix Prometheus configuration which was broken since we tried to monitor
Traefik (in 8f73f70050).
2025-08-19 00:14:25 +02:00
Vincent Bernat
83d8556d6d docker: add cAdvisor for container monitoring
This seems quite invasive. Not sure I want to keep it...
2025-08-19 00:14:25 +02:00
François HORTA
e682215b2e docker: update kafka data volume mount path
The apache image defines a volume under /var/lib/kafka/data, which is
created as an anonymous volume by docker unless docker compose properly
mounts to the right path.

This is unfortunately a breaking change.
2025-08-18 20:25:36 +02:00
Vincent Bernat
f49b086018 docker: harmonize Docker labels and annotations 2025-08-16 23:28:23 +02:00
Vincent Bernat
8f73f70050 docker: add metrics for Traefik in Prometheus 2025-08-11 08:49:37 +02:00
Vincent Bernat
4206c81539 docker: increase stop grace period for ClickHouse
It can take a bit longer to stop. We don't want to SIGKILL it while it
is shutting down.
2025-08-11 08:02:19 +02:00
Vincent Bernat
a423ec44d6 docker: move TLS configuration into its own docker-compose file
This makes it easier to use.
2025-08-10 23:01:18 +02:00
Vincent Bernat
1a27bb1bc2 docker: add examples to enable authentication and TLS 2025-08-10 22:33:04 +02:00
Vincent Bernat
84b6f4584e docker: explain how to not expose Kafka-UI and Traefik dashboard 2025-08-10 15:58:37 +02:00
Vincent Bernat
dbadbf3adf docker: expose Traefik dashboard on the public endpoint
It is also read-only.
2025-08-10 15:55:04 +02:00
Vincent Bernat
1070e5b4f0 docker: document how to properly bind on port 80
Add more documentation around merging in Docker. The previous
documentation was incorrect.
2025-08-10 15:43:10 +02:00
Vincent Bernat
ed4691d169 docker: always use a mapping for "environment" 2025-08-10 15:16:51 +02:00
Vincent Bernat
4f68acee48 docker: don't use enable_ipv4
It requires a fairly recent version of Docker Compose. Not needed since
this is the default value.
2025-08-08 13:30:05 +02:00
Vincent Bernat
a74a41a6a0 docker: enable IPv6 networking, use a specific IPv4 subnet
And also add documentation on how to use IPv6. The proposed setup relies
on NAT66, which is not good, but it works on any host with IPv6
connectivity. The documentation explains how to configure routed IPv6.

By using an IPv4 subnet in class E, we ensure that it is very unlikely
users will have overlap between their Docker setup and their production
network. This way, no need to change the Docker daemon configuration.
2025-08-08 12:08:00 +02:00
Vincent Bernat
3e68a41f57 docker: for dev, separate standalone ClickHouse setup from cluster
This way, there is no need to start a whole cluster just to work on a
single ClickHouse. Also add some hints in CONTRIBUTING.md.
2025-08-08 08:55:29 +02:00
Vincent Bernat
4ba396da42 docker: really expose Kafka UI interface 2025-08-04 21:54:36 +02:00
Vincent Bernat
d526ca451c build: add a platform independant step into Makefile
And cache it with Docker. This way, it only needs to be built once. And
remove the all_js target. There is another method when working on JS in
CONTRIBUTING.md.
2025-08-04 15:42:22 +02:00
Vincent Bernat
f7ba8519c8 docker: add curl for build-go stage 2025-08-04 15:16:26 +02:00