{"id":19838497,"url":"https://github.com/metal-stack/nftables-exporter","last_synced_at":"2025-05-01T18:31:16.085Z","repository":{"id":41051316,"uuid":"385821657","full_name":"metal-stack/nftables-exporter","owner":"metal-stack","description":"prometheus exporter for nftables metrics","archived":false,"fork":false,"pushed_at":"2025-02-05T12:34:18.000Z","size":3614,"stargazers_count":23,"open_issues_count":3,"forks_count":8,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-04-06T16:49:31.529Z","etag":null,"topics":["nftables","prometheus-exporter"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/metal-stack.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":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-07-14T05:15:48.000Z","updated_at":"2025-04-03T09:18:52.000Z","dependencies_parsed_at":"2024-06-21T10:22:28.023Z","dependency_job_id":"2a1a4982-1f94-459d-8812-c42ec403954d","html_url":"https://github.com/metal-stack/nftables-exporter","commit_stats":{"total_commits":21,"total_committers":7,"mean_commits":3.0,"dds":0.5714285714285714,"last_synced_commit":"b5361c8aacad5011dc9efcc3ab374eea5e55b01f"},"previous_names":[],"tags_count":21,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metal-stack%2Fnftables-exporter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metal-stack%2Fnftables-exporter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metal-stack%2Fnftables-exporter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metal-stack%2Fnftables-exporter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/metal-stack","download_url":"https://codeload.github.com/metal-stack/nftables-exporter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251924710,"owners_count":21666023,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["nftables","prometheus-exporter"],"created_at":"2024-11-12T12:17:57.047Z","updated_at":"2025-05-01T18:31:16.077Z","avatar_url":"https://github.com/metal-stack.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# nftables_exporter\n\nExport nftables statistics to prometheus, original source from [https://github.com/Sheridan/nftables_exporter](https://github.com/Sheridan/nftables_exporter)\n\n## Need more\n\n- Create a feature request, describe the metric that you would like to have and attach exported from nftables json file\n\n## Configuration\n\n### Command line options\n\n- `--config=/path/to/file.yaml`: Path to configuration file, default `/etc/nftables_exporter.yaml`\n- `--version`: Show version and exit\n\n### Configuration file\n\nExample content:\n\n```yaml\nnftables_exporter:\n  bind_to: \"[::1]:9630\"\n  url_path: \"/metrics\"\n  nft_location: /sbin/nft\n  fake_nft_json: /path/to/nft.json\n  log_level: warn\n```\n\n`fake_nft_json` used for debugging. I create this file with the command `nft -j list ruleset \u003e /path/to/nft.json`. For normal exporter usage, this option is not needed.\n\n`log_level` can be one of the following: `debug`, `info`, `warn`, `error`.\nDefault: `warn`.\n\n## Example metrics\n\n```config\n# HELP nftables_chain_rules Count rules in chain\n# TYPE nftables_chain_rules gauge\nnftables_chain_rules{family=\"inet\",name=\"forward\",table=\"filter\"} 2.0\nnftables_chain_rules{family=\"inet\",name=\"global\",table=\"filter\"} 15.0\n# HELP nftables_table_chains Count chains in table\n# TYPE nftables_table_chains gauge\nnftables_table_chains{family=\"inet\",name=\"filter\"} 7.0\nnftables_table_chains{family=\"ip\",name=\"nat\"} 4.0\n# HELP nftables_rule_bytes Bytes, matched by rule per rule comment\n# TYPE nftables_rule_bytes gauge\nnftables_rule_bytes{action=\"accept\",chain=\"host_spc\",comment=\"[spc-\u003einternet] Default http [tcp]\",destination_addresses=\"any\",destination_ports=\"http\",family=\"inet\",input_interfaces=\"internal_0\",output_interfaces=\"external_kis_0\",source_addresses=\"10.0.0.10\",source_ports=\"any\",table=\"filter\"} 2280.0\n# HELP nftables_rule_packets Packets, matched by rule per rule comment\n# TYPE nftables_rule_packets gauge\nnftables_rule_packets{action=\"accept\",chain=\"host_spc\",comment=\"[spc-\u003einternet] Default http [tcp]\",destination_addresses=\"any\",destination_ports=\"http\",family=\"inet\",input_interfaces=\"internal_0\",output_interfaces=\"external_kis_0\",source_addresses=\"10.0.0.10\",source_ports=\"any\",table=\"filter\"} 38.0\n```\n\n## Thank to\n\n- [@onokonem](https://github.com/onokonem)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmetal-stack%2Fnftables-exporter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmetal-stack%2Fnftables-exporter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmetal-stack%2Fnftables-exporter/lists"}