Commit Graph

48 Commits

Author SHA1 Message Date
Vincent Bernat
78fb01c223 chore: fix some small issues detected by golangci-lint
But not using it as some linters are either plain incorrect (the one
suggesting to not use nil for `c.t.Context()`) or just
debatable (checking for err value is a good practice, but there are
good reasons to opt out in some cases).
2022-08-10 17:44:32 +02:00
Vincent Bernat
ca306456d5 common: make time.Time comparable with Diff 2022-08-09 01:00:37 +02:00
Vincent Bernat
61c8143fe8 build: fix linting issues introduced by latest revive release 2022-08-07 23:54:24 +02:00
Vincent Bernat
5691b13050 orchestrator/clickhouse: use SubnetMap for parsing networks 2022-08-01 09:03:48 +02:00
Vincent Bernat
e5d3d3fbc3 inlet/snmp: do not deprecate default-community
We did not handle all cases, notably the case where default-community
was not set explicitely by the user. This seems a lot of code for
little gain, let's keep things simple.
2022-08-01 07:15:50 +02:00
Vincent Bernat
1bbaf4de24 inlet/snmp: accept subnets for communities
Also deprecate `default-community`.
2022-07-31 23:38:54 +02:00
Vincent Bernat
f1585f3e6c helpers/subnetmap: fix bug when using IPv6-mapped IPv4 addresses
Go will display them as IPv4. We want everything to be IPv6.
2022-07-31 22:45:19 +02:00
Vincent Bernat
c0d9d301b3 helpers/subnetmap: allow to use IP addresses
They will be considered as /32 or /128.
2022-07-31 22:39:14 +02:00
Vincent Bernat
5cdc567828 inlet/core: also accept a map from subnet for default-sampling-rate
This should be generalized to other parts of configuration (SNMP
community), however, we need to check what happens with default
values. Also, network definition in orchestrator is likely to be able
to reuse that.
2022-07-31 20:36:46 +02:00
Vincent Bernat
8ee2750012 inlet/geoip: rename country-database to geo-database
This is a first step to accept another kind of GeoIP database (like
City). This also introduces the way we want to deprecate stuff:
transform the map structure.
2022-07-29 15:55:39 +02:00
Vincent Bernat
2ef33b1998 build: bump github.com/prometheus/client_golang from 1.12.1 to 1.12.2 2022-07-25 07:59:19 +02:00
Vincent Bernat
0d9fda0126 common/clickhousedb: ensure the mocks package always exist
It should help Dependabot. See:
 https://github.com/vincentbernat/akvorado/network/updates/419982169
