This repository was archived by the owner on Sep 6, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 164
Support for wildcard filters #77
Copy link
Copy link
Open
Labels
Description
Hello,
I need to filter several queues starting with specific string so I modified your code a bit:
Removed this line:
rabbitmq-zabbix/scripts/rabbitmq/api.py
Line 50 in fe59d5a
check = [(x, y) for x, y in queue.items() if x in _filter] |
And replaced this line:
rabbitmq-zabbix/scripts/rabbitmq/api.py
Line 51 in fe59d5a
shared_items = set(_filter.items()).intersection(check) |
with:
shared_items = [(x, y) for x, y in queue.items() if x == u'name' and y.startswith(_filter['name'])]
And the same goes for lines:
rabbitmq-zabbix/scripts/rabbitmq/api.py
Lines 138 to 139 in fe59d5a
check = [(x, y) for x, y in shovel.items() if x in _filter] | |
shared_items = set(_filter.items()).intersection(check) |
Perhaps you could consider adding possibility to use wildcard filters for queues/shovels?