Commit Graph

21 Commits

Author SHA1 Message Date
Vincent Bernat
6118bb7aac common/helpers: convert SubnetMap to github.com/gaissmai/bart
I did not benchmark it myself, but it was benchmarked here:
 https://github.com/osrg/gobgp/issues/1414#issuecomment-3067255941

Of course, no guarantee that this benchmark matches our use cases.
Moreover, SubnetMap have been optimized to avoid parsing keys all
the time.

Also, the interface is a bit nicer and it uses netip.Prefix directly.

The next step is to convert outlet/routing/provider/bmp.
2025-08-16 09:38:44 +02:00
Vincent Bernat
18beb310ee chore: replace interface{} with any 2025-07-29 07:42:49 +02:00
Vincent Bernat
e08331a286 common/helpers: switch to a blessed fork of mapstructure 2025-02-15 14:51:17 +01:00
Vincent Bernat
4a9430e74b inlet/metadata: merge SNMP communities and USM into credentials
This unifies both structure and allows a user to define exception for
some specific subnets. See #1606.
2025-01-18 17:05:43 +01:00
Vincent Bernat
faf58ba5bb common/helpers: be stricter when trying to look for subnets
Otherwise, if the map contains "cafe", we may think this is a subnet
while it is obviously not. But we want to catch user errors like
"2o01:db8::/64" to provide a better error message.
2025-01-18 13:50:35 +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
8ad3492579 commmon/helpers: fix decoding of SubnetMap that are already SubnetMap
Fix #1067
2024-02-01 23:22:14 +01:00
Itah
705e56cac4 inlet/metadata/static: allow exporters configuration refresh from http data source using common/remotedatasourcefetcher, refactored with orchestrator/clickhouse network-sources. 2024-01-17 11:11:34 +01:00
Vincent Bernat
6bfd3a0bd0 inlet/snmp: use netip.Addr internally instead of string
Also, make SubnetMap use `netip.Addr` as well.
2022-08-27 08:13:57 +02:00
Vincent Bernat
985e678e42 chore: replace map[string]interface{} by gin.H 2022-08-16 19:43:28 +02:00
Vincent Bernat
574ec7e79e inlet/snmp: add proper support for SNMPv3 2022-08-14 10:20:19 +02:00
Vincent Bernat
0a4275d87d inlet/snmp: add ability to set a version for SNMP
This is mostly useless as we don't provide a way to specify SNMPv3
authentication. We won't keep this config option as is.
2022-08-14 00:57:33 +02:00
Vincent Bernat
cd535c915d common/helpers: make subnetmap work with struct as values
The way it was converted from a mapstruct made it not possible to have
struct as values. Fix that by checking if keys look like IP or not.
2022-08-14 00:54:55 +02:00
Vincent Bernat
3f1dc38052 Revert "inlet/snmp: do not deprecate default-community"
This reverts commit e5d3d3fbc3. When
adding SNMPv3, it will be odd to have this. Just put the extra mile to
deprecate it correctly.
2022-08-13 21:33:53 +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