sensu-plugins-network-checks 4.1.0 → 4.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -1
- data/README.md +174 -27
- data/lib/sensu-plugins-network-checks/version.rb +1 -1
- metadata +4 -4
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA256:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: c2ce6e609965658347f8c02baa043e102a8f02c2963c01e0bd3e6ec1376da59a
         | 
| 4 | 
            +
              data.tar.gz: e8728d260dbcedfe9925ab777bc87dc7135a265a0097fa03a3ebc8d93b8bb420
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: 993526dc40bef783d55a7ea7270dce6ae98a99326890dfbc84396f15eb32aa6c18481de783b42dca7421b5c9f13ecdf615eeedfbe8da2427240579a89add5086
         | 
| 7 | 
            +
              data.tar.gz: 01b9d44c7164813948a35c2e258c37cf6d7ae2001f105ae7ed710827a9c1e8bce17303907dfb6b752930b9f6c72bff95f3ec9b0aa176597b6af1eabd1e227a14
         | 
    
        data/CHANGELOG.md
    CHANGED
    
    | @@ -5,6 +5,11 @@ This CHANGELOG follows the format listed  [here](https://github.com/sensu-plugin | |
| 5 5 |  | 
| 6 6 | 
             
            ## [Unreleased]
         | 
| 7 7 |  | 
| 8 | 
            +
            ## [4.1.1] - 2019-12-18
         | 
| 9 | 
            +
            ### Changed
         | 
| 10 | 
            +
            - Updated README to conform with standardization guidelines (sensu-plugins/community#134)
         | 
| 11 | 
            +
            - Updated bundler development depedency to '~> 2.1'
         | 
| 12 | 
            +
             | 
| 8 13 | 
             
            ## [4.1.0] - 2019-012-12
         | 
| 9 14 | 
             
            ### Added
         | 
| 10 15 | 
             
            - Updated asset build targets to support centos6
         | 
| @@ -245,7 +250,8 @@ This CHANGELOG follows the format listed  [here](https://github.com/sensu-plugin | |
| 245 250 |  | 
| 246 251 | 
             
            * initial release, same as community repo
         | 
| 247 252 |  | 
| 248 | 
            -
            [Unreleased]: https://github.com/sensu-plugins/sensu-plugins-network-checks/compare/4.1. | 
| 253 | 
            +
            [Unreleased]: https://github.com/sensu-plugins/sensu-plugins-network-checks/compare/4.1.1...HEAD
         | 
| 254 | 
            +
            [4.1.1]: https://github.com/sensu-plugins/sensu-plugins-network-checks/compare/4.0.0...4.1.1
         | 
| 249 255 | 
             
            [4.1.0]: https://github.com/sensu-plugins/sensu-plugins-network-checks/compare/4.0.0...4.1.0
         | 
| 250 256 | 
             
            [4.0.0]: https://github.com/sensu-plugins/sensu-plugins-network-checks/compare/3.2.1...4.0.0
         | 
| 251 257 | 
             
            [3.2.1]: https://github.com/sensu-plugins/sensu-plugins-network-checks/compare/3.2.0...3.2.1
         | 
    
        data/README.md
    CHANGED
    
    | @@ -1,28 +1,41 @@ | |
| 1 | 
            -
             | 
| 1 | 
            +
            [](https://bonsai.sensu.io/assets/sensu-plugins/sensu-plugins-network-checks)
         | 
| 2 2 | 
             
            [](https://travis-ci.org/sensu-plugins/sensu-plugins-network-checks)
         | 
| 3 3 | 
             
            [](http://badge.fury.io/rb/sensu-plugins-network-checks)
         | 
| 4 4 | 
             
            [](https://codeclimate.com/github/sensu-plugins/sensu-plugins-network-checks)
         | 
| 5 5 | 
             
            [](https://codeclimate.com/github/sensu-plugins/sensu-plugins-network-checks)
         | 
| 6 6 | 
             
            [](https://gemnasium.com/sensu-plugins/sensu-plugins-network-checks)
         | 
| 7 | 
            -
            [](https://bonsai.sensu.io/assets/sensu-plugins/sensu-plugins-network-checks)
         | 
| 8 7 |  | 
| 9 | 
            -
            ## Sensu  | 
| 10 | 
            -
             | 
| 8 | 
            +
            ## Sensu Plugins Network Checks Plugin
         | 
| 9 | 
            +
             | 
| 10 | 
            +
            - [Overview](#overview)
         | 
| 11 | 
            +
            - [Files](#files)
         | 
| 12 | 
            +
            - [Usage examples](#usage-examples)
         | 
| 13 | 
            +
            - [Configuration](#configuration)
         | 
| 14 | 
            +
              - [Sensu Go](#sensu-go)
         | 
| 15 | 
            +
                - [Asset registration](#asset-registration)
         | 
| 16 | 
            +
                - [Asset definition](#asset-definition)
         | 
| 17 | 
            +
                - [Check definition](#check-definition)
         | 
| 18 | 
            +
              - [Sensu Core](#sensu-core)
         | 
| 19 | 
            +
                - [Check definition](#check-definition)
         | 
| 20 | 
            +
            - [Installation from source](#installation-from-source)
         | 
| 21 | 
            +
            - [Additional notes](#additional-notes)
         | 
| 22 | 
            +
            - [Contributing](#contributing)
         | 
| 11 23 |  | 
| 24 | 
            +
            ### Overview
         | 
| 12 25 |  | 
| 13 | 
            -
             | 
| 26 | 
            +
            This plugin provides native network instrumentation for monitoring and metrics collection, including hardware, TCP response, RBLs, whois, port status, and more.
         | 
| 14 27 |  | 
| 15 | 
            -
             | 
| 28 | 
            +
            ### Files
         | 
| 16 29 | 
             
             * bin/check-banner.rb
         | 
| 17 | 
            -
             * bin/check-netfilter-conntrack.rb
         | 
| 18 30 | 
             
             * bin/check-jsonwhois-domain-expiration.rb
         | 
| 19 31 | 
             
             * bin/check-mtu.rb
         | 
| 20 32 | 
             
             * bin/check-multicast-groups.rb
         | 
| 33 | 
            +
             * bin/check-netfilter-conntrack.rb
         | 
| 21 34 | 
             
             * bin/check-netstat-tcp.rb
         | 
| 22 35 | 
             
             * bin/check-ping.rb
         | 
| 36 | 
            +
             * bin/check-ports-bind.rb
         | 
| 23 37 | 
             
             * bin/check-ports-nmap.rb
         | 
| 24 38 | 
             
             * bin/check-ports.rb
         | 
| 25 | 
            -
             * bin/check-ports-bind.rb
         | 
| 26 39 | 
             
             * bin/check-rbl.rb
         | 
| 27 40 | 
             
             * bin/check-socat.rb
         | 
| 28 41 | 
             
             * bin/check-whois-domain-expiration-multi.rb
         | 
| @@ -33,38 +46,172 @@ | |
| 33 46 | 
             
             * bin/metrics-netstat-tcp.rb
         | 
| 34 47 | 
             
             * bin/metrics-ping.rb
         | 
| 35 48 | 
             
             * bin/metrics-sockstat.rb
         | 
| 49 | 
            +
             
         | 
| 50 | 
            +
            **check-banner**
         | 
| 51 | 
            +
            Connects to a TCP port on one or more hosts, reads until a char (EOF, EOL, etc), and tests output against a pattern.
         | 
| 52 | 
            +
             | 
| 53 | 
            +
            **check-jsonwhois-domain-expiration**
         | 
| 54 | 
            +
            Checks domain expiration dates using the https://jsonwhois.com API.
         | 
| 55 | 
            +
             | 
| 56 | 
            +
            **check-mtu**
         | 
| 57 | 
            +
            Checks 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.
         | 
| 58 | 
            +
             | 
| 59 | 
            +
            **check-multicast-groups**
         | 
| 60 | 
            +
            Checks whether specific multicast groups are configured on specific interfaces. Requires the `netstat` command.
         | 
| 61 | 
            +
             | 
| 62 | 
            +
            **check-netfilter-conntrack**
         | 
| 63 | 
            +
            Checks Netfilter connection tracking table condition. 
         | 
| 36 64 |  | 
| 37 | 
            -
             | 
| 65 | 
            +
            **check-netstat-tcp**
         | 
| 66 | 
            +
            Alert based on thresholds of discrete TCP socket states reported by netstat.
         | 
| 67 | 
            +
             | 
| 68 | 
            +
            **check-ping**
         | 
| 69 | 
            +
            Ping check script for Sensu.
         | 
| 70 | 
            +
             | 
| 71 | 
            +
            **check-ports-bind**
         | 
| 72 | 
            +
            Connects to a TCP/UDP `address:port` to check whether open or closed.
         | 
| 73 | 
            +
             | 
| 74 | 
            +
            **check-ports-nmap**
         | 
| 75 | 
            +
            Fetches port status using nmap. Catches bad network access control lists (ACLs) and service down events for network resources.
         | 
| 38 76 |  | 
| 39 77 | 
             
            **check-ports**
         | 
| 40 | 
            -
            This check now uses a TCPSocket, not nmap ( | 
| 41 | 
            -
             | 
| 42 | 
            -
            check- | 
| 78 | 
            +
            Connects 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).
         | 
| 79 | 
            +
             | 
| 80 | 
            +
            **check-rbl**
         | 
| 81 | 
            +
            Checks whether an IP is blacklisted in the common DNS blacklists or a list you add.
         | 
| 82 | 
            +
             | 
| 83 | 
            +
            **check-socat**
         | 
| 84 | 
            +
            Inspects 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.
         | 
| 85 | 
            +
             | 
| 86 | 
            +
            **check-whois-domain-expiration-multi**
         | 
| 87 | 
            +
            Checks expiration dates for multiple domains using the `whois` gem.
         | 
| 88 | 
            +
             | 
| 89 | 
            +
            **check-whois-domain-expiration**
         | 
| 90 | 
            +
            Checks a domain's expiration dates using the `whois` gem.
         | 
| 91 | 
            +
             | 
| 92 | 
            +
            **metrics-interface**
         | 
| 93 | 
            +
            Provides interface metrics.
         | 
| 94 | 
            +
             | 
| 95 | 
            +
            **metrics-net**
         | 
| 96 | 
            +
            Fetches metrics from all interfaces on the box using the /sys/class interface.
         | 
| 97 | 
            +
             | 
| 98 | 
            +
            **metrics-netif**
         | 
| 99 | 
            +
            Fetches network interface throughput metrics.
         | 
| 100 | 
            +
             | 
| 101 | 
            +
            **metrics-netstat-tcp**
         | 
| 102 | 
            +
            Fetches 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.
         | 
| 43 103 |  | 
| 44 | 
            -
             | 
| 45 | 
            -
             | 
| 46 | 
            -
             | 
| 104 | 
            +
            **metrics-ping**
         | 
| 105 | 
            +
            Pings a host and outputs ping statistics.
         | 
| 106 | 
            +
             | 
| 107 | 
            +
            **metrics-sockstat**
         | 
| 108 | 
            +
            Parses /proc/net/sockstat and outputs all fields as metrics.
         | 
| 109 | 
            +
             | 
| 110 | 
            +
            ## Usage examples
         | 
| 111 | 
            +
             | 
| 112 | 
            +
            ### Help
         | 
| 113 | 
            +
             | 
| 114 | 
            +
            **check-banner.rb**
         | 
| 115 | 
            +
            ```
         | 
| 116 | 
            +
            Usage: check-banner.rb (options)
         | 
| 117 | 
            +
                -c, --count NUMBER               Number of successful matches, default(1)
         | 
| 118 | 
            +
                -C, --critmessage MESSAGE        Custom critical message to send
         | 
| 119 | 
            +
                -e, --exclude_newline            Exclude newline character at end of write STRING
         | 
| 120 | 
            +
                -H, --hostnames HOSTNAME(S)      Host(s) to connect to, comma seperated
         | 
| 121 | 
            +
                -O, --okmessage MESSAGE          Custom ok message to send
         | 
| 122 | 
            +
                -q, --pattern PAT                Pattern to search for
         | 
| 123 | 
            +
                -p, --port PORT
         | 
| 124 | 
            +
                -r, --readtill CHAR              Read till CHAR is reached
         | 
| 125 | 
            +
                -S, --ssl                        Enable SSL socket for secure connection
         | 
| 47 126 | 
             
                -t, --timeout SECS               Connection timeout
         | 
| 127 | 
            +
                -w, --write STRING               write STRING to the socket
         | 
| 48 128 | 
             
            ```
         | 
| 49 129 |  | 
| 50 | 
            -
            ** | 
| 130 | 
            +
            **metrics-interface.rb**
         | 
| 51 131 | 
             
            ```
         | 
| 52 | 
            -
            Usage:  | 
| 53 | 
            -
                - | 
| 54 | 
            -
             | 
| 55 | 
            -
                - | 
| 132 | 
            +
            Usage: metrics-interface.rb (options)
         | 
| 133 | 
            +
                -x INTERFACE[,INTERFACE],        List of interfaces to exclude
         | 
| 134 | 
            +
                    --exclude-interface
         | 
| 135 | 
            +
                -i INTERFACE[,INTERFACE],        List of interfaces to include
         | 
| 136 | 
            +
                    --include-interface
         | 
| 137 | 
            +
                -s, --scheme SCHEME              Metric naming scheme, text to prepend to metric
         | 
| 56 138 | 
             
            ```
         | 
| 57 139 |  | 
| 58 | 
            -
             | 
| 140 | 
            +
            ## Configuration
         | 
| 141 | 
            +
            ### Sensu Go
         | 
| 142 | 
            +
            #### Asset registration
         | 
| 143 | 
            +
             | 
| 144 | 
            +
            Assets 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: 
         | 
| 145 | 
            +
             | 
| 146 | 
            +
            `sensuctl asset add sensu-plugins/sensu-plugins-network-checks`
         | 
| 147 | 
            +
             | 
| 148 | 
            +
            If 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).
         | 
| 149 | 
            +
             | 
| 150 | 
            +
            #### Asset definition
         | 
| 151 | 
            +
             | 
| 152 | 
            +
            ```yaml
         | 
| 153 | 
            +
            ---
         | 
| 154 | 
            +
            type: Asset
         | 
| 155 | 
            +
            api_version: core/v2
         | 
| 156 | 
            +
            metadata:
         | 
| 157 | 
            +
              name: sensu-plugins-network-checks
         | 
| 158 | 
            +
            spec:
         | 
| 159 | 
            +
              url: https://assets.bonsai.sensu.io/c90a2b1335ee9cda57046bd4551b303098a98237/sensu-plugins-network-checks_4.1.0_centos_linux_amd64.tar.gz
         | 
| 160 | 
            +
              sha512: 0fe990e4eb53c308c6245d8ac8cc7268d34e3235d5188ecda3a7308889a09b8b722a77f57169d6d9a7c2f1bf3b523fcdcb618aeb4cd6b83bd74feb3683d721b7
         | 
| 59 161 | 
             
            ```
         | 
| 162 | 
            +
             | 
| 163 | 
            +
            #### Check definition
         | 
| 164 | 
            +
             | 
| 165 | 
            +
            ```yaml
         | 
| 166 | 
            +
            ---
         | 
| 167 | 
            +
            type: CheckConfig
         | 
| 168 | 
            +
            spec:
         | 
| 169 | 
            +
              command: "check-banner.rb"
         | 
| 170 | 
            +
              handlers: []
         | 
| 171 | 
            +
              high_flap_threshold: 0
         | 
| 172 | 
            +
              interval: 10
         | 
| 173 | 
            +
              low_flap_threshold: 0
         | 
| 174 | 
            +
              publish: true
         | 
| 175 | 
            +
              runtime_assets:
         | 
| 176 | 
            +
              - sensu-plugins/sensu-plugins-network-checks
         | 
| 177 | 
            +
              - sensu/sensu-ruby-runtime
         | 
| 178 | 
            +
              subscriptions:
         | 
| 179 | 
            +
              - linux
         | 
| 180 | 
            +
            ```
         | 
| 181 | 
            +
             | 
| 182 | 
            +
            ### Sensu Core
         | 
| 183 | 
            +
             | 
| 184 | 
            +
            #### Check definition
         | 
| 185 | 
            +
            ```json
         | 
| 60 186 | 
             
            {
         | 
| 61 | 
            -
              " | 
| 62 | 
            -
                 | 
| 63 | 
            -
             | 
| 187 | 
            +
              "checks": {
         | 
| 188 | 
            +
                "check-banner": {
         | 
| 189 | 
            +
                  "command": "check-banner.rb",
         | 
| 190 | 
            +
                  "subscribers": ["linux"],
         | 
| 191 | 
            +
                  "interval": 10,
         | 
| 192 | 
            +
                  "refresh": 10,
         | 
| 193 | 
            +
                  "handlers": ["influxdb"]
         | 
| 194 | 
            +
                }
         | 
| 195 | 
            +
              }
         | 
| 64 196 | 
             
            }
         | 
| 65 197 | 
             
            ```
         | 
| 66 | 
            -
            ## Installation
         | 
| 67 198 |  | 
| 68 | 
            -
             | 
| 199 | 
            +
            ## Installation from source
         | 
| 200 | 
            +
             | 
| 201 | 
            +
            ### Sensu Go
         | 
| 202 | 
            +
             | 
| 203 | 
            +
            See the instructions above for [asset registration](#asset-registration).
         | 
| 204 | 
            +
             | 
| 205 | 
            +
            ### Sensu Core
         | 
| 206 | 
            +
             | 
| 207 | 
            +
            Install and setup plugins on [Sensu Core](https://docs.sensu.io/sensu-core/latest/installation/installing-plugins/).
         | 
| 208 | 
            +
             | 
| 209 | 
            +
            ## Additional notes
         | 
| 210 | 
            +
             | 
| 211 | 
            +
            ### Sensu Go Ruby Runtime Assets
         | 
| 212 | 
            +
             | 
| 213 | 
            +
            The 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.
         | 
| 214 | 
            +
             | 
| 215 | 
            +
            ## Contributing
         | 
| 69 216 |  | 
| 70 | 
            -
             | 
| 217 | 
            +
            See [CONTRIBUTING.md](https://github.com/sensu-plugins/sensu-plugins-network-checks/blob/master/CONTRIBUTING.md) for information about contributing to this plugin.
         | 
    
        metadata
    CHANGED
    
    | @@ -1,14 +1,14 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: sensu-plugins-network-checks
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 4.1. | 
| 4 | 
            +
              version: 4.1.1
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - Sensu-Plugins and contributors
         | 
| 8 8 | 
             
            autorequire: 
         | 
| 9 9 | 
             
            bindir: bin
         | 
| 10 10 | 
             
            cert_chain: []
         | 
| 11 | 
            -
            date:  | 
| 11 | 
            +
            date: 2020-01-10 00:00:00.000000000 Z
         | 
| 12 12 | 
             
            dependencies:
         | 
| 13 13 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 14 14 | 
             
              name: sensu-plugin
         | 
| @@ -100,14 +100,14 @@ dependencies: | |
| 100 100 | 
             
                requirements:
         | 
| 101 101 | 
             
                - - "~>"
         | 
| 102 102 | 
             
                  - !ruby/object:Gem::Version
         | 
| 103 | 
            -
                    version: '1 | 
| 103 | 
            +
                    version: '2.1'
         | 
| 104 104 | 
             
              type: :development
         | 
| 105 105 | 
             
              prerelease: false
         | 
| 106 106 | 
             
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 107 107 | 
             
                requirements:
         | 
| 108 108 | 
             
                - - "~>"
         | 
| 109 109 | 
             
                  - !ruby/object:Gem::Version
         | 
| 110 | 
            -
                    version: '1 | 
| 110 | 
            +
                    version: '2.1'
         | 
| 111 111 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 112 112 | 
             
              name: codeclimate-test-reporter
         | 
| 113 113 | 
             
              requirement: !ruby/object:Gem::Requirement
         |