2022-07-22 20:50:07 +02:00
Vincent Bernat
085d4e7946 cmd: add a registration mechanism for mapstructure hooks 2022-07-21 17:46:01 +02:00
Vincent Bernat
7d8185a405 common/helpers: fix method name in some test outputs 2022-07-21 12:10:36 +02:00
Vincent Bernat
13e8c65bfb inlet/flow: make it compile on MacOS 2022-07-16 21:15:17 +02:00
Vincent Bernat
dff8773c7f console: move ethertypes for IPv4/IPv6 to helpers package 2022-07-07 02:43:22 +02:00
Vincent Bernat
d7826e3733 config: more validation 2022-07-07 02:42:46 +02:00
Vincent Bernat
6121aaea15 config: use a validator for better configuration validation 2022-06-30 01:23:29 +02:00
Vincent Bernat
7266114396 common/helpers: use build tags to determine endianness 2022-06-29 14:01:56 +02:00
Vincent Bernat
ac037c9a56 common/helpers: use "unsafe" to get endianness 2022-06-29 13:58:20 +02:00
Vincent Bernat
8be1bca4fd license: AGPL-3.0-only
```
git ls-files \*.js \*.go \
  | xargs sed -i '1i // SPDX-FileCopyrightText: 2022 Free Mobile\n// SPDX-License-Identifier: AGPL-3.0-only\n'
git ls-files \*.vue \
  | xargs sed -i '1i <!-- SPDX-FileCopyrightText: 2022 Free Mobile -->\n<!-- SPDX-License-Identifier: AGPL-3.0-only -->\n'
```
2022-06-29 11:42:28 +02:00
Vincent Bernat
bf0c474726 console: implement "filter/saved" endpoints 2022-06-13 09:50:43 +02:00
Vincent Bernat
9567de4ca5 console: add minimal user management 2022-05-30 22:24:18 +02:00
Vincent Bernat
4114568600 console/filter: add completion endpoint 2022-05-26 15:58:52 +02:00
Vincent Bernat
2d4f5214bd tests: handle JSON in TestHTTPEndpoints 2022-05-26 10:40:55 +02:00
Vincent Bernat
dd64d02b48 console/frontend: better error formatting 2022-05-16 21:45:03 +02:00
Vincent Bernat
ec5fd0351a tests: fix some error strings 2022-05-16 18:30:51 +02:00
Vincent Bernat
34f153d9cd console: dynamically fetch available dimensions 2022-05-16 10:19:53 +02:00
Vincent Bernat
eefd7088b9 console: remove /fields endpoint as we don't use it 2022-05-15 15:24:50 +02:00
Vincent Bernat
04d818e00f console/frontend: add a selector for dimensions 2022-05-15 15:19:55 +02:00
Vincent Bernat
2319262340 console: add visualize tab
Currently, there is no controls available.
2022-05-12 14:27:18 +02:00
Vincent Bernat
1f8257208f common/clickhousedb: don't require Clickhouse client to work on start
It makes the orchestrator not work when Clickhouse is down and we need
it to setup Clickhouse...
2022-04-24 11:18:55 +02:00
Vincent Bernat
3a2da746cb global: use proper pattern to check if a channel is closed 2022-04-22 19:02:55 +02:00
Vincent Bernat
62eb867d8e common/clickhousedb: don't leak Clickhouse connections during healthcheck 2022-04-22 11:29:10 +02:00
Vincent Bernat
a35181d82a common/clickhousedb: more helpful message when unable to start 2022-04-18 16:09:57 +02:00
Vincent Bernat
4be33c70ba console: add an API to get the last received flow 2022-04-14 10:06:01 +02:00
Vincent Bernat
2bbeacec84 tests: use TestHTTPEndpoints helper more 2022-04-14 09:17:38 +02:00
Vincent Bernat
ce9bd6a4da tests: add an helper to start/stop components 2022-04-13 17:02:14 +02:00
Vincent Bernat
b44836aa97 common/clickhousedb: turn into a complete component
This enables us to mock it.
2022-04-12 23:33:22 +02:00
Vincent Bernat
270e54dea7 common/clickhouse: initialize 2022-04-12 11:58:15 +02:00
Vincent Bernat
f3ef532b34 common/reporter: use a struct to store multiple healthcheck results 2022-04-12 07:18:11 +02:00
Vincent Bernat
4ede84b46e common/http: use a default timeout of 30 seconds for HTTP client 2022-04-12 07:17:39 +02:00
Vincent Bernat
5fef879fd9 common/http: disable proxy for default HTTP client 2022-04-11 19:33:56 +02:00
Vincent Bernat
7ad7abb625 build: speed up linting and formatting 2022-04-11 08:13:21 +02:00
Vincent Bernat
50ca1987b2 http: use Gin web framework to reduce API boilerplate 2022-04-10 22:13:38 +02:00
Vincent Bernat
93da599adf cmd: take configuration as a mandatory argument (+ other changes)
The other changes are:
 - rename configure service to orchestrator service
 - turn DefaultConfiguration variables into functions
2022-04-10 15:14:39 +02:00
Vincent Bernat
0da94ce6f4 common/http: default to listening to 0.0.0.0 2022-04-09 13:11:00 +02:00
Vincent Bernat
1dc253764d global: split Akvorado into 3 services 2022-04-01 20:21:53 +02:00