mirror of
https://github.com/akvorado/akvorado.git
synced 2025-12-12 06:24:10 +01:00
console/clickhouse: use ExporterAddress instead of ExporterName for %
There is more guarantee that this is unique.
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user