Add iplist_size metric

This commit is contained in:
9seconds
2022-03-11 16:20:11 +03:00
parent 4687a7c899
commit 30170b9413
19 changed files with 206 additions and 26 deletions
+9
View File
@@ -121,6 +121,15 @@ func (s statsdProcessor) EventReplayAttack(_ mtglib.EventReplayAttack) {
s.client.Incr(MetricReplayAttacks, 1)
}
func (s statsdProcessor) EventIPListSize(evt mtglib.EventIPListSize) {
tag := TagIPListBlock
if !evt.IsBlockList {
tag = TagIPListAllow
}
s.client.Gauge(MetricIPListSize, int64(evt.Size), statsd.StringTag(TagIPList, tag))
}
func (s statsdProcessor) Shutdown() {
events := make([]mtglib.EventFinish, 0, len(s.streams))