Export ipset data as Prometheus metric
2.5K
It's a simple ipset exporter that generate Prometheus metrics from ipset lists. Every metric has a label set that shows the ipset list name with the number of elements in the list as the value.
ipset_count{set="my-set-1"} 41
ipset_count{set="my-set-2"} 23
This exporter needs NET_ADMIN to fetch ipset data using netlink. You can build and run this exporter as a single binary:
make
sudo setcap cap_net_admin+ep ./bin/ipset-exporter
cp config.yml.example
./bin/ipset-exporter
Or you can use Docker:
docker run -d \
--name ipset-exporter \
-p 4613:4613 \
-v /path/to/config.yml:/app/configs/config.yml \
-e CONFIG_FILE=/app/configs/config.yml \
--cap-add=NET_ADMIN \
hatamiarash7/ipset-exporter:latest
You can configure the exporter using a YAML file. The example configuration is:
app:
host: 127.0.0.1
port: 4613
log_level: info
ipset:
names:
- my-set-1
- my-set-2
You can choose any ipset name that you want to monitor or use the all keyword to monitor all ipset lists.
Don't be shy and reach out to us if you want to contribute 😉
git checkout -b my-new-featuregit commit -am 'Add some feature'git push origin my-new-featureEach project may have many problems. Contributing to the better development of this project by reporting them. 👍
Content type
Image
Digest
sha256:c13993365…
Size
3.5 MB
Last updated
about 1 year ago
docker pull hatamiarash7/ipset-exporter