1
0
Fork 0
mirror of https://github.com/munin-monitoring/contrib.git synced 2025-07-21 18:41:03 +00:00

[crowdsec]: Increase decisions to 1000 (more than default 100)

This commit is contained in:
Sebastian L. 2025-07-13 14:20:25 +02:00
parent e37740e86e
commit 7b5bc19c6f

View file

@ -100,7 +100,7 @@ class Decisions():
def __init__(self): def __init__(self):
_state = state.read_section('scenarios') _state = state.read_section('scenarios')
self.state = _state if _state is not None else {} self.state = _state if _state is not None else {}
self.data = call_cli('decisions', 'list') self.data = call_cli('decisions', 'list', '--limit', '1000')
if self.data is not None: if self.data is not None:
self.decisions = len(self.data) self.decisions = len(self.data)
self.banned_ips = len(set([d['source']['ip'] for d in self.data if d['source']['scope'] == 'Ip'])) # noqa: E501 self.banned_ips = len(set([d['source']['ip'] for d in self.data if d['source']['scope'] == 'Ip'])) # noqa: E501