Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add support for ipset #16

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

verybadsoldier
Copy link

This adds support for gathering information about ipset lists by adding a new target ipset. This target brings two new metrics ipset_entries_total and ipset_ips_total. The entries metric just counts the number of entries in a list while the other resolves CIDR syntax and reports the amount of individual IPs (e.g. for 192.16.2.0/24).

Also, there is a regex argument which allows ignoring specific ipsets. The reason is that sometimes processes create temporary short-term ipsets (e.g. my-tmp-list345) which we might happen to catch unintendedly.

Disclaimer:
This is the first time I am touching Rust. So, if you see something that looks awkward, then it probably is exactly that. I am happy to improve based on review comments :)it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant