{"id":20666807,"url":"https://github.com/sbraz/check_traffic","last_synced_at":"2026-04-24T04:32:46.793Z","repository":{"id":66064015,"uuid":"411447909","full_name":"sbraz/check_traffic","owner":"sbraz","description":" Nagios-like plugin to check network traffic per interface for LInux.","archived":false,"fork":false,"pushed_at":"2025-02-23T23:12:46.000Z","size":28,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-12-25T17:09:30.422Z","etag":null,"topics":["icinga2","monitoring","monitoring-plugins","nagios-plugins"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sbraz.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2021-09-28T21:49:24.000Z","updated_at":"2025-02-23T23:12:49.000Z","dependencies_parsed_at":"2024-11-16T19:41:58.834Z","dependency_job_id":"0642e7bc-fdfe-4cea-bd6d-486e925b1fcc","html_url":"https://github.com/sbraz/check_traffic","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/sbraz/check_traffic","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sbraz%2Fcheck_traffic","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sbraz%2Fcheck_traffic/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sbraz%2Fcheck_traffic/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sbraz%2Fcheck_traffic/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sbraz","download_url":"https://codeload.github.com/sbraz/check_traffic/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sbraz%2Fcheck_traffic/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32209893,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-24T03:15:14.334Z","status":"ssl_error","status_checked_at":"2026-04-24T03:15:11.608Z","response_time":64,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["icinga2","monitoring","monitoring-plugins","nagios-plugins"],"created_at":"2024-11-16T19:41:54.728Z","updated_at":"2026-04-24T04:32:46.776Z","avatar_url":"https://github.com/sbraz.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Introduction\nThis Nagios-like plugin can be used to check the average traffic on Linux systems.\nIt keeps track of the amount of bytes sent and received per interface with a state file.\nIt also outputs statistics about dropped packets in its perfdata.\nIt supports thresholds and filters. The `-v/--verbose` option can help debug\nwhat inclusion/exclusion rules are matched.\n\n# Requirements\n\nThe script requires:\n* Python 3.10 or newer\n* [`nagiosplugin`](https://nagiosplugin.readthedocs.io) version 1.2.4 or newer\n* iproute2 4.14.0 or newer\n* read-write access to `/tmp/` (where the state file is stored)\n* sudo if `--include-netns` is used\n\n# Integration with Icinga\n\nAn Icinga `CheckCommand` can be defined with:\n```\nobject CheckCommand \"traffic\" {\n  command = [PluginDir + \"/check_traffic.py\"]\n  arguments = {\n    \"--type\" = \"$traffic_interface_type$\",\n    \"--name\" = \"$traffic_interface_name$\",\n    \"--exclude-type\" = \"$traffic_interface_exclude_type$\",\n    \"--exclude-name\" = \"$traffic_interface_exclude_name$\",\n    \"--down\" = {\n      set_if = \"$traffic_include_down_interfaces$\"\n    },\n    \"--bytes\" = {\n      set_if = \"$traffic_use_bytes$\"\n    },\n    \"--include-netns\" = {\n      set_if = \"$traffic_include_netns$\"\n    },\n    \"--warning\" = \"$traffic_warning$\",\n    \"--critical\" = \"$traffic_critical$\",\n  }\n}\n```\n\n# Example sudoers configuration\n\nStarting with sudo 1.9.10, it is possible to use regular expressions in sudoers\nfiles. The following example `/etc/sudoers.d/icinga2-check-traffic` file takes\nadvantage of this feature. It will allow the check to work with network\nnamespaces whose names are made up of simple alphanumeric characters and\nunderscores, while minimizing the risk of injection.\n```\nicinga ALL=(ALL) NOPASSWD: /bin/ip ^-netns [a-zA-Z0-9_]+ -details -statistics -json link show$\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsbraz%2Fcheck_traffic","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsbraz%2Fcheck_traffic","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsbraz%2Fcheck_traffic/lists"}