├── doc ├── html │ ├── nagios.manubulon.com │ │ ├── robots.txt │ │ ├── snmp_int.html │ │ ├── snmp_vrrp.html │ │ ├── img │ │ │ ├── sideback.jpg │ │ │ └── smalllogo7.jpg │ │ ├── snmp_process.html │ │ ├── snmp_storage.html │ │ ├── snmp_windows.html │ │ ├── p1-print.pl.patch │ │ ├── nagios_cert.cer │ │ ├── package_c.html │ │ ├── snmp_mem.html │ │ ├── snmp_env.html │ │ ├── snmp_css.html │ │ ├── snmp_cpfw.html │ │ ├── snmp_load.html │ │ └── faq.html │ └── README.md ├── 01-About.md ├── 02-Installation.md └── 03-Configuration.md ├── icingaexchange.yml ├── .perltidyrc ├── .github └── ISSUE_TEMPLATE.md ├── README.md ├── CHANGELOG.md ├── plugins ├── install.sh ├── check_snmp_css_main.pl ├── check_snmp_linkproof_nhr.pl ├── check_snmp_boostedge.pl ├── check_snmp_win.pl └── check_snmp_nsbox.pl └── LICENSE /doc/html/nagios.manubulon.com/robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | -------------------------------------------------------------------------------- /doc/html/nagios.manubulon.com/snmp_int.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SteScho/manubulon-snmp/HEAD/doc/html/nagios.manubulon.com/snmp_int.html -------------------------------------------------------------------------------- /doc/html/nagios.manubulon.com/snmp_vrrp.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SteScho/manubulon-snmp/HEAD/doc/html/nagios.manubulon.com/snmp_vrrp.html -------------------------------------------------------------------------------- /doc/html/nagios.manubulon.com/img/sideback.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SteScho/manubulon-snmp/HEAD/doc/html/nagios.manubulon.com/img/sideback.jpg -------------------------------------------------------------------------------- /doc/html/nagios.manubulon.com/snmp_process.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SteScho/manubulon-snmp/HEAD/doc/html/nagios.manubulon.com/snmp_process.html -------------------------------------------------------------------------------- /doc/html/nagios.manubulon.com/snmp_storage.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SteScho/manubulon-snmp/HEAD/doc/html/nagios.manubulon.com/snmp_storage.html -------------------------------------------------------------------------------- /doc/html/nagios.manubulon.com/snmp_windows.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SteScho/manubulon-snmp/HEAD/doc/html/nagios.manubulon.com/snmp_windows.html -------------------------------------------------------------------------------- /doc/html/nagios.manubulon.com/img/smalllogo7.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SteScho/manubulon-snmp/HEAD/doc/html/nagios.manubulon.com/img/smalllogo7.jpg -------------------------------------------------------------------------------- /icingaexchange.yml: -------------------------------------------------------------------------------- 1 | name: manubulon-snmp 2 | description: "file:///README.md" 3 | url: "https://github.com/dnsmichi/manubulon-snmp" 4 | tags: SNMP,Storage,Network,Windows,NAS 5 | vendor: Linux,Cisco,HP,Fortinet,Juniper 6 | target: Operating System,Snmp,Storage,Network 7 | type: Plugin 8 | license: gpl 9 | -------------------------------------------------------------------------------- /doc/html/README.md: -------------------------------------------------------------------------------- 1 | This directory contains a copy of nagios.manubulon.com 2 | with stripped binary files and removed french nagios docs. 3 | 4 | # wget command 5 | 6 | wget --recursive --no-clobber --page-requisites --html-extension --convert-links --restrict-file-names=windows --domains nagios.manubulon.com --no-parent http://nagios.manubulon.com 7 | -------------------------------------------------------------------------------- /.perltidyrc: -------------------------------------------------------------------------------- 1 | ## basic options 2 | --maximum-line-length=120 3 | --indent-columns=4 4 | 5 | ## code indentation control 6 | --continuation-indentation=4 7 | 8 | ## whilespace control 9 | --paren-tightness=2 10 | --square-bracket-tightness=2 11 | --block-brace-tightness=0 12 | --nospace-for-semicolon 13 | #--add-semicolons 14 | --nospace-function-paren 15 | 16 | ## line break control 17 | --cuddled-else 18 | 19 | #--closing-token-indentation=0 20 | #--nooutdent-long-quotes 21 | #--nooutdent-labels 22 | #--brace-tightness=1 23 | #--vertical-tightness=0 24 | #--stack-opening-tokens 25 | #--stack-closing-tokens 26 | --want-break-before="% + - * / x != == >= <= =~ !~ < > | & = **= += *= &= <<= &&= -= /= |= >>= ||= //= .= %= ^= x=" 27 | #--format-skipping-begin="#+\s*no tidy" 28 | #--format-skipping-end="#+\s*tidy" 29 | -------------------------------------------------------------------------------- /doc/01-About.md: -------------------------------------------------------------------------------- 1 | # About Manubulon SNMP Plugins 2 | 3 | Manubulon SNMP plugins is a set of Icinga/Nagios plugins 4 | to check hosts/devices using the SNMP protocol. 5 | 6 | Please find more insights in the following chapters: 7 | 8 | * [Installation](02-Installation.md) 9 | * [Configuration](03-Configuration.md) 10 | * [Plugins](04-Plugins.md) 11 | 12 | 13 | 14 | ## History 15 | 16 | These plugins have been written by Patrick Proy several years ago. 17 | 18 | Many community members still use them, but development and patches 19 | stopped. 20 | 21 | I've used these plugins in my previous job, and decided to fork them 22 | into this repository. Many patches have been applied, and put into 23 | official releases for packagers. 24 | 25 | This is reflected by moving each plugin into a v2.x version although 26 | there are not so many changes. 27 | 28 | I don't have a test system/hardware nor do much with these plugins these days. 29 | Still this repository allows community members to send in their patches 30 | and discuss bugs and feature requests. 31 | -------------------------------------------------------------------------------- /doc/html/nagios.manubulon.com/p1-print.pl.patch: -------------------------------------------------------------------------------- 1 | --- p1.pl.dist 2006-03-21 11:42:30.000000000 +1100 2 | +++ p1.pl 2006-03-21 11:56:16.000000000 +1100 3 | @@ -69,27 +69,29 @@ 4 | 5 | sub TIEHANDLE { 6 | my ($class) = @_; 7 | - my $me ; 8 | + my $me = ''; 9 | bless \$me, $class; 10 | } 11 | 12 | sub PRINT { 13 | my $self = shift; 14 | - $$self = substr(join('',@_), 0, 256) ; 15 | - # $$self .= substr(join('',@_), 0, 256) ; 16 | + # $$self = substr(join('',@_), 0, 256) ; 17 | + $$self .= substr(join('',@_), 0, 256) ; 18 | } 19 | 20 | sub PRINTF { 21 | my $self = shift; 22 | my $fmt = shift; 23 | - $$self = substr(sprintf($fmt,@_), 0, 256) ; 24 | - # $$self .= substr(sprintf($fmt,@_), 0, 256) ; 25 | + # $$self = substr(sprintf($fmt,@_), 0, 256) ; 26 | + $$self .= substr(sprintf($fmt,@_), 0, 256) ; 27 | } 28 | 29 | sub READLINE { 30 | my $self = shift; 31 | + # Omit all lines after the first, per the nagios plugin guidelines 32 | + $$self = (split /\n/, $$self)[0]; 33 | # Perl code other than plugins may print nothing; in this case return "(No output!)\n". 34 | - return $$self ? $$self : "(No output!)\n" ; 35 | + return $$self ? substr($$self, 0, 256) : "(No output!)\n" ; 36 | } 37 | 38 | sub CLOSE { 39 | -------------------------------------------------------------------------------- /doc/html/nagios.manubulon.com/nagios_cert.cer: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIDuzCCAqOgAwIBAgIBCzANBgkqhkiG9w0BAQUFADBFMREwDwYDVQQKEwhwcm95 3 | Lm9yZzEPMA0GA1UEAxMGUHJveUNBMR8wHQYJKoZIhvcNAQkBFhBwYXRyaWNrQHBy 4 | b3kub3JnMB4XDTA3MDExMTE4MTM0NFoXDTA4MDExMTE4MTM0NFowgYExCzAJBgNV 5 | BAYTAkZSMQ4wDAYDVQQIEwVSaG9uZTENMAsGA1UEBxMETHlvbjERMA8GA1UEChMI 6 | cHJveS5vcmcxDzANBgNVBAsTBk5hZ2lvczEPMA0GA1UEAxMGTmFnaW9zMR4wHAYJ 7 | KoZIhvcNAQkBFg9uYWdpb3NAcHJveS5vcmcwgZ8wDQYJKoZIhvcNAQEBBQADgY0A 8 | MIGJAoGBAKSakWwv5g4cpXu2bL6/Aq+29BmY5pmiqOp5mSifYOfCYJfAMOCyeGAI 9 | 03GmEYhWaYVvEC2x03u7WhlbR6WzFsIxnFETdarlEHGl94wicyz6PKnwa9X5vkWm 10 | VKYgulvz6+jmrWFOyJ+Q60nIU0oAVE+0Erlk7MkFkWw1uthWl7VTAgMBAAGjgfww 11 | gfkwHQYDVR0OBBYEFKLfzxeOiNsgM53DMDcpTx7rsIH/MG0GA1UdIwRmMGSAFEE6 12 | rbWSeijSQchCxUCknwDCivOfoUmkRzBFMREwDwYDVQQKEwhwcm95Lm9yZzEPMA0G 13 | A1UEAxMGUHJveUNBMR8wHQYJKoZIhvcNAQkBFhBwYXRyaWNrQHByb3kub3JnggEA 14 | MAkGA1UdEwQCMAAwLwYDVR0fBCgwJjAkoCKgIIYeaHR0cDovL3d3dy5wcm95Lm9y 15 | Zy9wcm95Q0EuY3JsMC0GCWCGSAGG+EIBBAQgFh5odHRwOi8vd3d3LnByb3kub3Jn 16 | L3Byb3lDQS5jcmwwDQYJKoZIhvcNAQEFBQADggEBADOEbkwCMCjNi6fkw1GR4cyO 17 | wWpHHE2J5en5eh5KIZCsW90vYH2TttjfYk/gnoON3lBsAV+Cisvdx5/LpEuqfZFB 18 | GMApyG58oXPzVipytppyOSxGlDkAnAXC9jNRIiZ4lBDXloziTaIPmjVpBM6wuEpY 19 | 7pGo1J7B+GOvKLYFYVX+tuOpMlHJtDJbhn2seTr50MaI0uncnqjKpXHO+J205p8b 20 | psCEkaZSQZ2EXpX+caCFxy1rjqC49glq/DaaxopQlhkUCvDQRoRoHDXg3EBW0Svx 21 | G9emvqbByaf31mUVlIesj8B+Xo8bqRMcEyWfwc7UE94Tzw6Iv2Xl2qFS2wmgMf8= 22 | -----END CERTIFICATE----- 23 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | ## Expected Behavior 4 | 5 | 6 | 7 | ## Current Behavior 8 | 9 | 10 | 11 | ## Possible Solution 12 | 13 | 14 | 15 | ## Steps to Reproduce (for bugs) 16 | 17 | 18 | 1. 19 | 2. 20 | 3. 21 | 4. 22 | 23 | ## Context 24 | 25 | 26 | 27 | ## Your Environment 28 | 29 | * Version used (e.g. `check_snmp_int.pl -V`): 30 | * Perl version (`perl -v`): 31 | * Operating System and version: 32 | * Monitoring system (e.g. `icinga2 --version`): 33 | * CheckCommand and Service configuration: 34 | * Full command line executed by Icinga, if relevant: 35 | 36 | -------------------------------------------------------------------------------- /doc/02-Installation.md: -------------------------------------------------------------------------------- 1 | # Manubulon SNMP Plugins Installation 2 | 3 | The plugins rely on the `Net::SNMP` Perl library for fetching 4 | data from SNMP enabled hosts. 5 | 6 | ## Prerequisites 7 | 8 | ### RHEL/CentOS EPEL Repository 9 | 10 | RHEL/CentOS requires the EPEL repository: 11 | 12 | ``` 13 | yum -y install epel-release 14 | yum makecache 15 | ``` 16 | 17 | If you are using RHEL you need enable the `optional` repository and then install 18 | the [EPEL rpm package](https://fedoraproject.org/wiki/EPEL#How_can_I_use_these_extra_packages.3F). 19 | 20 | ## Perl Dependencies 21 | 22 | Debian/Ubuntu: 23 | 24 | ``` 25 | apt-get -y install libnet-snmp-perl libcrypt-des-perl libcrypt-rijndael-perl libdigest-hmac-perl 26 | ``` 27 | 28 | RHEL/CentOS/Fedora: 29 | 30 | ``` 31 | yum -y install perl-Net-SNMP perl-Getopt-Long perl-Crypt-DES perl-Crypt-Rijndael perl-Digest-HMAC 32 | ``` 33 | 34 | ## Plugin Setup 35 | 36 | Debian/Ubuntu: 37 | 38 | ``` 39 | install -o root -g root -m755 plugins/*.pl /usr/lib/nagios/plugins/ 40 | ``` 41 | 42 | RHEL/CentOS/Fedora: 43 | 44 | ``` 45 | install -o root -g root -m755 plugins/*.pl /usr/lib64/nagios/plugins/ 46 | ``` 47 | 48 | Proceed with inspecting the plugins `--help` parameter in [this chapter](04-Plugins.md). 49 | 50 | Next up: Integrate the plugins into your monitoring by adding [configuration](03-Configuration.md). 51 | 52 | ## Advanced Hints 53 | 54 | Perl, default directory and temp files location can be changed using the install.sh script. 55 | 56 | `utils.pm` from `Monitoring::Plugin::Perl` is no longer required. 57 | 58 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Manubulon SNMP Plugins 2 | 3 | #### Table of Contents 4 | 5 | 1. [About](#about) 6 | 2. [License](#license) 7 | 3. [Support](#support) 8 | 4. [Requirements](#requirements) 9 | 5. [Installation](#installation) 10 | 6. [Configuration](#configuration) 11 | 7. [FAQ](#faq) 12 | 8. [Thanks](#thanks) 13 | 9. [Contributing](#contributing) 14 | 15 | ## About 16 | 17 | Manubulon SNMP plugins is a set of Icinga/Nagios plugins 18 | to check hosts/devices using the SNMP protocol. 19 | 20 | ### Plugin Overview 21 | 22 | Plugin | Description 23 | ------------------------------|---------------------------------------- 24 | check\_snmp\_storage | Storage checks (disks, swap, memory, etc.) 25 | check\_snmp\_int | Interface states, usage on hosts, switches, routers, etc. 26 | check\_snmp\_process | Running processes, their number, used CPU and memory. 27 | check\_snmp\_load | Load/CPU checks 28 | check\_snmp\_mem | Memory and swap usage 29 | check\_snmp\_env | Environmental status of fan, temp, power supplies. 30 | check\_snmp\_vrrp | Interface state of a VRRP cluster 31 | check\_snmp\_cpfw | Checkpoint Firewall-1 status 32 | check\_snmp\_win | Windows services 33 | check\_snmp\_css | CSS service states 34 | check\_snmp\_nsbox | Nsbox VHost and diode status 35 | check\_snmp\_boostedge | Boostedge services 36 | check\_snmp\_linkproof\_ndr | Linkproof NHR 37 | 38 | ## License 39 | 40 | These plugins are licensed under the terms of the GNU General Public License. 41 | You will find a copy of this license in the LICENSE file included in the source package. 42 | 43 | ## Support 44 | 45 | ## Requirements 46 | 47 | * Perl in `/usr/bin/perl` 48 | * Perl modules 49 | [Net::SNMP](http://search.cpan.org/~dtown/Net-SNMP-v6.0.1/lib/Net/SNMP.pm) and 50 | [Getopt::Long](http://search.cpan.org/~jv/Getopt-Long-2.49.1/lib/Getopt/Long.pm) 51 | * `icinga` user able to write files in /tmp/ directory 52 | * SNMP v3 authentication: Perl modules 53 | [Crypt::DES](http://search.cpan.org/~dparis/Crypt-DES-2.07/DES.pm), 54 | [Crypt::Rijndael](http://search.cpan.org/~leont/Crypt-Rijndael-1.13/Rijndael.pm) and 55 | [Digest::HMAC](http://search.cpan.org/~gaas/Digest-HMAC-1.03/lib/Digest/HMAC.pm) 56 | 57 | ## Installation 58 | 59 | Detailed installation instructions can be found [here](doc/02-Installation.md). 60 | 61 | ## Configuration 62 | 63 | Proceed [here](doc/03-Configuration.md) to get details on the configuration with Icinga 2, Icinga 1.x, etc. 64 | 65 | ## FAQ 66 | 67 | 68 | ## Thanks 69 | 70 | Patrick Proy for creating and maintaining the original plugins. 71 | [Michael Friedrich](https://twitter.com/dnsmichi) for maintaing the CVS import and adding community patches. 72 | 73 | ## Contributing 74 | 75 | Fork this repository on GitHub and send in a PR. 76 | 77 | There's a `.perltidyrc` file in the main repository tree. If you are uncertain about the coding style, 78 | create your patch and then run: 79 | 80 | ``` 81 | $ perltidy -b plugins/*.pl 82 | ``` 83 | 84 | This requires the `perltidy` module being installed. 85 | -------------------------------------------------------------------------------- /doc/03-Configuration.md: -------------------------------------------------------------------------------- 1 | # Manubulon SNMP Plugins Configuration 2 | 3 | Each plugin requires a command definition which defines the command line parameters 4 | and arguments passed from service checks. 5 | 6 | * [Icinga 2](03-Configuration.md#manubulon-snmp-plugins-configuration-icinga-2) integration 7 | * [Icinga 1.x/Naemon/Nagios](03-Configuration.md#manubulon-snmp-plugins-configuration-icinga-1) integration 8 | 9 | ## Icinga 2 10 | 11 | The Icinga 2 Template Library (ITL) already provides many [CheckCommand definitions](https://www.icinga.com/docs/icinga2/latest/doc/10-icinga-template-library/#plugin-check-commands-for-manubulon-snmp) 12 | out of the box. This enables you to just use the CheckCommand object and focus 13 | on your service apply rules. 14 | 15 | ### Icinga 2: Best Practices 16 | 17 | Best practice is to store the credentials in a separate constant: 18 | 19 | ``` 20 | vim /etc/icinga2/constants.conf 21 | 22 | const ManubulonSnmpCommunity = "icingasnmpro" 23 | ``` 24 | 25 | Define a generic SNMP service template and set common attributes. 26 | 27 | ``` 28 | template Service "snmp-template" { 29 | vars.snmp_community = ManubulonSnmpCommunity 30 | } 31 | ``` 32 | ### Icinga 2: Apply Rules 33 | 34 | 35 | Define service apply rules like this: 36 | 37 | ``` 38 | apply Service "snmp-memory" { 39 | import "snmp-template" 40 | check_command = "snmp-memory" 41 | 42 | vars.snmp_warn = "50,0" 43 | vars.snmp_crit = "80,0" 44 | 45 | assign where "snmp" in host.groups 46 | } 47 | 48 | apply Service "snmp-storage /var" { 49 | import "snmp-template" 50 | check_command = "snmp-storage" 51 | 52 | vars.snmp_warn = "50" 53 | vars.snmp_crit = "80" 54 | vars.snmp_storage_name = "/var" 55 | 56 | assign where "snmp" in host.groups 57 | } 58 | 59 | apply Service "snmp-storage" { 60 | import "snmp-template" 61 | check_command = "snmp-storage" 62 | 63 | vars.snmp_warn = "50" 64 | vars.snmp_crit = "80" 65 | 66 | assign where "snmp" in host.groups 67 | } 68 | ``` 69 | 70 | ### Icinga 2: Apply For Rules 71 | 72 | A more complex example using apply for rules is to store the 73 | monitored storage disks on the host. This allows to generate 74 | service objects in a more efficient way. 75 | 76 | ``` 77 | object Host "snmp-host" { 78 | check_command = "hostalive" 79 | 80 | vars.snmp_storage["/"] = { 81 | snmp_warn = "80" 82 | snmp_crit = "90" 83 | } 84 | vars.snmp_storage["/var"] = { 85 | snmp_warn = "60" 86 | snmp_crit = "90" 87 | } 88 | } 89 | 90 | apply Service "snmp-storage-" for (storage_name => config in host.vars.snmp_storage) { 91 | import "snmp-template" 92 | 93 | display_name = "Storage: " + storage_name 94 | 95 | vars += config 96 | vars.snmp_storage_name = storage_name 97 | } 98 | ``` 99 | 100 | 101 | ## Icinga 1.x/Naemon/Nagios 102 | 103 | You need to write a check command definition and use that in your service definitions. 104 | Please refer to [this documentation](http://nagios.manubulon.com/index_commands.html). 105 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Change Log 2 | 3 | ## [2.1.0](https://github.com/dnsmichi/manubulon-snmp/tree/2.1.0) (2017-10-12) 4 | [Full Changelog](https://github.com/dnsmichi/manubulon-snmp/compare/v2.0.0...2.1.0) 5 | 6 | **Implemented enhancements:** 7 | 8 | - Cisco SMB switch [\#30](https://github.com/dnsmichi/manubulon-snmp/issues/30) 9 | - Allow output for NagVis "weathermap" lines [\#22](https://github.com/dnsmichi/manubulon-snmp/issues/22) 10 | - Enhance and write better documentation [\#40](https://github.com/dnsmichi/manubulon-snmp/pull/40) ([dnsmichi](https://github.com/dnsmichi)) 11 | - Escape dot in perfdata labels [\#39](https://github.com/dnsmichi/manubulon-snmp/pull/39) ([mj84](https://github.com/mj84)) 12 | - \[\#30\] add support for cisco small business switches \(tested with SG500\) [\#31](https://github.com/dnsmichi/manubulon-snmp/pull/31) ([spali](https://github.com/spali)) 13 | - Allow output for NagVis "weathermap" lines [\#26](https://github.com/dnsmichi/manubulon-snmp/pull/26) ([miken32](https://github.com/miken32)) 14 | - Add SNMP v3 authentication dependencies and distro-specific Perl module packages [\#23](https://github.com/dnsmichi/manubulon-snmp/pull/23) ([virtualtam](https://github.com/virtualtam)) 15 | 16 | **Fixed bugs:** 17 | 18 | - check\_snmp\_load.pl =\> SNMPv3 do not use the -p \(port\) option [\#27](https://github.com/dnsmichi/manubulon-snmp/issues/27) 19 | - Fix typos in documentation [\#29](https://github.com/dnsmichi/manubulon-snmp/pull/29) ([moepot](https://github.com/moepot)) 20 | - The -p \(port\) option was forgotten in some cases [\#28](https://github.com/dnsmichi/manubulon-snmp/pull/28) ([Niflou](https://github.com/Niflou)) 21 | - Fix check\_snmp\_int.pl temp file name [\#25](https://github.com/dnsmichi/manubulon-snmp/pull/25) ([waja](https://github.com/waja)) 22 | 23 | **Closed issues:** 24 | 25 | - Have waiting info always [\#4](https://github.com/dnsmichi/manubulon-snmp/issues/4) 26 | 27 | ## [v2.0.0](https://github.com/dnsmichi/manubulon-snmp/tree/v2.0.0) (2016-11-25) 28 | **Implemented enhancements:** 29 | 30 | - check\_snmp\_load.pl - Linux load multiple CPUs [\#6](https://github.com/dnsmichi/manubulon-snmp/issues/6) 31 | - Ignore DOWN state and big snmp requests [\#19](https://github.com/dnsmichi/manubulon-snmp/pull/19) ([SteScho](https://github.com/SteScho)) 32 | 33 | **Fixed bugs:** 34 | 35 | - check\_snmp\_process.pl does not honour timeout \(-t\) [\#21](https://github.com/dnsmichi/manubulon-snmp/issues/21) 36 | 37 | **Closed issues:** 38 | 39 | - Apply a programming style to the plugins [\#20](https://github.com/dnsmichi/manubulon-snmp/issues/20) 40 | - Get rid of utils.pm [\#10](https://github.com/dnsmichi/manubulon-snmp/issues/10) 41 | - Net::SNMP version string no longer numeric in CentOS 7 [\#9](https://github.com/dnsmichi/manubulon-snmp/issues/9) 42 | - fortigate 4.3 support for check\_snmp\_load [\#7](https://github.com/dnsmichi/manubulon-snmp/issues/7) 43 | 44 | **Merged pull requests:** 45 | 46 | - Not all Systems have connections [\#18](https://github.com/dnsmichi/manubulon-snmp/pull/18) ([SteScho](https://github.com/SteScho)) 47 | - Add the -A/--use-ifalias option to do name lookup from ifAlias [\#17](https://github.com/dnsmichi/manubulon-snmp/pull/17) ([darksoul42](https://github.com/darksoul42)) 48 | - pnp need perf-data with always same order [\#16](https://github.com/dnsmichi/manubulon-snmp/pull/16) ([SteScho](https://github.com/SteScho)) 49 | - pnp need perf-data with always same order [\#15](https://github.com/dnsmichi/manubulon-snmp/pull/15) ([SteScho](https://github.com/SteScho)) 50 | - Add -N/--use-ifname option to switch name lookup from ifDescr to ifName [\#14](https://github.com/dnsmichi/manubulon-snmp/pull/14) ([darksoul42](https://github.com/darksoul42)) 51 | - Fix, check\_snmtp\_load output [\#12](https://github.com/dnsmichi/manubulon-snmp/pull/12) ([casvcasv](https://github.com/casvcasv)) 52 | - making checks executable [\#8](https://github.com/dnsmichi/manubulon-snmp/pull/8) ([morgajel](https://github.com/morgajel)) 53 | - Add Cisco Nexus Devices capability for load [\#3](https://github.com/dnsmichi/manubulon-snmp/pull/3) ([pasancario](https://github.com/pasancario)) 54 | - Fix typo protcol vs. protocol [\#2](https://github.com/dnsmichi/manubulon-snmp/pull/2) ([waja](https://github.com/waja)) 55 | - Fix error writing tmp file using plugin with remote unix system [\#1](https://github.com/dnsmichi/manubulon-snmp/pull/1) ([TheCry](https://github.com/TheCry)) 56 | 57 | 58 | 59 | \* *This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)* 60 | -------------------------------------------------------------------------------- /doc/html/nagios.manubulon.com/package_c.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 |
62 |
63 |
64 |
65 |
|
98 |
99 |
100 |
101 |
|
180 |
181 |
186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | -------------------------------------------------------------------------------- /plugins/install.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | ############################## install.sh ##################### 3 | # Version : 1.4 4 | # Date : Jan 13 2007 5 | # Author : Patrick Proy ( nagios at proy.org) 6 | # Help : http://www.manubulon.com/nagios/ 7 | # Licence : GPL - http://www.fsf.org/licenses/gpl.txt 8 | # TODO : 9 | # Contribs : 10 | ################################################################# 11 | # 12 | # USAGE : ./install [
62 |
63 |
64 |
65 |
|
98 |
99 |
100 |
101 |
|
475 |
476 |
62 |
63 |
64 |
65 |
|
98 |
99 |
100 |
101 |
|
360 |
361 |
62 |
63 |
64 |
65 |
|
98 |
99 |
100 |
101 |
|
371 |
372 |
64 |
65 |
66 |
67 |
|
100 |
101 |
102 |
103 |
|
457 |
458 |
60 |
61 |
62 |
63 |
|
96 |
97 |
98 |
99 |
|
397 |
398 |
403 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 2, June 1991 3 | 4 | Copyright (C) 1989, 1991 Free Software Foundation, Inc. 5 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA 6 | Everyone is permitted to copy and distribute verbatim copies 7 | of this license document, but changing it is not allowed. 8 | 9 | Preamble 10 | 11 | The licenses for most software are designed to take away your 12 | freedom to share and change it. By contrast, the GNU General Public 13 | License is intended to guarantee your freedom to share and change free 14 | software--to make sure the software is free for all its users. This 15 | General Public License applies to most of the Free Software 16 | Foundation's software and to any other program whose authors commit to 17 | using it. (Some other Free Software Foundation software is covered by 18 | the GNU Library General Public License instead.) You can apply it to 19 | your programs, too. 20 | 21 | When we speak of free software, we are referring to freedom, not 22 | price. Our General Public Licenses are designed to make sure that you 23 | have the freedom to distribute copies of free software (and charge for 24 | this service if you wish), that you receive source code or can get it 25 | if you want it, that you can change the software or use pieces of it 26 | in new free programs; and that you know you can do these things. 27 | 28 | To protect your rights, we need to make restrictions that forbid 29 | anyone to deny you these rights or to ask you to surrender the rights. 30 | These restrictions translate to certain responsibilities for you if you 31 | distribute copies of the software, or if you modify it. 32 | 33 | For example, if you distribute copies of such a program, whether 34 | gratis or for a fee, you must give the recipients all the rights that 35 | you have. You must make sure that they, too, receive or can get the 36 | source code. And you must show them these terms so they know their 37 | rights. 38 | 39 | We protect your rights with two steps: (1) copyright the software, and 40 | (2) offer you this license which gives you legal permission to copy, 41 | distribute and/or modify the software. 42 | 43 | Also, for each author's protection and ours, we want to make certain 44 | that everyone understands that there is no warranty for this free 45 | software. If the software is modified by someone else and passed on, we 46 | want its recipients to know that what they have is not the original, so 47 | that any problems introduced by others will not reflect on the original 48 | authors' reputations. 49 | 50 | Finally, any free program is threatened constantly by software 51 | patents. We wish to avoid the danger that redistributors of a free 52 | program will individually obtain patent licenses, in effect making the 53 | program proprietary. To prevent this, we have made it clear that any 54 | patent must be licensed for everyone's free use or not licensed at all. 55 | 56 | The precise terms and conditions for copying, distribution and 57 | modification follow. 58 | 59 | GNU GENERAL PUBLIC LICENSE 60 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 61 | 62 | 0. This License applies to any program or other work which contains 63 | a notice placed by the copyright holder saying it may be distributed 64 | under the terms of this General Public License. The "Program", below, 65 | refers to any such program or work, and a "work based on the Program" 66 | means either the Program or any derivative work under copyright law: 67 | that is to say, a work containing the Program or a portion of it, 68 | either verbatim or with modifications and/or translated into another 69 | language. (Hereinafter, translation is included without limitation in 70 | the term "modification".) Each licensee is addressed as "you". 71 | 72 | Activities other than copying, distribution and modification are not 73 | covered by this License; they are outside its scope. The act of 74 | running the Program is not restricted, and the output from the Program 75 | is covered only if its contents constitute a work based on the 76 | Program (independent of having been made by running the Program). 77 | Whether that is true depends on what the Program does. 78 | 79 | 1. You may copy and distribute verbatim copies of the Program's 80 | source code as you receive it, in any medium, provided that you 81 | conspicuously and appropriately publish on each copy an appropriate 82 | copyright notice and disclaimer of warranty; keep intact all the 83 | notices that refer to this License and to the absence of any warranty; 84 | and give any other recipients of the Program a copy of this License 85 | along with the Program. 86 | 87 | You may charge a fee for the physical act of transferring a copy, and 88 | you may at your option offer warranty protection in exchange for a fee. 89 | 90 | 2. You may modify your copy or copies of the Program or any portion 91 | of it, thus forming a work based on the Program, and copy and 92 | distribute such modifications or work under the terms of Section 1 93 | above, provided that you also meet all of these conditions: 94 | 95 | a) You must cause the modified files to carry prominent notices 96 | stating that you changed the files and the date of any change. 97 | 98 | b) You must cause any work that you distribute or publish, that in 99 | whole or in part contains or is derived from the Program or any 100 | part thereof, to be licensed as a whole at no charge to all third 101 | parties under the terms of this License. 102 | 103 | c) If the modified program normally reads commands interactively 104 | when run, you must cause it, when started running for such 105 | interactive use in the most ordinary way, to print or display an 106 | announcement including an appropriate copyright notice and a 107 | notice that there is no warranty (or else, saying that you provide 108 | a warranty) and that users may redistribute the program under 109 | these conditions, and telling the user how to view a copy of this 110 | License. (Exception: if the Program itself is interactive but 111 | does not normally print such an announcement, your work based on 112 | the Program is not required to print an announcement.) 113 | 114 | These requirements apply to the modified work as a whole. If 115 | identifiable sections of that work are not derived from the Program, 116 | and can be reasonably considered independent and separate works in 117 | themselves, then this License, and its terms, do not apply to those 118 | sections when you distribute them as separate works. But when you 119 | distribute the same sections as part of a whole which is a work based 120 | on the Program, the distribution of the whole must be on the terms of 121 | this License, whose permissions for other licensees extend to the 122 | entire whole, and thus to each and every part regardless of who wrote it. 123 | 124 | Thus, it is not the intent of this section to claim rights or contest 125 | your rights to work written entirely by you; rather, the intent is to 126 | exercise the right to control the distribution of derivative or 127 | collective works based on the Program. 128 | 129 | In addition, mere aggregation of another work not based on the Program 130 | with the Program (or with a work based on the Program) on a volume of 131 | a storage or distribution medium does not bring the other work under 132 | the scope of this License. 133 | 134 | 3. You may copy and distribute the Program (or a work based on it, 135 | under Section 2) in object code or executable form under the terms of 136 | Sections 1 and 2 above provided that you also do one of the following: 137 | 138 | a) Accompany it with the complete corresponding machine-readable 139 | source code, which must be distributed under the terms of Sections 140 | 1 and 2 above on a medium customarily used for software interchange; or, 141 | 142 | b) Accompany it with a written offer, valid for at least three 143 | years, to give any third party, for a charge no more than your 144 | cost of physically performing source distribution, a complete 145 | machine-readable copy of the corresponding source code, to be 146 | distributed under the terms of Sections 1 and 2 above on a medium 147 | customarily used for software interchange; or, 148 | 149 | c) Accompany it with the information you received as to the offer 150 | to distribute corresponding source code. (This alternative is 151 | allowed only for noncommercial distribution and only if you 152 | received the program in object code or executable form with such 153 | an offer, in accord with Subsection b above.) 154 | 155 | The source code for a work means the preferred form of the work for 156 | making modifications to it. For an executable work, complete source 157 | code means all the source code for all modules it contains, plus any 158 | associated interface definition files, plus the scripts used to 159 | control compilation and installation of the executable. However, as a 160 | special exception, the source code distributed need not include 161 | anything that is normally distributed (in either source or binary 162 | form) with the major components (compiler, kernel, and so on) of the 163 | operating system on which the executable runs, unless that component 164 | itself accompanies the executable. 165 | 166 | If distribution of executable or object code is made by offering 167 | access to copy from a designated place, then offering equivalent 168 | access to copy the source code from the same place counts as 169 | distribution of the source code, even though third parties are not 170 | compelled to copy the source along with the object code. 171 | 172 | 4. You may not copy, modify, sublicense, or distribute the Program 173 | except as expressly provided under this License. Any attempt 174 | otherwise to copy, modify, sublicense or distribute the Program is 175 | void, and will automatically terminate your rights under this License. 176 | However, parties who have received copies, or rights, from you under 177 | this License will not have their licenses terminated so long as such 178 | parties remain in full compliance. 179 | 180 | 5. You are not required to accept this License, since you have not 181 | signed it. However, nothing else grants you permission to modify or 182 | distribute the Program or its derivative works. These actions are 183 | prohibited by law if you do not accept this License. Therefore, by 184 | modifying or distributing the Program (or any work based on the 185 | Program), you indicate your acceptance of this License to do so, and 186 | all its terms and conditions for copying, distributing or modifying 187 | the Program or works based on it. 188 | 189 | 6. Each time you redistribute the Program (or any work based on the 190 | Program), the recipient automatically receives a license from the 191 | original licensor to copy, distribute or modify the Program subject to 192 | these terms and conditions. You may not impose any further 193 | restrictions on the recipients' exercise of the rights granted herein. 194 | You are not responsible for enforcing compliance by third parties to 195 | this License. 196 | 197 | 7. If, as a consequence of a court judgment or allegation of patent 198 | infringement or for any other reason (not limited to patent issues), 199 | conditions are imposed on you (whether by court order, agreement or 200 | otherwise) that contradict the conditions of this License, they do not 201 | excuse you from the conditions of this License. If you cannot 202 | distribute so as to satisfy simultaneously your obligations under this 203 | License and any other pertinent obligations, then as a consequence you 204 | may not distribute the Program at all. For example, if a patent 205 | license would not permit royalty-free redistribution of the Program by 206 | all those who receive copies directly or indirectly through you, then 207 | the only way you could satisfy both it and this License would be to 208 | refrain entirely from distribution of the Program. 209 | 210 | If any portion of this section is held invalid or unenforceable under 211 | any particular circumstance, the balance of the section is intended to 212 | apply and the section as a whole is intended to apply in other 213 | circumstances. 214 | 215 | It is not the purpose of this section to induce you to infringe any 216 | patents or other property right claims or to contest validity of any 217 | such claims; this section has the sole purpose of protecting the 218 | integrity of the free software distribution system, which is 219 | implemented by public license practices. Many people have made 220 | generous contributions to the wide range of software distributed 221 | through that system in reliance on consistent application of that 222 | system; it is up to the author/donor to decide if he or she is willing 223 | to distribute software through any other system and a licensee cannot 224 | impose that choice. 225 | 226 | This section is intended to make thoroughly clear what is believed to 227 | be a consequence of the rest of this License. 228 | 229 | 8. If the distribution and/or use of the Program is restricted in 230 | certain countries either by patents or by copyrighted interfaces, the 231 | original copyright holder who places the Program under this License 232 | may add an explicit geographical distribution limitation excluding 233 | those countries, so that distribution is permitted only in or among 234 | countries not thus excluded. In such case, this License incorporates 235 | the limitation as if written in the body of this License. 236 | 237 | 9. The Free Software Foundation may publish revised and/or new versions 238 | of the General Public License from time to time. Such new versions will 239 | be similar in spirit to the present version, but may differ in detail to 240 | address new problems or concerns. 241 | 242 | Each version is given a distinguishing version number. If the Program 243 | specifies a version number of this License which applies to it and "any 244 | later version", you have the option of following the terms and conditions 245 | either of that version or of any later version published by the Free 246 | Software Foundation. If the Program does not specify a version number of 247 | this License, you may choose any version ever published by the Free Software 248 | Foundation. 249 | 250 | 10. If you wish to incorporate parts of the Program into other free 251 | programs whose distribution conditions are different, write to the author 252 | to ask for permission. For software which is copyrighted by the Free 253 | Software Foundation, write to the Free Software Foundation; we sometimes 254 | make exceptions for this. Our decision will be guided by the two goals 255 | of preserving the free status of all derivatives of our free software and 256 | of promoting the sharing and reuse of software generally. 257 | 258 | NO WARRANTY 259 | 260 | 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY 261 | FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN 262 | OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES 263 | PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED 264 | OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 265 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS 266 | TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE 267 | PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, 268 | REPAIR OR CORRECTION. 269 | 270 | 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 271 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR 272 | REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, 273 | INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING 274 | OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED 275 | TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY 276 | YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER 277 | PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE 278 | POSSIBILITY OF SUCH DAMAGES. 279 | 280 | END OF TERMS AND CONDITIONS 281 | -------------------------------------------------------------------------------- /doc/html/nagios.manubulon.com/faq.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
37 |
|
106 |
107 |
108 |
109 |
110 |
|
294 |
295 |
300 | 301 | 302 | 303 | 304 | 305 | -------------------------------------------------------------------------------- /plugins/check_snmp_win.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl -w 2 | ############################## check_snmp_win ############## 3 | my $VERSION = "2.1.0"; 4 | 5 | # Date : Oct 12 2007 6 | # Author : Patrick Proy (patrick at proy.org) 7 | # Help : http://nagios.manubulon.com/ 8 | # License : GPL - http://www.fsf.org/licenses/gpl.txt 9 | # Contrib : Tenaku 10 | # TODO : 11 | ############################################################### 12 | # 13 | # help : ./check_snmp_win.pl -h 14 | 15 | use strict; 16 | use Net::SNMP; 17 | use Getopt::Long; 18 | 19 | # Icinga specific 20 | my %ERRORS = ('OK' => 0, 'WARNING' => 1, 'CRITICAL' => 2, 'UNKNOWN' => 3, 'DEPENDENT' => 4); 21 | 22 | # SNMP Datas for processes (MIB II) 23 | my $process_table = '1.3.6.1.2.1.25.4.2.1'; 24 | my $index_table = '1.3.6.1.2.1.25.4.2.1.1'; 25 | my $run_name_table = '1.3.6.1.2.1.25.4.2.1.2'; 26 | my $run_path_table = '1.3.6.1.2.1.25.4.2.1.4'; 27 | my $proc_mem_table = '1.3.6.1.2.1.25.5.1.1.2'; # Kbytes 28 | my $proc_cpu_table = '1.3.6.1.2.1.25.5.1.1.1'; # Centi sec of CPU 29 | my $proc_run_state = '1.3.6.1.2.1.25.4.2.1.7'; 30 | 31 | # Windows SNMP DATA 32 | 33 | my $win_serv_table = '1.3.6.1.4.1.77.1.2.3.1'; # Windows services table 34 | my $win_serv_name = '1.3.6.1.4.1.77.1.2.3.1.1'; # Name of the service 35 | 36 | # Install state : uninstalled(1), install-pending(2), uninstall-pending(3), installed(4) 37 | my $win_serv_inst = '1.3.6.1.4.1.77.1.2.3.1.2'; 38 | 39 | # Operating state : active(1), continue-pending(2), pause-pending(3), paused(4) 40 | my $win_serv_state = '1.3.6.1.4.1.77.1.2.3.1.3'; 41 | my %win_serv_state_label = (1 => 'active', 2 => 'continue-pending', 3 => 'pause-pending', 4 => 'paused'); 42 | 43 | # Can be uninstalled : cannot-be-uninstalled(1), can-be-uninstalled(2) 44 | my $win_serv_uninst = '1.3.6.1.4.1.77.1.2.3.1.4'; 45 | 46 | # Globals 47 | 48 | my $Name = 'check_snmp_win'; 49 | 50 | my $o_host = undef; # hostname 51 | my $o_community = undef; # community 52 | my $o_port = 161; # port 53 | my $o_domain = 'udp/ipv4'; # protocol 54 | my $o_version2 = undef; # use snmp v2c 55 | my $o_descr = undef; # description filter 56 | my @o_descrL = undef; # Service descriprion list. 57 | my $o_showall = undef; # Show all services even if OK 58 | my $o_type = "service"; # Check type (service, ...) 59 | my $o_number = undef; # Number of service for warn and crit levels 60 | my $o_help = undef; # wan't some help ? 61 | my $o_verb = undef; # verbose mode 62 | my $o_version = undef; # print version 63 | my $o_noreg = undef; # Do not use Regexp for name 64 | my $o_timeout = 5; # Default 5s Timeout 65 | my $o_octetlength = undef; # SNMP max message size 66 | 67 | # SNMP V3 specific 68 | my $o_login = undef; # snmp v3 login 69 | my $o_passwd = undef; # snmp v3 passwd 70 | 71 | # functions 72 | 73 | sub p_version { print "$Name version : $VERSION\n"; } 74 | 75 | sub print_usage { 76 | print 77 | "Usage: $Name [-v] -H