Commit Graph

14 Commits

Author SHA1 Message Date
Sorano
b5db24d942 Add Netbox API as example to network-sources (#2058)
Some checks failed
CI / 🤖 Check dependabot status (push) Has been cancelled
CI / 🐧 Test on Linux (${{ github.ref_type == 'tag' }}, misc) (push) Has been cancelled
CI / 🐧 Test on Linux (coverage) (push) Has been cancelled
CI / 🐧 Test on Linux (regular) (push) Has been cancelled
CI / ❄️ Build on Nix (push) Has been cancelled
CI / 🍏 Build and test on macOS (push) Has been cancelled
CI / 🧪 End-to-end testing (push) Has been cancelled
CI / 🔍 Upload code coverage (push) Has been cancelled
CI / 🔬 Test only Go (push) Has been cancelled
CI / 🔬 Test only JS (${{ needs.dependabot.outputs.package-ecosystem }}, 20) (push) Has been cancelled
CI / 🔬 Test only JS (${{ needs.dependabot.outputs.package-ecosystem }}, 22) (push) Has been cancelled
CI / 🔬 Test only JS (${{ needs.dependabot.outputs.package-ecosystem }}, 24) (push) Has been cancelled
CI / ⚖️ Check licenses (push) Has been cancelled
CI / 🐋 Build Docker images (push) Has been cancelled
CI / 🐋 Tag Docker images (push) Has been cancelled
CI / 🚀 Publish release (push) Has been cancelled
Update Nix dependency hashes / Update dependency hashes (push) Has been cancelled
* Add Netbox example to network-sources

* Update akvorado.yaml

Removed default TLS values

* Update akvorado.yaml

Removed too much
2025-10-31 21:02:31 +01:00
Vincent Bernat
0be6b2115d config: remove unused configuration settings "clickhouse" → "kafka"
ClickHouse does not need Kafka configuration anymore.
2025-10-15 13:58:14 +02:00
Vincent Bernat
65de0b16f3 config: stop shipping demo exporter configurations from orchestrator
This pollutes the configuration. We can just ask the demo exporters to
read directly their configuration files.
2025-10-05 10:13:37 +02:00
Vincent Bernat
adeb080713 config: fix comment about demo configuration
It can be removed, but this is not necessary to disable the demo
exporters. We keep it as is because we need it in the demo installation.
2025-09-29 11:47:06 +02:00
Vincent Bernat
1bdfbd9994 docs: prefer "docker compose run" to "docker compose exec"
The former works even if the container is not running properly.
2025-09-02 19:57:47 +02:00
Vincent Bernat
30182e33dc docs: tell people to not use output of --dump --check as a base config 2025-08-30 15:54:55 +02:00
Vincent Bernat
756e4a8fbd */kafka: switch to franz-go
The concurrency of this library is easier to handle than Sarama.
Notably, it is more compatible with the new model of "almost share
nothing" we use for the inlet and the outlet. The lock for workers in
outlet is removed. We can now use sync.Pool to allocate slice of bytes
in inlet.

It may also be more performant.

In the future, we may want to commit only when pushing data to
ClickHouse. However, this does not seem easy when there is a rebalance.
In case of rebalance, we need to do something when a partition is
revoked to avoid duplicating data. For example, we could flush the
current batch to ClickHouse. Have a look at the
`example/mark_offsets/main.go` file in franz-go repository for a
possible approach. In the meantime, we rely on autocommit.

Another contender could be https://github.com/segmentio/kafka-go. Also
see https://github.com/twmb/franz-go/pull/1064.
2025-07-27 21:44:28 +02:00
Vincent Bernat
ac68c5970e inlet: split inlet into new inlet and outlet
This change split the inlet component into a simpler inlet and a new
outlet component. The new inlet component receive flows and put them in
Kafka, unparsed. The outlet component takes them from Kafka and resume
the processing from here (flow parsing, enrichment) and puts them in
ClickHouse.

The main goal is to ensure the inlet does a minimal work to not be late
when processing packets (and restart faster). It also brings some
simplification as the number of knobs to tune everything is reduced: for
inlet, we only need to tune the queue size for UDP, the number of
workers and a few Kafka parameters; for outlet, we need to tune a few
Kafka parameters, the number of workers and a few ClickHouse parameters.

The outlet component features a simple Kafka input component. The core
component becomes just a callback function. There is also a new
ClickHouse component to push data to ClickHouse using the low-level
ch-go library with batch inserts.

This processing has an impact on the internal representation of a
FlowMessage. Previously, it was tailored to dynamically build the
protobuf message to be put in Kafka. Now, it builds the batch request to
be sent to ClickHouse. This makes the FlowMessage structure hides the
content of the next batch request and therefore, it should be reused.
This also changes the way we decode flows as they don't output
FlowMessage anymore, they reuse one that is provided to each worker.

The ClickHouse tables are slightly updated. Instead of using Kafka
engine, the Null engine is used instead.

Fix #1122
2025-07-27 21:44:28 +02:00
Vincent Bernat
d60a714b8c orchestrator/clickhouse: do not embed clickhouse database settings
Instead, properly use them from the clickhousedb component. Also provide
some automatic migration.
2025-07-08 09:06:31 +02:00
Vincent Bernat
318c6de17c orchestrator: move geoip as a top-level component
It is easier if we have a flat model for components.
2024-03-13 11:43:22 +01:00
Francois Espinet
87a57bf82e Do geoip enrich in clickhouse instead of inlet
One solution to https://github.com/akvorado/akvorado/issues/62
2024-03-11 15:29:09 +01:00
Vincent Bernat
403464f6f3 orchestrator/clickhouse: add configuration of a /metrics endpoint
This is optional and not enabled by default.
2023-11-12 23:07:22 +01:00
Vincent Bernat
8509fa9ce9 docs: mention "docker compose" instead of "docker-compose"
The later has been deprecated.
2023-08-13 09:11:47 +02:00
Vincent Bernat
e148a8d2c9 docker-compose: move configuration files to config/ 2023-02-13 23:32:45 +01:00