From f07e930e60950db93e00fb90c6d34e67206528bf Mon Sep 17 00:00:00 2001 From: Vincent Bernat Date: Thu, 9 Feb 2023 21:22:08 +0100 Subject: [PATCH] console/clickhouse: use ExporterAddress instead of ExporterName for % There is more guarantee that this is unique. --- console/clickhouse.go | 4 ++-- console/data/docs/99-changelog.md | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/console/clickhouse.go b/console/clickhouse.go index 0ee5e9fa..63a3e708 100644 --- a/console/clickhouse.go +++ b/console/clickhouse.go @@ -199,10 +199,10 @@ func (c *Component) contextFunc(inputStr string) context { case "inl2%": // That's like l2bps, but this time we use the interface speed to get a // percent value - units = `SUM((Bytes+38*Packets)*SamplingRate*8*100/(InIfSpeed*1000000))/COUNT(DISTINCT ExporterName, InIfName)` + units = `SUM((Bytes+38*Packets)*SamplingRate*8*100/(InIfSpeed*1000000))/COUNT(DISTINCT ExporterAddress, InIfName)` case "outl2%": // Same but using output interface as reference - units = `SUM((Bytes+38*Packets)*SamplingRate*8*100/(OutIfSpeed*1000000))/COUNT(DISTINCT ExporterName, OutIfName)` + units = `SUM((Bytes+38*Packets)*SamplingRate*8*100/(OutIfSpeed*1000000))/COUNT(DISTINCT ExporterAddress, OutIfName)` } c.metrics.clickhouseQueries.WithLabelValues(table).Inc() diff --git a/console/data/docs/99-changelog.md b/console/data/docs/99-changelog.md index 5771e6c3..64619372 100644 --- a/console/data/docs/99-changelog.md +++ b/console/data/docs/99-changelog.md @@ -16,11 +16,11 @@ identified with a specific icon: When upgrading to this release, it takes some time to reduce the storage size for a few columns. +- ✨ *console*: add “%” to available units - 🩹 *orchestrator*: fix disabling of `DstASPath` - 🩹 *console*: fix time range selection - 🩹 *console*: fix calculation of the L2 overhead when selecting L2 bps - 🩹 *console*: fix behavior of dimension limit field when empty -- 🌱 *console*: add “%” to available units - 🌱 *common*: accept an `!include` tag to include other YAML files in `akvorado.yaml` - 🌱 *inlet*: optimize to reduce the number of queries to the system clock - 🌱 *orchestrator*: reduce storage for `InIfDescription`, `OutIfDescription`, `SrcAddr`, `DstAddr`, `Bytes`, and `Packets`