Commit Graph

36 Commits

Author SHA1 Message Date
Vincent Bernat
74146e428d console: use a less hacky way to pass context to build SQL templates
Instead of trying to embed that in the template, provide a list of
templates with their associated input contexts and join them with UNION
ALL.
2025-09-04 07:41:08 +02:00
Vincent Bernat
18beb310ee chore: replace interface{} with any 2025-07-29 07:42:49 +02:00
Vincent Bernat
8ef6fd6c7f console: don't use a direction filter for direction-independent stats
See https://github.com/akvorado/akvorado/discussions/1774
2025-05-23 08:05:02 +02:00
Vincent Bernat
f6f22d3e38 console: reuse HomepageTopWidget for validation of widget names 2024-11-25 07:43:58 +01:00
Vincent Bernat
625429f27f orchestrator/clickhouse: add compatibility check for INTERPOLATE issue
I don't want to keep disabling the experimental analyzer forever. The
version check could be turned into disabling the experimental analyzer,
but this is better to push people to update their versions.

To be pushed only when 24.3 (LTS) and 24.4 gets the fix.
2024-06-14 22:15:43 +02:00
Vincent Bernat
1037d66d22 console: add an option for homepage graph time range 2024-05-09 15:23:54 +02:00
Vincent Bernat
64acf78af0 console: apply In/OutIfBoundary filter for ports as well 2024-05-09 15:19:25 +02:00
Vincent Bernat
889f82eb85 common/clickhousedb: disable experimental analyzer, only when using FILL 2024-04-19 19:51:44 +02:00
Vincent Bernat
8d96aa070a orchestrator/clickhouse: simplify use of QueryRow()
No need to check for errors, this is also done when invoking Scan().
2024-04-05 22:00:06 +02: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
Marvin Gaube
6cbdfafd67 feat: make widget graph configureable 2023-11-03 13:42:40 +01:00
Vincent Bernat
e042daa17e console/widgets: make test more reproducible 2023-01-23 22:47:17 +01:00
Vincent Bernat
9eee46cade common/schema: add SrcMAC and DstMAC 2023-01-19 23:12:17 +01:00
Vincent Bernat
e0395fc1a5 console/widgets: fix last flow widget when disabling some columns 2023-01-19 21:53:55 +01:00
Vincent Bernat
775dc08db2 console: implement an HTTP cache for Clickhouse-backed requests
Fix #328
2022-12-22 16:23:49 +01:00
Vincent Bernat
87d8e70ae2 console: fix display of communities in last flow
REPLACE was not used correctly. For some reason, it mostly worked for
DstLargeCommunities but not for DstCommunities.
2022-12-07 16:51:39 +01:00
Vincent Bernat
1a0f00bbc4 console/widgets: format (large) communities for last flow widget 2022-10-11 18:16:10 +02:00
Vincent Bernat
8e755ae0e1 console: ensure we fill missing values including the last one
BETWEEN is inclusive, while FILL excludes the upper bound. This may
trigger a subtle bug where sometimes, one axis has one value the other
does not have.
2022-08-09 19:16:16 +02:00
Vincent Bernat
67703cc61e console: use templates to build SQL query
This is needed if we want to be able to mix use of several tables
inside a single query (for example, flows_1m0s for a part of the query
and flows_5m0s for another part to overlay historical data).

Also, the way we handle time buckets is now cleaner. The previous way
had two stages of rounding and was incorrect. We were discarding the
first and last value for this reason. The new way only has one stage
of rounding and is correct. It tries hard to align the buckets at the
specified start time. We don't need to discard these values anymore.
We still discard the last one because it could be incomplete (when end
is "now").
2022-08-09 11:45:40 +02:00
Vincent Bernat
1aa260bae2 console/filter: let parser tells us if we need the main table or not
This is more robust this way. We also introduce the ability to reverse
the direction of a filter.
2022-08-04 18:54:41 +02:00
Vincent Bernat
fad0c5db16 console: simplify SQL request by computing target resolution in Go 2022-07-26 23:51:32 +02:00
Vincent Bernat
226c902e12 console: use Unknown instead of empty string for top widget 2022-07-09 08:51:38 +02:00
Vincent Bernat
f5e2e85d0d console: fix a possible divide by 0 error
This is not the only problem we have.
2022-07-09 08:42:42 +02:00
Vincent Bernat
412bb1f535 console: fill missing values with 0 for timeseries graphs 2022-07-08 09:43:09 +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
fb7c51653f console: rely on validator to check input values 2022-05-21 22:47:19 +02:00
Vincent Bernat
dd64d02b48 console/frontend: better error formatting 2022-05-16 21:45:03 +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
05276dbc63 console: make use of consolidated tables 2022-05-10 09:30:33 +02:00
Vincent Bernat
922161c375 console/frontend: don't display "Other" when too small 2022-04-23 15:00:54 +02:00
Vincent Bernat
45a40f451c console/frontend: add IPv4 vs IPv6 2022-04-23 14:53:41 +02:00
Vincent Bernat
39fcd1396b console: only return complete intervals for the graph widget 2022-04-22 11:45:10 +02:00
Vincent Bernat
370cd6f961 console/frontend: add a graph on the homepage 2022-04-21 16:07:01 +02:00
Vincent Bernat
507168f098 console: fix logic for some widgets with respect to direction
For country and AS, we are interested in values from external IPs. For
ports, we don't care.
2022-04-14 16:31:35 +02:00
Vincent Bernat
506bca0291 console: add "top" widgets API 2022-04-14 16:00:35 +02:00
Vincent Bernat
793e55db52 console: add an API to get flow rate 2022-04-14 13:50:00 +02:00