Quotas: usage as a share, and their statistics per rule
What a quota used shows its percentage of the allowance on the Rules page (line and dialog), the dashboard and in hc quotas. Statistics' Quotas card links each entry to its rule, named, without the share of the total; per-address quotas are in it at last: their quota:rN series is the sum of their addresses. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
a169e9aa96
commit
7d23fb13ed
11 files changed
+59
-15
No files matched your search
@@ -402,7 +402,10 @@ func (c *Collector) sample(ctx context.Context, minute int64) map[string]int64 {
|
||||
for set, es := range t.QuotaSets {
|
||||
kind := strings.TrimSuffix(strings.TrimSuffix(set, "_v4"), "_v6")
|
||||
for _, e := range es {
|
||||
addTop(kind, e.Addr, c.table.of(set+"/"+e.Addr, e.Used))
|
||||
d := c.table.of(set+"/"+e.Addr, e.Used)
|
||||
addTop(kind, e.Addr, d)
|
||||
// A per-address quota's series is its addresses' sum.
|
||||
add("quota:"+strings.TrimPrefix(kind, "quota_"), d)
|
||||
}
|
||||
}
|
||||
for set, es := range t.DeviceSets {
|
||||
|
||||
Reference in new issue
Block a user