{"id":24755109,"url":"https://github.com/hatamiarash7/ipset-exporter","last_synced_at":"2026-05-14T21:31:53.376Z","repository":{"id":271279881,"uuid":"912939732","full_name":"hatamiarash7/ipset-exporter","owner":"hatamiarash7","description":"Export ipset data as Prometheus metric","archived":false,"fork":false,"pushed_at":"2026-04-29T09:53:37.000Z","size":102,"stargazers_count":1,"open_issues_count":5,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-04-29T11:27:01.185Z","etag":null,"topics":["exporter","firewall","ipset","ipset-lists","metrics","monitoring","monitoring-metrics","prometheus","prometheus-exporter","prometheus-metrics"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hatamiarash7.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-01-06T17:48:33.000Z","updated_at":"2026-04-22T21:06:33.000Z","dependencies_parsed_at":null,"dependency_job_id":"0225041d-f89f-4fdf-9027-8914c312667e","html_url":"https://github.com/hatamiarash7/ipset-exporter","commit_stats":null,"previous_names":["hatamiarash7/ipset-exporter"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/hatamiarash7/ipset-exporter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hatamiarash7%2Fipset-exporter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hatamiarash7%2Fipset-exporter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hatamiarash7%2Fipset-exporter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hatamiarash7%2Fipset-exporter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hatamiarash7","download_url":"https://codeload.github.com/hatamiarash7/ipset-exporter/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hatamiarash7%2Fipset-exporter/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33044038,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-13T13:14:54.681Z","status":"online","status_checked_at":"2026-05-14T02:00:06.663Z","response_time":57,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["exporter","firewall","ipset","ipset-lists","metrics","monitoring","monitoring-metrics","prometheus","prometheus-exporter","prometheus-metrics"],"created_at":"2025-01-28T12:35:02.297Z","updated_at":"2026-05-14T21:31:53.357Z","avatar_url":"https://github.com/hatamiarash7.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Prometheus Exporter for ipset\n\n[![Golang][golang_badge]][golang_link]\n[![Release][release_badge]][release_link]\n[![License][badge_license]][link_license]\n[![Image size][badge_size_latest]][link_docker_hub]\n\nIt's a simple [ipset](https://linux.die.net/man/8/ipset) exporter that generate [Prometheus](https://prometheus.io/) 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.\n\n```text\nipset_count{set=\"my-set-1\"} 41\nipset_count{set=\"my-set-2\"} 23\n```\n\n## How-to 🚀\n\nThis exporter needs `NET_ADMIN` to fetch ipset data using netlink. You can build and run this exporter as a single binary:\n\n```bash\nmake\nsudo setcap cap_net_admin+ep ./bin/ipset-exporter\ncp config.yml.example\n./bin/ipset-exporter\n```\n\nOr you can use Docker:\n\n```bash\ndocker run -d \\\n    --name ipset-exporter \\\n    --net host \\\n    -v /path/to/config.yml:/app/configs/config.yml \\\n    -e CONFIG_FILE=/app/configs/config.yml \\\n    --cap-add=NET_ADMIN \\\n    hatamiarash7/ipset-exporter:latest\n```\n\n\u003e [!NOTE]\n\u003e The Docker container needs to run with `NET_ADMIN` capability to fetch ipset data.  \n\u003e Also, You should run it with `--net host` to access the host network namespace.\n\n## Configuration 🛠\n\nYou can configure the exporter using a YAML file. The example configuration is:\n\n```yaml\napp:\n    host: 127.0.0.1\n    port: 4613\n    log_level: info\n\nipset:\n    update_interval: 15\n    names:\n        - my-set-1\n        - my-set-2\n```\n\n- You can choose any ipset name that you want to monitor or use the `all` keyword to monitor all ipset lists.\n- There is a `update_interval` field that set the interval in seconds to update the metrics.\n\n---\n\n## Support 💛\n\n[![Donate with Bitcoin](https://img.shields.io/badge/Bitcoin-bc1qmmh6vt366yzjt3grjxjjqynrrxs3frun8gnxrz-orange)](https://donatebadges.ir/donate/Bitcoin/bc1qmmh6vt366yzjt3grjxjjqynrrxs3frun8gnxrz) [![Donate with Ethereum](https://img.shields.io/badge/Ethereum-0x0831bD72Ea8904B38Be9D6185Da2f930d6078094-blueviolet)](https://donatebadges.ir/donate/Ethereum/0x0831bD72Ea8904B38Be9D6185Da2f930d6078094)\n\n\u003cdiv\u003e\u003ca href=\"https://payping.ir/@hatamiarash7\"\u003e\u003cimg src=\"https://cdn.payping.ir/statics/Payping-logo/Trust/blue.svg\" height=\"128\" width=\"128\"\u003e\u003c/a\u003e\u003c/div\u003e\n\n## Contributing 🤝\n\nDon't be shy and reach out to us if you want to contribute 😉\n\n1. Fork it!\n2. Create your feature branch: `git checkout -b my-new-feature`\n3. Commit your changes: `git commit -am 'Add some feature'`\n4. Push to the branch: `git push origin my-new-feature`\n5. Submit a pull request\n\n## Issues\n\nEach project may have many problems. Contributing to the better development of this project by reporting them. 👍\n\n[golang_badge]: https://img.shields.io/badge/Made_With-Golang-blue\n[golang_link]: https://go.dev/\n[release_badge]: https://github.com/hatamiarash7/ipset-exporter/actions/workflows/release.yml/badge.svg\n[release_link]: https://github.com/hatamiarash7/ipset-exporter/actions/workflows/release.yaml\n[link_license]: https://github.com/hatamiarash7/ipset-exporter/blob/master/LICENSE\n[badge_license]: https://img.shields.io/github/license/hatamiarash7/ipset-exporter.svg?longCache=true\n[badge_size_latest]: https://img.shields.io/docker/image-size/hatamiarash7/ipset-exporter/latest?maxAge=30\n[link_docker_hub]: https://hub.docker.com/r/hatamiarash7/ipset-exporter/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhatamiarash7%2Fipset-exporter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhatamiarash7%2Fipset-exporter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhatamiarash7%2Fipset-exporter/lists"}