{"id":20541047,"url":"https://github.com/netways/check_interfaces","last_synced_at":"2025-04-14T08:39:23.171Z","repository":{"id":51548086,"uuid":"92949547","full_name":"NETWAYS/check_interfaces","owner":"NETWAYS","description":"Icinga check plugin for network hardware interfaces","archived":false,"fork":false,"pushed_at":"2025-01-07T12:30:07.000Z","size":325,"stargazers_count":11,"open_issues_count":2,"forks_count":14,"subscribers_count":18,"default_branch":"master","last_synced_at":"2025-03-27T22:11:26.531Z","etag":null,"topics":["icinga","monitoring","network","plugin","snmp"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NETWAYS.png","metadata":{"files":{"readme":"README.md","changelog":"ChangeLog","contributing":null,"funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS","dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-05-31T13:39:01.000Z","updated_at":"2024-10-28T21:25:29.000Z","dependencies_parsed_at":"2024-01-15T08:39:42.698Z","dependency_job_id":"9a0660b8-71a9-4dea-bc68-2117eae5e86a","html_url":"https://github.com/NETWAYS/check_interfaces","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NETWAYS%2Fcheck_interfaces","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NETWAYS%2Fcheck_interfaces/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NETWAYS%2Fcheck_interfaces/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NETWAYS%2Fcheck_interfaces/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NETWAYS","download_url":"https://codeload.github.com/NETWAYS/check_interfaces/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248848014,"owners_count":21171281,"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":["icinga","monitoring","network","plugin","snmp"],"created_at":"2024-11-16T01:19:02.814Z","updated_at":"2025-04-14T08:39:23.150Z","avatar_url":"https://github.com/NETWAYS.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"check_interfaces\n================\n\nThis is a monitoring plugin for [Monitoring Plugins Interfaces](https://datatracker.ietf.org/doc/html/draft-kaestle-monitoring-plugins-interface-03)\ncompatible monitoring systems.\nThe intended usage is to retrieve the interface data from devices implementing default SNMP network structures and test whether interfaces are up or down and whether the bandwidth usage exceeds a certain threshold.\nAs a secondary purpose, the list of interface and the ingoing/outgoing data counters are returned and can be visualized in the\nmonitoring system.\n\nThis plugin uses the bulk-get mode of SNMPv2 by default - pass it the option -m NONBULK to work with SNMPv1. Support for SNMPv3 with and without privacy is included.\n\n64 bit counters will be used if they are supported by the device.\n\n\n### Installation\n\nIn order to compile this plugin you need the `NET SNMP Development` package\n(`libsnmp-dev` for Debian) as well as `autoconf` and the standard compilation tools.\n\n#### Example for Debian:\n\n```\napt-get update\napt-get -y install git build-essential libsnmp-dev\n```\n\n\nDownload and extract the tarball from https://github.com/NETWAYS/check_interfaces/releases\n\n```\n./configure --libexecdir=/usr/lib/nagios/plugins\n```\n\nor clone this repository and regenerate the autoconf scripts\n\n```\nautoreconf\n./configure --libexecdir=/usr/lib/nagios/plugins\n```\n\n\nRunning \"make\" should successfully compile the plugin, and \"make install\" will install them under\nthe configured path.\n\n```\nmake\nmake install\n```\n\n#### Prerequisites for FreeBSD\n\n```\nsudo pkg install automake gcc net-snmp\n```\n\nTo build:\n```\nautoreconf\n./configure --prefix=/usr/local   ## works, but you should have your own plugins-dir\nmake\nsudo make install   ## optional\n```\n\n### Usage\n\n\n(see also check_interface --help)\n\n    check_interface -c public -h 192.168.0.1 -r 'FastEth' -p '$SERVICEPERFDATA$' -t $LASTSERVICECHECK$ -a\n\n    Options;\n     -h                 address of device\n\n     -c|--community     community (default public)\n     -r|--regex         interface list regexp\n                            Regex to match interfaces (important, this is a Regular Expression\n                            not a simple wildcard string, see below)\n     -e|--errors        number of in errors (CRC errors for cisco) to consider a warning (default 50)\n                            Only warn if errors increase by more than this amount between checks\n     -f|--out-errors    number of out errors (collisions for cisco) to consider a warning\n                            Defaults to the same value as for errors\n     -p|--perfdata      last check perfdata\n                            Performance data from previous check (used to calculate traffic)\n     -P|--prefix        prefix interface names with this label\n     -t|--lastcheck     last checktime (unixtime)\n                            Last service check time in unixtime (also used to calculate traffic)\n     -b|--bandwidth     bandwidth warn level in %\n     -s|--speed         override speed detection with this value (bits per sec)\n     -x|--trim          cut this number of characters from the start of interface descriptions\n                            Useful for nortel switches\n     -j|--auth-proto    SNMPv3 Auth Protocol (SHA|SHA-224|SHA-256|SHA-384|SHA-512|MD5)\n     -J|--auth-phrase   SNMPv3 Auth Phrase\n     -k|--priv-proto    SNMPv3 Privacy Protocol (AES|DES) (optional)\n     -K|--priv-phrase   SNMPv3 Privacy Phrase\n     -u|--user          SNMPv3 User\n     -d|--down-is-ok    disables critical alerts for down interfaces\n                            i.e do not consider a down interface to be critical\n     -a|--aliases       retrieves the interface description\n                            This alias does not always deliver useful information\n     -A|--match-aliases also test the Alias against the Regexes\n     -D|--debug-print   list administrative down interfaces in perfdata\n     -N|--if-names      use ifName instead of ifDescr\n        --timeout       sets the SNMP timeout (in ms)\n     -m|--mode          special operating mode (default,cisco,nonbulk,bintec)\n                            Workarounds for various hardware\n\n\n### Modes\n\n     default    use SNMPv2 bulk-gets to retrieve the interface list (recommended for devices with many interfaces)\n     cisco      retrieve CRC errors and collisions instead of in errors and out errors\n     bintec     work with non-RFC Bintec devices\n     nonbulk    use a traditional tree-walk and SNMPv1 instead of bulk-gets (less efficient, but works with most devices)\n\n\n### Counter Overflows\n\nThe plugin will query the uptime of the device and compensate for counter overflows.\nNote however that a 1Gbit interface with a 32 bit counter will overflow every 34 seconds\nif the interface is operating at full capacity - in this case you will need to query the\ndevice at least once a minute.  With 64 bit counters these problems go away.\n\nAlso be aware that the counter values themselves are passed unaltered in the performance\ndata field - if you graph the data then the grapher also needs to be overflow aware.\n\n\n### Large Plugin Output\n\n\nBe aware that this plugin may generate large outputs.  Your version of Nagios / Icinga may cut off the output and cause you problems with various graphing tools; for best results restrict the list of interfaces using the -r option\n\n### Regular Expressions\n\nThe following patterns can be used to match strings\n\n     .          anything\n     ^          beginning of string\n     $          end of string (WARNING: you need to use $$ in a Nagios configuration file!)\n     (abc|def)  either abc or def\n     [0-9a-z]   a range\n     *          the previous pattern multiple times\n\n\nExamples;\n\n     Eth        match any strings containing \"Eth\"\n     ^FastEth   match any strings beginning with \"FastEth\"\n     Eth(0|2)$  match Eth0 or Eth2\n     Eth(0|2)   as above but would also match Eth20, Eth21, Eth22 etc\n\nIf unsure of a pattern, you should test it on the command line thus;\n\n    check_interface -c public -h 192.168.0.1 -r 'Eth(0|2)$'\n\n### Docker Build Environment\n\nYou can use docker for a development environment.\n\n**Usage:**\n\nSimple use:\n\n```sh\ndocker build -t check_interfaces .\ndocker run --rm check_interfaces -c public -h sw1\n```\n\nPersistent container\n\n```sh\ndocker build -t check_interfaces .\ndocker create --name=\"check_sw1\" check_interfaces -c public -h sw1\ndocker start -a check_sw1\n```\n\nCreate a debug build\n\n```sh\ndocker build --build-arg target=debug -t check_interfaces .\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnetways%2Fcheck_interfaces","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnetways%2Fcheck_interfaces","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnetways%2Fcheck_interfaces/lists"}