{"id":21470121,"url":"https://github.com/sensu-plugins/sensu-plugins-network-checks","last_synced_at":"2025-07-15T07:31:05.435Z","repository":{"id":26731402,"uuid":"30188970","full_name":"sensu-plugins/sensu-plugins-network-checks","owner":"sensu-plugins","description":"This plugin provides native network instrumentation                               for monitoring and metrics collection, including:                               hardware, TCP response, RBLs, whois, port status, and more.","archived":false,"fork":false,"pushed_at":"2021-06-16T05:41:39.000Z","size":270,"stargazers_count":30,"open_issues_count":23,"forks_count":76,"subscribers_count":11,"default_branch":"master","last_synced_at":"2023-03-12T09:25:53.437Z","etag":null,"topics":["metrics","monitoring","network","network-monitoring","sensu-plugins","socket-programming","whois"],"latest_commit_sha":null,"homepage":"http://sensu-plugins.io","language":"Ruby","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/sensu-plugins.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-02-02T13:47:17.000Z","updated_at":"2023-03-12T09:25:53.437Z","dependencies_parsed_at":"2022-07-28T20:10:02.948Z","dependency_job_id":null,"html_url":"https://github.com/sensu-plugins/sensu-plugins-network-checks","commit_stats":null,"previous_names":[],"tags_count":null,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sensu-plugins%2Fsensu-plugins-network-checks","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sensu-plugins%2Fsensu-plugins-network-checks/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sensu-plugins%2Fsensu-plugins-network-checks/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sensu-plugins%2Fsensu-plugins-network-checks/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sensu-plugins","download_url":"https://codeload.github.com/sensu-plugins/sensu-plugins-network-checks/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":226024785,"owners_count":17561710,"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":["metrics","monitoring","network","network-monitoring","sensu-plugins","socket-programming","whois"],"created_at":"2024-11-23T09:23:37.097Z","updated_at":"2024-11-23T09:23:37.777Z","avatar_url":"https://github.com/sensu-plugins.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Sensu Bonsai Asset](https://img.shields.io/badge/Bonsai-Download%20Me-brightgreen.svg?colorB=89C967\u0026logo=sensu)](https://bonsai.sensu.io/assets/sensu-plugins/sensu-plugins-network-checks)\n[![Build Status](https://travis-ci.org/sensu-plugins/sensu-plugins-network-checks.svg?branch=master)](https://travis-ci.org/sensu-plugins/sensu-plugins-network-checks)\n[![Gem Version](https://badge.fury.io/rb/sensu-plugins-network-checks.svg)](http://badge.fury.io/rb/sensu-plugins-network-checks)\n[![Code Climate](https://codeclimate.com/github/sensu-plugins/sensu-plugins-network-checks/badges/gpa.svg)](https://codeclimate.com/github/sensu-plugins/sensu-plugins-network-checks)\n[![Test Coverage](https://codeclimate.com/github/sensu-plugins/sensu-plugins-network-checks/badges/coverage.svg)](https://codeclimate.com/github/sensu-plugins/sensu-plugins-network-checks)\n[![Dependency Status](https://gemnasium.com/sensu-plugins/sensu-plugins-network-checks.svg)](https://gemnasium.com/sensu-plugins/sensu-plugins-network-checks)\n\n## Sensu Plugins Network Checks Plugin\n\n- [Overview](#overview)\n- [Files](#files)\n- [Usage examples](#usage-examples)\n- [Configuration](#configuration)\n  - [Sensu Go](#sensu-go)\n    - [Asset registration](#asset-registration)\n    - [Asset definition](#asset-definition)\n    - [Check definition](#check-definition)\n  - [Sensu Core](#sensu-core)\n    - [Check definition](#check-definition)\n- [Installation from source](#installation-from-source)\n- [Additional notes](#additional-notes)\n- [Contributing](#contributing)\n\n### Overview\n\nThis plugin provides native network instrumentation for monitoring and metrics collection, including hardware, TCP response, RBLs, whois, port status, and more.\n\n### Files\n * bin/check-banner.rb\n * bin/check-jsonwhois-domain-expiration.rb\n * bin/check-mtu.rb\n * bin/check-multicast-groups.rb\n * bin/check-netfilter-conntrack.rb\n * bin/check-netstat-tcp.rb\n * bin/check-ping.rb\n * bin/check-ports-bind.rb\n * bin/check-ports-nmap.rb\n * bin/check-ports.rb\n * bin/check-rbl.rb\n * bin/check-socat.rb\n * bin/check-whois-domain-expiration-multi.rb\n * bin/check-whois-domain-expiration.rb\n * bin/metrics-interface.rb\n * bin/metrics-net.rb\n * bin/metrics-netif.rb\n * bin/metrics-netstat-tcp.rb\n * bin/metrics-ping.rb\n * bin/metrics-sockstat.rb\n \n**check-banner**\nConnects to a TCP port on one or more hosts, reads until a char (EOF, EOL, etc), and tests output against a pattern.\n\n**check-jsonwhois-domain-expiration**\nChecks domain expiration dates using the https://jsonwhois.com API.\n\n**check-mtu**\nChecks maximum transmission unit (MTU) of a network interface. In many setups, MTUs are tuned and MTU mismatches cause issues. Having a check for MTU settings helps catch these mistakes. Also, some instances in Amazon EC2 have a default MTU size of 9,000 bytes, which is undesirable in some environments. This check can catch undesirable setups.\n\n**check-multicast-groups**\nChecks whether specific multicast groups are configured on specific interfaces. Requires the `netstat` command.\n\n**check-netfilter-conntrack**\nChecks Netfilter connection tracking table condition. \n\n**check-netstat-tcp**\nAlert based on thresholds of discrete TCP socket states reported by netstat.\n\n**check-ping**\nPing check script for Sensu.\n\n**check-ports-bind**\nConnects to a TCP/UDP `address:port` to check whether open or closed.\n\n**check-ports-nmap**\nFetches port status using nmap. Catches bad network access control lists (ACLs) and service down events for network resources.\n\n**check-ports**\nConnects to a TCP/UDP port on one or more ports check whether ropen or closed. This check now uses a TCPSocket, not nmap (**check-ports-nmap** above uses nmap).\n\n**check-rbl**\nChecks whether an IP is blacklisted in the common DNS blacklists or a list you add.\n\n**check-socat**\nInspects sockets, such as checking whether socat can receive particular a UDP multicast packet within a certain number of seconds or whether a UPD multicast packet contains an expected packet.\n\n**check-whois-domain-expiration-multi**\nChecks expiration dates for multiple domains using the `whois` gem.\n\n**check-whois-domain-expiration**\nChecks a domain's expiration dates using the `whois` gem.\n\n**metrics-interface**\nProvides interface metrics.\n\n**metrics-net**\nFetches metrics from all interfaces on the box using the /sys/class interface.\n\n**metrics-netif**\nFetches network interface throughput metrics.\n\n**metrics-netstat-tcp**\nFetches metrics on TCP socket states from netstat. Particularly useful on high-traffic web or proxy servers with large numbers of short-lived TCP connections coming and going.\n\n**metrics-ping**\nPings a host and outputs ping statistics.\n\n**metrics-sockstat**\nParses /proc/net/sockstat and outputs all fields as metrics.\n\n## Usage examples\n\n### Help\n\n**check-banner.rb**\n```\nUsage: check-banner.rb (options)\n    -c, --count NUMBER               Number of successful matches, default(1)\n    -C, --critmessage MESSAGE        Custom critical message to send\n    -e, --exclude_newline            Exclude newline character at end of write STRING\n    -H, --hostnames HOSTNAME(S)      Host(s) to connect to, comma seperated\n    -O, --okmessage MESSAGE          Custom ok message to send\n    -q, --pattern PAT                Pattern to search for\n    -p, --port PORT\n    -r, --readtill CHAR              Read till CHAR is reached\n    -S, --ssl                        Enable SSL socket for secure connection\n    -t, --timeout SECS               Connection timeout\n    -w, --write STRING               write STRING to the socket\n```\n\n**metrics-interface.rb**\n```\nUsage: metrics-interface.rb (options)\n    -x INTERFACE[,INTERFACE],        List of interfaces to exclude\n        --exclude-interface\n    -i INTERFACE[,INTERFACE],        List of interfaces to include\n        --include-interface\n    -s, --scheme SCHEME              Metric naming scheme, text to prepend to metric\n```\n\n## Configuration\n### Sensu Go\n#### Asset registration\n\nAssets are the best way to make use of this plugin. If you're not using an asset, please consider doing so! If you're using sensuctl 5.13 or later, you can use the following command to add the asset: \n\n`sensuctl asset add sensu-plugins/sensu-plugins-network-checks`\n\nIf you're using an earlier version of sensuctl, you can download the asset definition from [this project's Bonsai asset index page](https://bonsai.sensu.io/assets/sensu-plugins/sensu-plugins-network-checks).\n\n#### Asset definition\n\n```yaml\n---\ntype: Asset\napi_version: core/v2\nmetadata:\n  name: sensu-plugins-network-checks\nspec:\n  url: https://assets.bonsai.sensu.io/c90a2b1335ee9cda57046bd4551b303098a98237/sensu-plugins-network-checks_4.1.0_centos_linux_amd64.tar.gz\n  sha512: 0fe990e4eb53c308c6245d8ac8cc7268d34e3235d5188ecda3a7308889a09b8b722a77f57169d6d9a7c2f1bf3b523fcdcb618aeb4cd6b83bd74feb3683d721b7\n```\n\n#### Check definition\n\n```yaml\n---\ntype: CheckConfig\nspec:\n  command: \"check-banner.rb\"\n  handlers: []\n  high_flap_threshold: 0\n  interval: 10\n  low_flap_threshold: 0\n  publish: true\n  runtime_assets:\n  - sensu-plugins/sensu-plugins-network-checks\n  - sensu/sensu-ruby-runtime\n  subscriptions:\n  - linux\n```\n\n### Sensu Core\n\n#### Check definition\n```json\n{\n  \"checks\": {\n    \"check-banner\": {\n      \"command\": \"check-banner.rb\",\n      \"subscribers\": [\"linux\"],\n      \"interval\": 10,\n      \"refresh\": 10,\n      \"handlers\": [\"influxdb\"]\n    }\n  }\n}\n```\n\n## Installation from source\n\n### Sensu Go\n\nSee the instructions above for [asset registration](#asset-registration).\n\n### Sensu Core\n\nInstall and setup plugins on [Sensu Core](https://docs.sensu.io/sensu-core/latest/installation/installing-plugins/).\n\n## Additional notes\n\n### Sensu Go Ruby Runtime Assets\n\nThe Sensu assets packaged from this repository are built against the Sensu Ruby runtime environment. When using these assets as part of a Sensu Go resource (check, mutator, or handler), make sure to include the corresponding [Sensu Ruby Runtime Asset](https://bonsai.sensu.io/assets/sensu/sensu-ruby-runtime) in the list of assets needed by the resource.\n\n## Contributing\n\nSee [CONTRIBUTING.md](https://github.com/sensu-plugins/sensu-plugins-network-checks/blob/master/CONTRIBUTING.md) for information about contributing to this plugin.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsensu-plugins%2Fsensu-plugins-network-checks","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsensu-plugins%2Fsensu-plugins-network-checks","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsensu-plugins%2Fsensu-plugins-network-checks/lists"}