console/clickhouse: use ExporterAddress instead of ExporterName for %

There is more guarantee that this is unique.
This commit is contained in:
Vincent Bernat
2023-02-09 21:22:08 +01:00
parent d5cde97891
commit f07e930e60
2 changed files with 3 additions and 3 deletions

View File

@@ -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()

View File

@@ -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`