From 47a0418371982d3351711ab2cee8feb251d6fc8b Mon Sep 17 00:00:00 2001 From: Michael Friedrich Date: Thu, 12 Oct 2017 15:27:00 +0200 Subject: [PATCH 1/2] Purge unneeded files in plugins/ directory --- plugins/Changelog | 109 -- plugins/INSTALL | 15 - plugins/LICENSE | 280 ----- plugins/README | 50 - plugins/doc/faq.html | 256 ---- plugins/doc/index.html | 431 ------- plugins/doc/index_commands.html | 2038 ------------------------------- plugins/doc/snmp_cpfw.html | 471 ------- plugins/doc/snmp_css.html | 381 ------ plugins/doc/snmp_env.html | 370 ------ plugins/doc/snmp_int.html | 673 ---------- plugins/doc/snmp_load.html | 409 ------- plugins/doc/snmp_mem.html | 485 -------- plugins/doc/snmp_process.html | 377 ------ plugins/doc/snmp_storage.html | 1330 -------------------- plugins/doc/snmp_vrrp.html | 358 ------ plugins/doc/snmp_windows.html | 261 ---- 17 files changed, 8294 deletions(-) delete mode 100644 plugins/Changelog delete mode 100644 plugins/INSTALL delete mode 100644 plugins/LICENSE delete mode 100644 plugins/README delete mode 100755 plugins/doc/faq.html delete mode 100755 plugins/doc/index.html delete mode 100755 plugins/doc/index_commands.html delete mode 100755 plugins/doc/snmp_cpfw.html delete mode 100755 plugins/doc/snmp_css.html delete mode 100755 plugins/doc/snmp_env.html delete mode 100755 plugins/doc/snmp_int.html delete mode 100755 plugins/doc/snmp_load.html delete mode 100755 plugins/doc/snmp_mem.html delete mode 100755 plugins/doc/snmp_process.html delete mode 100755 plugins/doc/snmp_storage.html delete mode 100755 plugins/doc/snmp_vrrp.html delete mode 100755 plugins/doc/snmp_windows.html diff --git a/plugins/Changelog b/plugins/Changelog deleted file mode 100644 index 1dfeb15..0000000 --- a/plugins/Changelog +++ /dev/null @@ -1,109 +0,0 @@ -################################ -Release 1.1.2 / Jun 2007 : - -Scripts, actual CVS version and changelog : -check_snmp_mem.pl : 1.3 -check_snmp_vrrp.pl : 1.3 -check_snmp_linkproof_nhr.pl : 1.1 -check_snmp_process.pl : 1.7 - - Added option to select process with his parameter - - Added option for performance output - - Corrected negative CPU when process restarts - - Added delta option for cpu average (-d option) -check_snmp_boostedge.pl : 1.2 -check_snmp_nsbox.pl : 1.2 -check_snmp_css_main.pl : 1.1 -check_snmp_cpfw.pl : 1.7 -check_snmp_int.pl : 1.22 - - Correct speed query for interface > 4 Gbps - - Reduced snmp queries to 2 instead of 3 when perf data is on - - Bad maximum in perfdata when in Bps - - Added option to make dormant state OK -check_snmp_storage.pl : 1.10 - - Return an UNKNOWN status when size/used/alloc is not defined in snmp - - Patch from Alexander Greiner-B?r to remove the reserved disk space for superuser on ext2/3 FS. - New -R option for this - - Added -G (giga) option for output & levels in Gigabytes -check_snmp_win.pl : 0.6 -check_snmp_css.pl : 1.3 -check_snmp_env.pl : 1.8 - - Added test to check existence of some OIDs -check_snmp_load.pl : 1.11 - - Corrected bug in performance output - - Added SIG{ALRM} sub and % sign in output - -################################ -Release 1.1.1 / April 2007 : - -Added documentation in doc/ directory : (html format). - -Scripts, actual CVS version and changelog : -check_snmp_mem.pl : 1.3 -check_snmp_vrrp.pl : 1.3 -check_snmp_linkproof_nhr.pl : 1.1 -check_snmp_process.pl : 1.5 - Makina Corpus contribs : snmpv3 enhancements, msg size parameter (-o) -check_snmp_boostedge.pl : 1.2 (No major changes) -check_snmp_nsbox.pl : 1.2 (No major changes) -check_snmp_css_main.pl : 1.1 -check_snmp_cpfw.pl : 1.7 - Added active/backup detection with SecureXL - Added SIG{ALRM} sub and small bug -check_snmp_int.pl : 1.18 - Added bigint module to take care of 64 bits counters - check usage of snmp v2c or v3 when you use 64 bit counters (-g) - Added SIG{ALRM} sub - Added warning and critical levels in performance output - Added labels before in, out speed and errors (M. Berger contrib) - Added highperf counters option (-g) - Added SNMP packet length option (-o) - Added warning/critical levels in Mbps, MBps, Gbps, GBps options (-M, -G) - Added warning/critical levels in % of interface speed (-u) - Added performance output interface speed option (-S) - Added performance output in Bps or bps (-Y) - Added performance output in % of interface speed (-y) - Added port for snmpv3 (R. Leroy contrib) -check_snmp_storage.pl : 1.6 - Makina Corpus contribs : snmpv3 port parameter, msg size parameter (-o) -check_snmp_win.pl : 0.6 -check_snmp_css.pl : 1.3 -check_snmp_env.pl : 1.7 - Added SIG{ALRM} sub - Added voltage & temp checks on Cisco - Added Foundry checks -check_snmp_load.pl : 1.9 - Added SIG{ALRM} sub and % sign in output - Bug in performance output - -################################ -Release 1.1 : - -Added scripts : -- check_snmp_css_main : to get all services name and OID one time, then check only one OID with check_snmp_css. Reduces css cpu. - -Corrected bugs : -- install.sh (Net::snmp detection) -- corrected bugs in check_snmp_css -- Added ironport checks in check_snmp_env -- Added hpux in check_snmp_load -- Bugs in check_snmp_int (specially for Windows). - -Scripts and versions : -check_snmp_mem.pl : 1.3 -check_snmp_vrrp.pl : 1.3 -check_snmp_linkproof_nhr.pl : 1.1 -check_snmp_process.pl : 1.4 -check_snmp_boostedge.pl : 1.1 -check_snmp_nsbox.pl : 1.1 -check_snmp_css_main.pl : 1.1 -check_snmp_cpfw.pl : 1.4 -check_snmp_int.pl : 1.10 -check_snmp_storage.pl : 1.5 -check_snmp_win.pl : 0.6 -check_snmp_css.pl : 1.3 -check_snmp_env.pl : 1.4 -check_snmp_load.pl : 1.9 - -################################ -Release 1.0 : -Initial file release. diff --git a/plugins/INSTALL b/plugins/INSTALL deleted file mode 100644 index 48e220a..0000000 --- a/plugins/INSTALL +++ /dev/null @@ -1,15 +0,0 @@ -Installation: -------------- - -You can simply copy the .pl files to the Nagios Plugin directory if -- Nagios plugins and utils.pm file are in /usr/local/nagios/libexec. -- You are sure Net::SNMP is installed. (Getopt::Long is standard). -- perl is in /usr/bin/perl -- Temp files can be written by Nagios in /tmp - -You can also use the "install.sh" script provided in this directory to install the plugins. -Type : "./install.sh" to install all the plugins or "./install.sh " for a specific one. - -The script will check for dependencies and ask for Nagios and temp directories. -It will modify the scripts depending on these answers and install the scripts. - diff --git a/plugins/LICENSE b/plugins/LICENSE deleted file mode 100644 index 8420802..0000000 --- a/plugins/LICENSE +++ /dev/null @@ -1,280 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Library General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS diff --git a/plugins/README b/plugins/README deleted file mode 100644 index 7fe6df2..0000000 --- a/plugins/README +++ /dev/null @@ -1,50 +0,0 @@ -Nagios SNMP plugins 1.1.2 README ------------------------------- - - -Nagios SNMP plugins is a set of Nagios plugins to check hosts/devices using snmp protocol. -http://nagios.manubulon.com for more details. - - -Requirements: -------------- -- perl in /usr/bin/perl -- Net::SNMP and Getopt::Long -- File utils.pm in Nagios plugin directory (default /usr/local/nagios/libexec) -- Nagios user can write files in /tmp/ directory - -Perl, default directory and temp files location can be changed using the install.sh script. - -Installation: -------------- - -Read INSTALL file - -Help and support: ------------------ - -Help files, config examples and FAQ in the doc/ directory -http://nagios.manubulon.com/ -FAQ : http://nagios.manubulon.com/faq.html -Mailling list, forum : http://sourceforge.net/projects/nagios-snmp/ - - -Legal stuff: ------------- - - Nagios SNMP plugins version 1.1.2, Copyright (C) 2004-2007 Patrick Proy (nagios at proy.org) - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License version 2 as - published by the Free Software Foundation. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - - Nagios and the Nagios logo are registered trademarks of Ethan Galstad. diff --git a/plugins/doc/faq.html b/plugins/doc/faq.html deleted file mode 100755 index fc8535e..0000000 --- a/plugins/doc/faq.html +++ /dev/null @@ -1,256 +0,0 @@ - - -Nagios plugins - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - -
Home

-
- - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
FAQ
- -

 

- -

Last update : May 25 2007

- -
- -

 

-

FIRST, look at the web page associated - with every script.

-

Running the scripts :

-

- The scripts outputs "Can't - locate Net/SNMP.pm in @INC....."

-

- How do I install Net::SNMP - perl module

-

- What are the supported platforms - to run the scripts on ?

-

- How do I get help on the - options ?

-

- Return code of X is out of - bounds

-

- Are these plugins compatible - with Nagios 2.0 ?

-

- ERROR: XXXXXX : Expected - OBJECT IDENTIFIER in dotted notation.

-

- "No Output" using - Nagios 2

-

- Getting : "ERROR: Size - table :Message size exceeded buffer maxMsgSize"

-

- No usable data on file (X rows)

-

Misc
-

-

- Are these scripts secure - ?

-

- How can I get help ? Is - there a mailling list ? a forum ?

-

- Can I donate to help this - project ?

-
-

The scripts outputs "Can't - locate Net/SNMP.pm in @INC....."

-

You don't have Net::SNMP installed, see below

-

How do I install Net::SNMP - perl module ?

-

There are 2 ways of doing this

-

1) By CPAN (best)

-

on command line, as root :
-
- [your_host]# perl -MCPAN -e shell
- cpan shell -- CPAN exploration and modules installation (v1.76)
- ReadLine support enabled
- cpan> install Net::SNMP
-

-

If it's the first time you run CPAN, it will - probably ask you some (simple) questions.

-

CPAN will also ask you to satisfy some dependencies - (Crypt::DES, Digest::MD5, etc..).

-

2) "By hand"
-

-

Get the folowings modules (tar.gz format) on - www.cpan.org

-

- Crypt::DES
- - Digest::MD5
- - Digest::SHA1
- - Digest::HMAC
- - Net::SNMP
-
- for each one (you must install Net::SNMP at the end) :
- tar zxf <module>.tar.gz
- cd <module>
- perl Makefile.pl
- make test
- make install

-

What are the supported - platforms to run the scripts on ?

-

Most Linux, maybe some unixes and maybe Cygwin.
- Actually anything you can run perl on.
- If you can install the latest Net::SNMP module, then the perl version - should be OK.

-

How do I get help on the - options ?

-

Just run <script> -h on the command - line.
-
-

-

Return code of X is out - of bounds

-

Have a look at : http://www.nagios.org/faqs/viewfaq.php?faq_id=17

-

In case of return code 127, try putting perl - in the command line definition :

-

define command{
- command_name check_disk
- command_line /usr/bin/perl $USER1$/check_snmp_storage.pl - -C $ARG1$ [........]
- }
-

-

Are these plugins compatible - with Nagios 2.0 ?

-

Yes.

-

ERROR: XXXXXX : Expected OBJECT IDENTIFIER in dotted notation. -

-

Upgrade your Net::SNMP module version (5 is good, 4 maybe OK, 3 gives this error)
- This happens with Debian Woody (Net::SNMP version 3.6).
- I have special patches if you can't upgrade : contact me.

-

"No Output" using - Nagios 2

-

It's a "bug" of embeded perl. It - has been corrected in latest Nagios releases.

-

You can :
-

-

- Add a patch if your nagios release is old. - Here is a patch made by Gavin Carr for the p1.pl file to correct - this (it should be in nagios CVS shortly). http://nagios.manubulon.com/p1-print.pl.patch -

-

- Upgrade Nagios.
-
- - add "/usr/bin/perl" before the script command so Nagios - won't use embeded perl.

-

Getting : "ERROR: - Size table :Message size exceeded buffer maxMsgSize"

-

Your snmp table is too big.

-

Some of my scripts (check_snmp_storage and - check_snmp_process) now have an option (-o) to set this directly - on command line (thx to Makina Corpus for the patch).

-

In other scripts, try adding :

-

$session->max_msg_size(5000);
-

-

After the session has been initialized.

-

No usable data on file (X rows)

-

Scripts like check_snmp_int need to store data when they get a SNMP counter so they can outpout readable data like bandwidth, cpu, etc....

-

For example, to output a bandwidth with an octet counter, check_snmp_int will store data every time it is run. It will also read the previous data, and try to get data old enough to make a correct average. By default, it needs data which was produced 5 minutes ago.

-

So, when you first run the script - or if you run it a long time ago -, it won't be able to get data old enough and will report an error (UNKNOWN status) saying the is "no usable data on file (X rows)".
- If you leave the 5 minutes default delta value, the script will need data wich is :
- - At least 4 minutes and 30 seconds old (5 min - 10%)
- - At most 15 minutes old (3 * 5 min)

-

You can change this 5 minutes value using the '-d <sec>' option. The script will then look for data which is at least <sec>-10% old and at most 3*<sec>.

-

This option will only tell to make an average on <sec> seconds, you can run the service every minute with Nagios, it will always get the newest value which is at least <sec>-10% old.
- The only thing you must check is that your service will at least run every 15 minutes, or the script will always output "unknown" as the value will be too old for him.

-


- Are these scripts secure ?

-

Not at all ! You must secure the Nagios server.
- Nobody else than the nagios user should be allowed to even think - about running these scripts.
-

-

How can I get help ? Is - there a mailling list ? a forum ?

-

Go to the sourceforge project page for all this : Nagios-snmp -

Can - I donate to help this project ?

-

Of course you can, I just haven't got any idea - of how, so just send a postcard to my son (Jolan) with a nice drawing (or buy a cookie to your son/daughter/nephew/grand-ma...).
- You can get my postal address on my resume (www.manubulon.com/cvpproy.htm).
- He will answer you when he knows how to write (in several years).

-
-

This project is also hosted by :
- - SourceForge.net Logo -

- -
- -

 

- - - - - diff --git a/plugins/doc/index.html b/plugins/doc/index.html deleted file mode 100755 index c0717e8..0000000 --- a/plugins/doc/index.html +++ /dev/null @@ -1,431 +0,0 @@ - - -Nagios plugins - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
This site :
Home
Nagios plugins
Info on snmp
Nagios config
FAQ
- Project page on SourceForge
-----------
Links :
Nagios - Home
Nagios - Plugins
Oreon project
NagiosExchange
Opsyx - forum
Forum 2037
-----------
SourceForge.net Logo -
- -
- - - - - - - - - - - - - - - - -
My plugins for Nagios -
-

Last update : Jun 9 2007

-

About

-

The general idea of these scripts is to check - as many things as possible with snmp (how do you install NRPE on - Cisco or AS/400 ?) : disks, memory, load, interface, running procsses, - etc...
-

-

The other idea is to select disks, interfaces, - process using regular expressions
-
- - it is possible to test more than one disk/int/process in one Nagios - check (ex : eth* instead of eth0,eth1,eth2,...)
-
- - you only have to provide a unique part of the name to select a - disk/int/process (ex : "C:" instead of "C:\ Label: - Serial Number xxxxxxx" makes it easy to use on multiple Windows - hosts).

-

Most of these scripts can make performance - outputs.

-

Enjoy and give me feedback !
-
- All code here is under GPL licence.
-

-

If you want to be informed when I release - new versions,
- or if you have some advices, feedback, questions, go to the project's - sourceforge page : nagios-snmp

-

Please send me your feedback :
- - Test with embeded Perl
- - Test on various systems
- - Bugs, advices, comments, RFE, etc...
- Thank you !

-

Run the scripts with '-h' to get help.

-
-

 

-

Requirements

-

- Perl in /usr/bin/perl - if not run 'perl - script' or change the path in the scripts first line
- - Net::SNMP
- - file 'utils.pm' in diretory /usr/local/icinga/libexec or change - the line "use libs /usr/local/icinga/libexec/" in the scripts
-

-

Configurations - examples

-

Plugins
-

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Bundle of all plugins -

Version 1.1.1 : nagios-snmp-plugins.1.1.1.tgz

-

This bundle contains all the plugins, including an install - script useful if you have special Nagios or perl paths.

-
-

check_snmp_storage
-
-

Download version 1.3.3

-

 

-
-

This scripts checks by snmp (1,2c,3) disks, memory, swap, - everthing in hrStorage table.
- Disk selection can be done by perl regexp on description, - index or type to select one or multiple storages.
-
- Vérifie par snmp v1 ou v3 (merci à V. Carpentier) - l'occupation des disques, mais aussi de la swap, de la mémoire, - etc.. tout ce qui est disponible en snmp par la table hrStorage.
- Les disques sont sélectionnables par expression régulière - compatible Perl

-

Details

-
-

check_snmp_int
-
- Download version 1.4.8

-
-

Checks by snmp (1,2c,3) interface state and usage. Interfaces - can be selected by regexp.
- It is possible to check the input/output bandwidth and error - rate of the interface.
-
- Vérifie par snmp v1 ou v3 l'état des interfaces - d'un hôte.
- Ce script permet d'utiliser des expressions régulières - pour sélectionner les interfaces : ex 'eth' va vérifier - eth0, eth1, ...
- Il permet également de lister toutes les interfaces - disponibles sur la machine cible (option -v).

-

Details

-
-

check_snmp_process

-

Download version 1.5
-

-

 

-
-

Checks by snmp (1,2c,3) the number (can be 1) of processes - matching a perl regexp.
- The script can also check memory and cpu usage of processes.

-

Vérifie par snmp v1 ou v3 (idem) le nombre de process - sur un hôte.
- Ce script permet d'utiliser des expressions régulières - pour sélectionner les process.
- Il est également possible de vérifier l'utilisation - mémoire et CPU de la machine.
- Il permet également de lister touts les process disponibles - sur la machine cible (option -v).

-

Details

-
-

check_snmp_load

-

Download version 1.3.2

-
-

Checks by snmp (1,2c,3) cpu or average load.
- Works on Linux, Windows, Cisco, AS400, HP Procurve, LinkProof, - Blucoat, Nokia, Fortinet, Netscreen,HP-UX.

-

Vérifie par snmp (1,2c,3) la charge ou l'ocupation - CPU.
-

-

Details.

-
-

check_snmp_mem

-

Download version 1.1

-
-

Checks by snmp (1,2c,3) :
- - Memory and swap usage on Linux/Net-snmp
- - Memory usage on cisco routers or Pix
- - Memory usage on HP Procurve switchs
- For memory check on other OS (Windows, AS400) see the description - page

-

Vérifcation de
- - l'utilisation mémoire et swap sur Linux/Net-snmp
- - l'utilisation mémoire sur Cisco (routeurs et Pix).
- - l'utilisation mémoire sur Switch Hp Procurve.
- Pour d'autres SE (Windows, AS400), aller à la page - de description.

-

Détail

-
-

check_snmp_vrrp

-

Download version : 1.3

-
-

Checks the vrrp state of all the interface of a host. You - can specify if they must be master or backup.
- Supported platforms : Nokia IP (vrrp & clustering), Linkproof, - Alteon.

-

Verifie l'état vrrp des interfaces d'un host.

-
-

check_snmp_cpfw

-

Download version : 1.2.1

-
-

Checks the state of Checkpoint Firewall-1 modules (SVN, HA, - FW, MGMT) and active connexions (tested on NG).
- Snmp extensions must be activated

-

Vérifie l'état des modules Checkpoint Fw-1 - (HA, SVN, MGMT, FW) et les connexions actives. Testé - sur NG-AI R55.
- L'extension SNMP doit être activée sur les modules.

-

Détail

-
-

check_snmp_win

-

Download version : 0.6

-
-

Checks windows services state with snmp.

-

Véifie l'état de services Windows par snmp.

-

Détail

-
-

check_snmp_css

-

Download version : 1.0

-
Checks css services state
-

check_snmp_env

-

Download version : 1.2

-
Checks environemental status (fan, temp, - power supply) on Cisco, Nokia, Bluecoat, IronPort.
-

check_snmp_nsbox

-

Download version : 1.0

-
Checks nsbox vhost & diode status.
-

check_snmp_boostedge

-

Download version : 1.0

-
Checks Boostedge services
-

check_snmp_linkproof_nhr

-

Download version : 1.0

-
Checks linkproof NHR
-
-

Compatibility matrix :

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Systemcheck_snmp_storagecheck_snmp_intcheck_snmp_processcheck_snmp_memcheck_snmp_load
Linux -

OK :
- - '/home', '/var'
- - 'Swap', 'Real Memory'
-

-
OK :
- - 'eth'
- - 'ppp'
OKOK (mem & swap) -

OK

-
Windows -

OK :
- - '^[CDE]:'

-
OKOK -

NO
- See check_snmp_storage for virtual mem

-
OK
Cisco/HP switchN/AOK :
- - 'Giga' : all gigabits
- - 'Fast.*0.1[1234]' : checks FastEternet0/11 to 0/14.
N/AOKOK
AS400OK :
- - '-m RAM -s' to get all RAM
- - 'System ASP' : Disk
-
OK OK -

NO
- See check_snmp_storage

-
OK
LinkProofN/AOKN/AN/AOK
-
-
-

This project is hosted on :
- SourceForge.net Logo -

-

Nagios and the Nagios logo are registered - trademarks of Ethan Galstad.

-
-
- - diff --git a/plugins/doc/index_commands.html b/plugins/doc/index_commands.html deleted file mode 100755 index 66bac6c..0000000 --- a/plugins/doc/index_commands.html +++ /dev/null @@ -1,2038 +0,0 @@ - - -Nagios plugins - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
This site :
Home
Nagios plugins
Info on snmp
Nagios config
FAQ
- Project page on SourceForge
-----------
Links :
Nagios - - Home
Nagios - - Plugins
Oreon project
NagiosExchange
Opsyx - - forum
Forum 2037
-----------
SourceForge.net Logo - -
- - - -
- - - - - - - - - - - - - - - - - -
My plugins for Nagios - -
- -

Last update : Jan 15 2006

- -

Commands

- -

Here are commands example to use my scripts - - with nagios.
- - It's only the basic things you can do, check the help of every - - script if you need more advanced features especially if you need - - performance outputs.
- - The command definitions are complete, but not the service definitions - - : you must add host name, contact groups, etc....

- -

All these commands use $USER<n>$ macros - - to put snmp login. The reason for this is that the ressources.cfg - - file cannot be read by the CGI, preventing your "passwords" - - to be seen with the config.
- - You must set the $USER7$ or $USER8$ to make these examples work. - -
- - The $USER<n>$ macro are defined in the resources.cfg file

- -

SNMP login with $USER<n>$
- - About regular expressions

- -

Configuration examples - - of
- -
- - check_snmp_boostedge.pl
- -
check_snmp_cpfw.pl
- -
check_snmp_css.pl - - & check_snmp_css_main.pl
- -
check_snmp_env.pl
- -
check_snmp_linkproof_nhr.pl
- - check_snmp_load.pl
- - check_snmp_interface.pl
- - check_snmp_mem.pl
- -
check_snmp_nsbox.pl - -
- - check_snmp_process.pl
- - check_snmp_storage.pl
- - check_snmp_vrrp.pl
- -
check_snmp_win.pl

- -

Checks you can make by - host type

- -

SNMP - - login
- -

- -
For more information, you can have a look at information - - on snmp login

- -

If you are using snmp v1 :
- - $USER7$=-C <community>

- -

If you are using snmp v2c :
- - $USER7$=-C <community> -2

- -

or you can use $USER9$ if you need both v1 and v2c.

- -

Examples of snmp v3 login :
- - AuthNoPriv (md5) :
- - $USER8$=-l <login> -x <pass>

- -

AuthPriv (md5,aes) :
- -
$USER8$=-l <login> -x <pass> -X <pass> - - -L md5,aes
- -

- -

- -

About - - regular expressions

- -

With all these scripts, when you select an - - interface, a service or process name etc... you use by default regular - - expresions :
- - Note : you can disable this by using "-r"

- -

Examples : Don't forget it is perl regular - - expressions.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
RegexpWill match
etheth0, eth1, eth2 but also Fastethernet0/0 - - ....
eth[1-9]eth1, eth2, ... eth9 but also eth10, eth11
eth[1-2]$eth1, eth2 only (not eth11 for ex).
dhcpdhcpc, dhpcd
- -

 

- -

check_snmp_boostedge.pl - -

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Commandcheck_snmp_boostedge
Nagios cmddefine command{
- - command_name check_snmp_boostedge_v1
- - command_line $USER1$/check_snmp_boostedge.pl -H $HOSTADDRESS$ - - $USER7$ -s $ARG1$ -n $ARG2$ $ARG3$
- - }
ArgumentsARG1 : Service name (regexp)
- - ARG2 : Number of services selected by regexp which must be in - - running & enabled state
- - ARG3 : additional arguments if needed.
Service - -

boostedge_services : checks is there is 3 active - - & enabled service matching "test" with - - snmp v2c

- -
Nagios servicedefine service {
- -    name boostedge_services
- -    check_command check_snmp_boostedge_v1!test!3!-2
- - }
- -

check_snmp_cpfw.pl

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Commandcheck_cpfw1_v3
Nagios cmddefine command{
- -   command_name check_cpfw1_v3
- -   command_line $USER1$/check_snmp_cpfw.pl -H $HOSTADDRESS$ - - $USER8$ $ARG1$
- - }
ArgumentsARG1 : all arguments.
Service - -

checkpoint_verification : checks high availability - - cluster, with policy "CP_Policy" installed, and - - warning at 100000 connexions, critical at 200000
- - CP_Management : checks management station

- -
Nagios servicedefine service {
- -    name checkpoint_verification
- -    check_command check_cpfw1_v3!-swa -p CP_Policy - - -c 100000,200000 -f
- - }
Nagios service - -

define service {
- -    name CP_Management
- -    service_description CPFW1 management
- -    check_command check_cpfw1_v3!-sm
- - }

- -
- -

check_snmp_css.pl - - & check_snmp_css_main.pl

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Command - -

check_snmp_css_main : get index from the host, services - - are then checked using check_snmp_css_indexed (snmpv2)
- - check_snmp_css_indexed : check services indexed by - - check_snmp_css_main (snmpv2)
- - check_snmp_css : directly read index & data from - - the host (snmpv2)

- -
Nagios cmddefine command{
- -   command_name check_snmp_css_main
- -   command_line $USER1$/check_snmp_css_main.pl -H $HOSTADDRESS$ - - $USER7$ -2
- - }
Nagios cmddefine command{
- -   command_name check_snmp_css_indexed
- -   command_line $USER1$/check_snmp_css.pl -H $HOSTADDRESS$ - - $USER7$ -2 -d -n $ARG1$ -w $ARG2$ -c $ARG3$ $ARG4$
- - }
Nagios cmddefine command{
- -   command_name check_snmp_css
- -   command_line $USER1$/check_snmp_css.pl -H $HOSTADDRESS$ - - $USER7$ -2 -n $ARG1$ -w $ARG2$ -c $ARG3$ $ARG4$
- - }
Arguments - -

ARG1 : regexp of service(s) to check
- - ARG2 : warning level for : minimum number of active & - - alive service , average response time, number of connexions
- - ARG3 : critical level for : minimum number of active & - - alive service , average response time, number of connexions - -
- - ARG4 : additional arguments if needed.

- -
Service - -

css_index_file_create : This is a "fake" - - service, which only creates index file in /tmp. It normally - - returns the number of services it indexes, or an error if - - he can't.
- - css_verif_TEST : checks at least 2 services - - mathnig TEST are up. Warning if 1, critical if 0. This service - - uses the index file created by css_index_file_create, and - - returns UNKNOWN if it can't find it.
- - css_verif_TEST2 : checks at least 2 services - - mathnig TEST2 are up. Warning if 1, critical if 0. This service - - doesn't use an index file.

- -
Nagios servicedefine service {
- -    name css_index_file_create
- -    check_command check_snmp_css_main
- - }
Nagios service - -

define service {
- -    name css_verif_TEST
- -    check_command check_snmp_css_indexed!"TEST"!1!0 - -
- - }

- -
Nagios service - -

define service {
- -    name css_verif_TEST2
- -    check_command check_snmp_css!"TEST2"!1!0 - -
- - }

- -
- -

 

- -

check_snmp_env.pl

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Commandcheck_snmp_env (snmpv1)
- - check_snmp_env_v3 (snmpv3)
Nagios cmddefine command{
- -   command_name check_snmp_env
- -   command_line $USER1$/check_snmp_env.pl -H $HOSTADDRESS$ - - $USER7$ -T $ARG1$ $ARG2$
- - }
Nagios cmddefine command{
- -   command_name check_snmp_env_v3
- -   command_line $USER1$/check_snmp_env.pl -H $HOSTADDRESS$ - - $USER8$ -T $ARG1$ $ARG2$
- - }
ArgumentsARG1 : type (cisco|nokia|bc|iron)
- - ARG2 : additional arguments if needed.
Service - -

ironport_env : checks ironport fans RPM > 1500 - - and temp < 70 deg celcius
- - nokia_env : checks nokia IP fans and power supply status
- - cisco_env : checks cisco fans and power supply status - -

- -
Nagios servicedefine service {
- -    name ironport_env
- -    check_command check_snmp_env!iron!-F - - 1500 -c 70
- - }
Nagios service - -

define service {
- -   name nokia_env
- -   check_command check_snmp_env_v3!nokia
- - }

- -
Nagios service - -

define service {
- -   name cisco_env
- -   check_command check_snmp_env_v3!cisco
- - }

- -
- -

check_snmp_linkproof_nhr.pl

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Commandcheck_snmp_lp_nhr_v3 (snmpv3 and performance output)
Nagios cmddefine command{
- -   command_name check_snmp_lp_nhr_v3
- -   command_line $USER1$/check_snmp_linkproof_nhr.pl - - -H $HOSTADDRESS$ $USER8$ -f
- - }
ArgumentsNone
Service - -

linkproof_nhr : returns
- - WARNING if one nhr at least is in "no new session" - - or "inactive" mode.
- - CRITICAL if all nhr are inactive.

- -
Nagios servicedefine service {
- -    name linkproof_nhr
- -    check_command check_snmp_lp_nhr_v3
- - }
- -

check_snmp_load.pl

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Commandcheck_snmp_load_v1 : using snmpv1 (or v2 depending - - on $USER7$ value)
- - check_snmp_load_v3 : using snmpv3
Commanddefine command{
- -    command_name check_snmp_load_v1
- -    command_line $USER1$/check_snmp_load.pl -H $HOSTADDRESS$ - - $USER7$ -T $ARG1$ -w $ARG2$ -c $ARG3$ $ARG4$
- - }
Commanddefine command{
- -    command_name check_snmp_load_v3
- -    command_line $USER1$/check_snmp_load.pl -H $HOSTADDRESS$ - - $USER8$ -T $ARG1$ -w $ARG2$ -c $ARG3$ $ARG4$
- - }
Arguments - -

ARG1 : host type (stand,netsc,netsl,as400,cisco,cata,nsc,fg,bc,nokia,hp,lp,hpux)
- - ARG2 : warning level
- - ARG3 : critical level
- - ARG4 : additional arguments if needed.

- -
Servicebluecoat_load : Bluecoat cpu usage
- - Linux_load : Linux load (1min, 5 min, 15 min)
- - Cisco_load : Cisco cpu usage
- - lp_load : Radware Linkproff cpu usage
Servicedefine service {
- -    name bluecoat_load
- -    check_command check_snmp_load_v1!bc!95!99
- - }
Service - -

define service {
- -    name Linux_load
- -    check_command check_snmp_load_v1!netsl!4,3,3!8,5,5
- - }

- -
Service - -

define service {
- -    name Cisco_load
- -    check_command check_snmp_load_v1!cisco!90,80,60!100,100,100
- - }

- -
Servicedefine service {
- -    name lp_load
- -    check_command check_snmp_load_v1!lp!90!99
- - }
- -

check_snmp_interface.pl

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Command -

check_snmp_int_v1 : using snmpv1
- check_snmp_int_v3 : using snmpv3

-
Commanddefine command{
- -   command_name check_snmp_int_v1
- -   command_line $USER1$/check_snmp_int.pl -H $HOSTADDRESS$ - - $USER7$ -n $ARG1$ $ARG2$
- - }
Commanddefine command{
- -   command_name check_snmp_int_v3
- -   command_line $USER1$/check_snmp_int.pl -H $HOSTADDRESS$ - - $USER8$ -n $ARG1$ $ARG2$
- - }
Arguments - -

ARG1 : regexp of interface
- - ARG2 : additional arguments if needed.

- -
Servicecheck_int_1_6: Checks FastEthernet 1 to 6 are up (snmpv1)
- - check_int_eth0_bdw : Checks input bandwith on eth1 is - - < 100 KBytes/s and output is < 50 Kbytes/s (critical at - - 0,0 means no critical levels). (snmpv3)
Service - -

define service {
- -   name check_int_1_6
- -   check_command check_snmp_int_v1!"FastEthernet-[1-6]"
- - }

- -
Servicedefine service {
- -   name check_int_eth0_bdw
- -   check_command check_snmp_int_v3!eth0!-k - - -w 100,50 -c 0,0
- - }
- -

check_snmp_mem.pl

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Commandcheck_snmp_mem
Commanddefine command{
- -   command_name check_snmp_mem_v1
- -   command_line $USER1$/check_snmp_mem.pl -H $HOSTADDRESS$ - - $USER7$ $ARG1$ -w $ARG2$ -c $ARG3$ $ARG4$
- - }
Commanddefine command{
- -   command_name check_snmp_mem_v3
- -   command_line $USER1$/check_snmp_mem.pl -H $HOSTADDRESS$ - - $USER8$ $ARG1$ -w $ARG2$ -c $ARG3$ $ARG4$
- - }
Arguments - -

ARG1 : Host type (-N, -I, -E)
- - ARG2 : warning level(s)
- - ARG3 : critical level(s)
- - ARG4 : additional arguments if needed.

- -
ServiceLinux_memory : warning at 95% memory used and 60% swap - - used, critical at 99% mem and 90% swap
- - Cisco_mem : warning at 80% used, critical at 99% used.
Servicedefine service {
- -   name Linux_memory
- -   check_command check_snmp_mem_v1!-N!95,60!99,90
- - }
Service - -

define service {
- -   name Cisco_mem
- -   check_command check_snmp_mem_v1!-I!80!99 - -
- - }

- -
- -

check_snmp_nsbox.pl - -

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Commandcheck_snmp_nsbox (snmpv1 or v2c)
Nagios cmddefine command{
- - command_name check_snmp_nsbox
- - command_line $USER1$/check_snmp_nsbox.pl -H $HOSTADDRESS$ $USER7$ - - -d $ARG1$ -s $ARG2$ -n $ARG3$ $ARG4$
- - }
Arguments - -

ARG1 : Diode name (regexp)
- - ARG2 : Vhost name (regexp)
- - ARG3 : Number of diodes and vhost that must be up
- - ARG4 : additional arguments if needed.

- -
Service - -

check_service_nsbox : checks using snmpv2
- - - 6 diodes matching "diode_name" are up
- - - 3 vhosts matching "vhost_name" are up

- -
Nagios servicedefine service {
- -     name check_service_nsbox
- -     check_command check_snmp_nsbox_v1!diode_name!vhost_name!6,3!-2
- - }
- -

check_snmp_process.pl

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Commandcheck_snmp_process
Commanddefine command{
- -   command_name check_snmp_process_v1
- -   command_line $USER1$/check_snmp_process.pl -H $HOSTADDRESS$ - - $USER7$ -n $ARG1$ -w $ARG2$ -c $ARG3$ $ARG4$
- - }
Arguments - -

ARG1 : regexp of process name
- - ARG2 : warning level(s)
- - ARG3 : critical level(s)
- - ARG4 : additional arguments if needed.

- -
Servicesproxy_checks : checks with snmpv2 (-2 option) that - - there is more than 21 process matching "proxy", but - - no more than 1999 (critical at 20 & 2000)
- - Check_httpd_all : Checks that process matching - - "httpd"
- - - Process number is > 5 and < 100 (or returns warning)
- - - Process number is > 0 (or returns critical)
- - - Memory used (by httpd process using the max memory) is < - - 20 Mbytes or < 30 Mbytes
- - - Cpu used (by all process together) is < 90% or 99%.
- - check_crontab : checks crontab is running (critical if - - not, no warnings).
Servicedefine command {
- -   name proxy_checks
- -   check_command check_snmp_process_v1!proxy!21,1999!20,2000!-2 - -
- - }
Servicedefine command {
- -   name Check_httpd_all
- -   check_command check_snmp_process_v1!httpd!5,100!0!-2 - - -m 20,30 -u 90,99
- - }
Service - -

define service {
- -   name check_crontab
- -   check_command check_snmp_process!crond!0!0
- - }

- -
- -

check_snmp_storage.pl

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Commandcheck_snmp_storage
Commanddefine command{
- -   command_name check_snmp_storage_v1
- -   command_line $USER1$/check_snmp_storage.pl -H $HOSTADDRESS$ - - $USER7$ -m $ARG1$ -w $ARG2$ -c $ARG3$ $ARG4$
- - }
Commanddefine command{
- -   command_name check_snmp_storage_v3
- -   command_line $USER1$/check_snmp_storage.pl -H $HOSTADDRESS$ - - $USER8$ -m $ARG1$ -w $ARG2$ -c $ARG3$ $ARG4$
- - }
Arguments - -

ARG1 : regexp of storage name
- - ARG2 : warning level
- - ARG3 : critical level
- - ARG4 : additional arguments if needed.

- -
ServiceCheck_LinDisk_home : Checks "/home" mountpoint - - (and only this one because of -r) usage < 90 and 97 %
  - -

define service {
- -   name Check_LinDisk_home
- -   service_description Verification /home
- -   check_command check_snmp_storage_v3!/home!90!97!-r - -
- - }

- -
ServiceWin_check_swap : Checks virtual (ram+swap) mem on windows - - < 60% or 90%
  - -

define command {
- -   name Win_check_swap
- -   service_description Verification swap Windows
- -   check_command check_snmp_storage_v3!Virtual!60!90
- - }

- -
Servicecheck_linux_swap : checks Linux swap < 60 and 90%
  define command {
- -   name check_linux_swap
- -   service_description Verfication swap linux
- -   check_command check_snmp_storage_v1!Swap!60!90!
- - }
Servicecheck_disk_all : Checks that "/", "/opt" - - , "/var", "/config" mountpoints usage is - - < 80 and 90%
  define command {
- -   name check_disk_all
- -   service_description Verification / /opt /var /config
- -   check_command check_snmp_storage_v1!"^/$|opt|config|var"!80!90!
- - }
- -

check_snmp_vrrp.pl

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Commandcheck_snmp_vrrp
Commanddefine command{
- -   command_name check_snmp_vrrp_v1
- -   command_line $USER1$/check_snmp_vrrp.pl -H $HOSTADDRESS$ - - $USER7$ -T $ARG1$ -s $ARG2$
- - }
Commanddefine command{
- -   command_name check_snmp_vrrp_v3
- -   command_line $USER1$/check_snmp_vrrp.pl -H $HOSTADDRESS$ - - $USER8$ -T $ARG1$ -s $ARG2$
- - }
Arguments - -

ARG1 : Host type (nokia, alteon, lp, nsc, ipso)
- - ARG2 : state (master or backup) or number of members, max - - % assigned to nodes (for ipso).

- -
ServiceLinkproof_check_vrrp_master : Checks that all interface - - are in master state
Service - -

define service {
- -   name Linkproof_check_vrrp_master
- -   check_command check_snmp_vrrp_v3!lp!master
- - }

- -
ServiceNokia_check_vrrp_backup : Checks that all interface - - are in backup state
Servicedefine service {
- -   name Linkproof_check_vrrp_backup
- -   check_command check_snmp_vrrp_v3!lp!backup
- - }
ServiceNokia_clustering : checks that nokia cluster has 2 - - members and that the load assigned to each member < 98%
Servicedefine service {
- -   name Nokia_clustering
- -   check_command check_snmp_vrrp_v3!ipso!2,98%
- - }
- -

check_snmp_win.pl

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Commandcheck_snmp_win
Nagiosdefine command {
- -   command_name check_win
- -   command_line $USER1$/check_snmp_win.pl -H $HOSTADDRESS$ - - $USER7$ -n $ARG2$
- -   # comment community service(s) name
- - }
Servicecheck_win_dhcp : Checks dhcp service is running
Nagios - -

define service {
- -   name check_win_dhcp
- -   service_description Checks dhcp service is running
- -   check_command check_win!dhcp
- - }

- -
Servicecheck_win_reg_spool: Checks registery access & - - print spool is active (French windows !!)
Nagios - -

define service {
- -   name check_win_reg_spool
- -   service_description Checks registery access & - - print spool is active
- -   check_command check_win!"au registre",spouleur
- - }

- -
- -

Checks you can - make by host type

-

N/A : nothing of this type to check
- SNMP : yes with simple snmp query
- ?? : not tested because useless most of the time.

-

Specific : name of the script to look - at for platform specific checks.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Host typeInterfacestorageload/cpumemprocessenvspecific
LinuxYesYesYesYesYesNo 
WindowsYesYesYesYesYesNocheck_snmp_win.pl
Cisco router/switchYesN/AYesYesN/AYes 
HP router/switchYesN/AYesYesN/ANo 
Bluecoat proxyYessnmpYessnmpNoYes 
CheckPoint on SPLATYesYesYesYesYesNocheck_snmp_cpfw.pl
CheckPoint on Nokia IPYesYesYesNo??Nocheck_snmp_vrrp.pl
BoostedgeYesYesYesYes??Nocheck_snmp_boostedge.pl
AS400YesYesYesYesNoNo 
NetsecureOne NetboxYesYesYes??YesNo 
Radware LinkproofYesN/AsnmpsnmpNoNo -

check_snmp_linkproof_nhr
- check_snmp_vrrp.pl

-
IronPortYessnmpsnmpsnmpNoYes 
Cisco CSSYes??YesYesNo??check_snmp_css.pl
-

 

- -
- -

This project is hosted on :
- - SourceForge.net Logo - -

- -

Nagios and the Nagios logo are registered trademarks - - of Ethan Galstad.

- -
- -
- - - - - diff --git a/plugins/doc/snmp_cpfw.html b/plugins/doc/snmp_cpfw.html deleted file mode 100755 index 440eb45..0000000 --- a/plugins/doc/snmp_cpfw.html +++ /dev/null @@ -1,471 +0,0 @@ - - - - - - -Nagios plugins - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Home

- -
- - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Snmp Checkpoint FW-1 check
- -

Script : check_snmp_cpfw.pl

- -

Last update : April 19 2007

- -
- -

Description :

- -

Checks by snmp v1, v2c or v3 some modules of - Checkpoint FW-1 filtering or management module :

- -

You can choose to check 1, 2, 3 or all 4 modules. - - Each module will be checked independently and critical state will - - be returned if one of them is not OK.

- -

- Firewall (on filtering firewall) :

- -

Checks policy state : must be installed
- - Can check installed policy name : you mut provide the exact name - - of the policy (-p = <policy name>)
- - Can check connections : warning and maximum levels must be provided - - ( -c=<warn>,<crit>)

- -

- SVN

- -

Checks the svan status code (must be "OK") - - of SVN

- -

- Management

- -

Checks the management state ("active") - - and if management is alive.

- -

- High availability

- -

Checks the HA state :
- - "active" on IPSO & master on SPLAT (default)
- - "standby" on SPLAT
- Use check_snmp_vrrp.pl for checks on active/standby or IPSO clusters - on IPSO
- Check the blocking state ("OK")
- Checks the state of all HA softs, usually : Synchronization,Filter, - cphad and fwd.

-

SNMP Login
-

-

See snmp info page

- -

Requirements :

- -

- On the Checkpoint Firewall : SNMP extentions - - must be active

- -

- Perl in /usr/bin/perl - or just run 'perl - - script'
- - - Net::SNMP
- - - file 'utils.pm' in plugin diretory (/usr/local/icinga/libexec)

- -

Configurations - - examples
- -

- -

Dowload - lastest version : 1.2.1

- -

Changelog - : On CVS repository on sourceforge : http://nagios-snmp.cvs.sourceforge.net/nagios-snmp/plugins/.

- -

Examples :

- -


- - All examples below are considering the script is local directory. - - Host to be checked is 127.0.0.1 with snmp community "public".

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -

Get help - -

- -

./check_snmp_cpfw.pl -h

- -
snmpv3 login./check_snmp_cpfw.pl -H 127.0.0.1 - - -l login -x passwd .....
- -

Check firewall / HA / SVN - for a HA filtering module - - -

- -

./check_snmp_cpfw.pl -H 127.0.0.1 -C public -swa

- -
- -

Result example : - -

- -

FW : OK / SVN : OK / HA : OK / CPFW Status : OK

- -
- -

Check SVN/Mgmt - for a management - - -

- -

./check_snmp_cpfw.pl -H 127.0.0.1 -C public -sm

- -
- -
Result example :
- -
SVN : OK / MGMT : OK / CPFW - - Status : OK
Check policy - - name ./check_snmp_cpfw.pl -H 127.0.0.1 - - -C public -w -p prod
- -

Result example :

- -
FW : OK / CPFW Status : OK
- -
Same with another policy installed :
- -
FW : Policy installed : Standard - - / CPFW Status : CRITICAL
Check number - - of active connection with performance data output./check_snmp_cpfw.pl -H 127.0.0.1 - - -C public -w -c 1000,5000 -f
- -
Result example :
- -
FW : OK / CPFW Status : OK - - | fw_connexions=340
- -

 

- -

Output of check_snmp_cpfw.pl -h

- - - - - - - - - -
-

SNMP Checkpoint FW-1 Monitor for Nagios - version 1.2.1
- GPL Licence, (c)2004-2007 - Patrick Proy -

Usage: ./check_snmp_cpfw.pl [-v] -H <host> -C <snmp_community> - [-2] | (-l login -x passwd [-X pass -L <authp>,<privp>]) - [-s] [-w [-p=pol_name] [-c=warn,crit]] [-m] [-a [standby] - ] [-f] [-p <port>] [-t <timeout>] [-V]
- -v, --verbose
- print extra debugging information (including interface list - on the system)
- -h, --help
- print this help message
- -H, --hostname=HOST
- name or IP address of host to check
- -C, --community=COMMUNITY NAME
- community name for the host's SNMP agent (implies v1 protocol)
- 2, --v2c
- Use snmp v2c
- -l, --login=LOGIN ; -x, --passwd=PASSWD
- Login and auth password for snmpv3 authentication
- If no priv password exists, implies AuthNoPriv
- -X, --privpass=PASSWD
- Priv password for snmpv3 (AuthPriv protocol)
- -L, --protocols=<authproto>,<privproto>
- <authproto> : Authentication protocol (md5|sha : default - md5)
- <privproto> : Priv protocole (des|aes : default des) -
- -s, --svn
- check for svn status
- -w, --fw
- check for fw status
- -a, --ha[=standby]
- check for ha status and node in "active" state
- If using SecurePlatform and monitoring a standby unit, put - "standby" too
- -m, --mgmt
- check for management status
- -p, --policy=POLICY_NAME
- check if installed policy is POLICY_NAME (must have -w)
- -c, --connexions=WARN,CRIT
- check warn and critical number of connexions (must have -w)
- -f, --perfparse, --perfdata
- performance data output (only works with -c)
- -P, --port=PORT
- SNMP port (Default 161)
- -t, --timeout=INTEGER
- timeout for SNMP (Default: Nagios default)
- -V, --version
- prints version number
-

-
- -
- -

This project is hosted on :
- - SourceForge.net Logo - -

- -

Nagios and the Nagios logo are registered - - trademarks of Ethan Galstad.

- -
- -
- - - - - - - - - - - diff --git a/plugins/doc/snmp_css.html b/plugins/doc/snmp_css.html deleted file mode 100755 index a898c34..0000000 --- a/plugins/doc/snmp_css.html +++ /dev/null @@ -1,381 +0,0 @@ - - - - -Nagios plugins - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Home

- -
- - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Snmp CSS check
- -

Script : check_snmp_css.pl / check_snmp_css_main.pl

- -

Last update : Jan 22 2007

- -
- -

Description :

- -

Checks by snmp v1, v2c or v3 CSS services state

-

SNMP Login
- -

- -

See snmp info page

- -

Requirements :

- -

- Perl in /usr/bin/perl - or just run 'perl - script'
- - Net::SNMP
- - file 'utils.pm' in plugin diretory (/usr/local/icinga/libexec)
-

-

Checks

-

This scripts checks status of the CSS services.

-

Select service(s)
- You select services you wan't to check with -n using regular expressions

-

Put thresholds
- You select the warning and critical levels for : <num>,<resp>,<conn> -
- num : minimum number of active & alive service
- resp : average response time in ms
- conn : number of connexions

-

You can choose not to put 1, 2 or 3 numbers. -
- If you set "-w 3" only the number of active services will - be checked.
- If you set "-w 3,200" only the number of active services - and response time will be checked.
-
- For no warnings, put -1 (ex : -w5,-1,3).
- When using negative numbers, dont put space after "-w" - : "-w -1,100,6" will not work, "-w-1,100,6" - will work.

-

-d option and check_snmp_css_main.pl

-

This option is set to make the script read - the index from a file instead of on the CSS.

-

The reason of this option is :
- - when you have a lot (> 50) services on the CSS
- - you want to check 10 service group consisting of 5 services every - 2 minutes.

-

If you use check_snmp_css, then it will read - the index (50 oids) + checks 5 oids = 55 OID every 12 seconds in - average. This will heavily load the CSS.
- This is why I wrote check_snmp_css_main.pl. This script will get - the index of the CSS every 10 minutes for example (could be more) - as the index won't change often.
- Then the check_snmp_css will only have to check for the 5 oids every - 12 seconds, which will reduce by about 10 the amount of snmp queries - !

-

How to use it :

-

Create a service with long inter-delay check - executing :

-

check_snmp_css_main.pl -H <host> <snmp - logins> -2 -d /var/tmp
- -2 if for using snmpv2c (better to get a lot of data)
- -d /var/tmp is to put the temp file to a special directory - (default is /tmp).

-

A file named : Nagios_CSS_<IP Address> - will be created

-

Then you can use your check_snmp_css.pl script - just as before but adding the '-d' option with the temp directory - if not /tmp.

-

If the Nagios_CSS_<IP> file is not created - when the check_snmp_css script runs, it will then return unknown - status.
- If the check_snmp_css_main.pl cannot read index, a warning will - be returned but the old index file will remain.

-

A lockfile is created bye check_snmp_css_main.pl - when it writes it's file. The check_snmp_css script will wait until - the lock file is removed to read the index file.
- The lock file is named : Nagios_CSS_<IP Address>.lock
-
The lock file format is simple: every line is in format -
- <OID>:<Service name>

-

 

-

Dowload - lastest version of check_snmp_css.pl : 1.0

-

Dowload - lastest version of check_snmp_css_main.pl : 1.0

- -

Configurations - - examples

- -

Changelog - : On CVS repository on sourceforge : http://nagios-snmp.cvs.sourceforge.net/nagios-snmp/plugins/.

- -

Examples :

- -


- - All examples below are considering the script is local directory. - - Host to be checked is 127.0.0.1 with snmp community "public".

- - - - - - - - - - - - - - -
-

Get help -

-

./check_snmp_css.pl -h

-
Verbose output./check_snmp_css.pl -H <IP> - -C <com> -v
snmpv3 login./check_snmp_css.pl -H 127.0.0.1 - -l login -x passwd
- -

Output of check_snmp_css.pl -h

- - - - - - - - -
-
- SNMP Cisco CSS monitor for Nagios version 1.0
-(c)2004-2006 Patrick Proy
-
-Usage: ./check_snmp_css.pl [-v] -H <host> -C <snmp_community> [-2] | (-l login -x passwd [-X pass -L <authp>,<privp>]) 
-       -n <name> [-d directory] [-w <num>,<resp>,<conn> -c <num>,<resp>,<conn>]  [-p <port>] [-f] [-t <timeout>] [-V]
--v, --verbose
-   print extra debugging information 
--h, --help
-   print this help message
--H, --hostname=HOST
-   name or IP address of host to check
--n, --name=<name> 
-   regexp to select service
--w, --warning=<num>,<resp>,<conn> 
-   Optional. Warning level for
-   - minimum number of active & alive service 
-   - average response time
-   - number of connexions
-   For no warnings, put -1 (ex : -w5,-1,3).
-   When using negative numbers, dont put space after "-w"
--d, --dir=<directory to put file> 
-   Directory where the temp file with index, created by check_snmp_css_main.pl, can be found
-   If no directory is set, /tmp will be used
--c, --critical=<num>,resp>,<conn>
-   Optional. Critical levels (-1 for no critical levels)
-   See warning levels.
--C, --community=COMMUNITY NAME
-   community name for the host's SNMP agent (implies v1 protocol)
--2, --v2c
-   Use snmp v2c
--l, --login=LOGIN ; -x, --passwd=PASSWD
-   Login and auth password for snmpv3 authentication 
-   If no priv password exists, implies AuthNoPriv 
--X, --privpass=PASSWD
-   Priv password for snmpv3 (AuthPriv protocol)
--L, --protocols=<authproto>,<privproto>
-   <authproto> : Authentication protocol (md5|sha : default md5)
-   <privproto> : Priv protocole (des|aes : default des) 
--P, --port=PORT
-   SNMP port (Default 161)
--f, --perfparse, --perfdata
-   Performance data output
--t, --timeout=INTEGER
-   timeout for SNMP in seconds (Default: 5)
--V, --version
-   prints version number
-
-
- -
-

Output of check_snmp_css_main.pl -h

- - - - -
-
- SNMP Cisco CSS monitor MAIN script for Nagios version 1.0
-GPL Licence, (c)2004-2006 Patrick Proy
-
-Usage: ./check_snmp_css_main.pl [-v] -H <host> -C <snmp_community> [-2] | (-l login -x passwd [-X pass -L <authp>,<privp>]) 
-       [-d directory] [-p <port>] [-t <timeout>] [-V]
--v, --verbose
-   print extra debugging information 
--h, --help
-   print this help message
--H, --hostname=HOST
-   name or IP address of host to check
--d, --dir=<directory to put file> 
-   Directory where temp file with index is written
--C, --community=COMMUNITY NAME
-   community name for the host's SNMP agent (implies v1 protocol)
--2, --v2c
-   Use snmp v2c
--l, --login=LOGIN ; -x, --passwd=PASSWD
-   Login and auth password for snmpv3 authentication 
-   If no priv password exists, implies AuthNoPriv 
--X, --privpass=PASSWD
-   Priv password for snmpv3 (AuthPriv protocol)
--L, --protocols=<authproto>,<privproto>
-   <authproto> : Authentication protocol (md5|sha : default md5)
-   <privproto> : Priv protocole (des|aes : default des) 
--P, --port=PORT
-   SNMP port (Default 161)
--t, --timeout=INTEGER
-   timeout for SNMP in seconds (Default: 5)
--V, --version
-   prints version number
-
-
-
- -

This project is hosted on :
- - SourceForge.net Logo - -

- -

Nagios and the Nagios logo are registered - - trademarks of Ethan Galstad.

- -
- -
- - - - - - - diff --git a/plugins/doc/snmp_env.html b/plugins/doc/snmp_env.html deleted file mode 100755 index db254ff..0000000 --- a/plugins/doc/snmp_env.html +++ /dev/null @@ -1,370 +0,0 @@ - - - - -Nagios plugins - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Home

- -
- - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Snmp env check
- -

Script : check_snmp_env.pl

- -

Last update : April 19 2007

- -
- -

Description :

- -

Checks by snmp v1, v2c or v3 environemental - parameters such as fan, power supply, temperature

-

SNMP Login
- -

- -

See snmp info page

- -

Requirements :

- -

- Perl in /usr/bin/perl - or just run 'perl - script'
- - Net::SNMP
- - file 'utils.pm' in plugin diretory (/usr/local/icinga/libexec)
-

-

Checks

-

The script will make the following checks depending - on host type.
- Either the threshold is directly set by the hardware manufacturer, - or you must set them with an option.

-

This table shows what the script CAN check, - depending on hardware version the sensors might not be there.
- The script will return "UNKNOWN" if no sensors can be - found.

-

If no option is specified in this table, it - means the script uses the threshold of the snmp table.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Host typeOptionPower supplyFanVoltageTemperatureDisks
CiscociscoYesYesNo (working on it)No (working on it)No
Nokia IpsonokiaYesYesNo.YesNo
BluecoatbcYesYesYesYesYes
IronPortironYesYes, option '-F' in RPMNoYes, option '-c' in CelciusNo
FoundryFoundryYesNo (bug in snmp agent)NoYesNo
-

Note : Bluecoat provides an "other" - sensor which is tested also. But I never saw a Bluecoat reporting - it.

-

 

- -

Dowload - lastest version : 1.2

- -

Configurations - - examples

- -

Changelog - : On CVS repository on sourceforge : http://nagios-snmp.cvs.sourceforge.net/nagios-snmp/plugins/.

- -

Examples :

- -


- - All examples below are considering the script is local directory. - - Host to be checked is 127.0.0.1 with snmp community "public".

- - - - - - - - - - - - - - - - - - - - - - - - - - -
-

Get help -

-

./check_snmp_env.pl -h

-
Verbose output./check_snmp_env.pl -H <IP> - -C <com> -v
snmpv3 login./check_snmp_env.pl -H 127.0.0.1 - -l login -x passwd
-

Check Cisco for all sensors -

-

./check_snmp_env.pl -H 127.0.0.1 -C public - -T cisco

-
Check Nokia - for all sensors./check_snmp_env.pl -H 127.0.0.1 - -C public -T nokia
checks ironport - fans RPM > 1500 and temp < 70 deg celcius./check_snmp_env.pl -H 127.0.0.1 - -C public -T iron -F 1500 -c 70
- -

Output of check_snmp_env.pl -h

- - - - - - - - - -
-


- SNMP environmental Monitor for Nagios version 1.2
- GPL Licence, (c)2006-2007 Patrick Proy -

Usage: ./check_snmp_env.pl [-v] -H <host> -C <snmp_community> - [-2] | (-l login -x passwd [-X pass -L <authp>,<privp>]) - [-p <port>] -T (cisco|nokia|bc|iron|foundry) [-F <rpm>] - [-c <celcius>] [-f] [-t <timeout>] [-V]
- -v, --verbose
- print extra debugging information
- -h, --help
- print this help message
- -H, --hostname=HOST
- name or IP address of host to check
- -C, --community=COMMUNITY NAME
- community name for the host's SNMP agent (implies v1 protocol)
- -2, --v2c
- Use snmp v2c
- -l, --login=LOGIN ; -x, --passwd=PASSWD
- Login and auth password for snmpv3 authentication
- If no priv password exists, implies AuthNoPriv
- -X, --privpass=PASSWD
- Priv password for snmpv3 (AuthPriv protocol)
- -L, --protocols=<authproto>,<privproto>
- <authproto> : Authentication protocol (md5|sha : default - md5)
- <privproto> : Priv protocole (des|aes : default des) -
- -P, --port=PORT
- SNMP port (Default 161)
- -T, --type=cisco|nokia|bc|iron|foundry
- Environemental check :
- cisco : voltage,temp,fan,power supply status
- will try to check everything present
- nokia : fan and power supply
- bc : fans, power supply, voltage, disks
- iron : fans, power supply, temp
- foundry : power supply, temp
- -F, --fan=<rpm>
- Minimum fan rpm value
- -c, --celcius=<celcius>
- Maximum temp in degree celcius
- -f, --perfparse, --perfdata
- Performance data output
- -t, --timeout=INTEGER
- timeout for SNMP in seconds (Default: 5)
- -V, --version
- prints version number
-

-
- -
- -

This project is hosted on :
- - SourceForge.net Logo - -

- -

Nagios and the Nagios logo are registered - - trademarks of Ethan Galstad.

- -
- -
- - - - - - - diff --git a/plugins/doc/snmp_int.html b/plugins/doc/snmp_int.html deleted file mode 100755 index d26a82a..0000000 --- a/plugins/doc/snmp_int.html +++ /dev/null @@ -1,673 +0,0 @@ - - - - -Nagios plugins - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Home

- -
- - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Snmp interface check
- -

Script : check_snmp_int.pl

- -

Last update : May 24 2007

- -
- -

Description :

- -

Checks by snmp (v1, v2c or v3) host interface - - state and usage.
- -
- - Interfaces can be selected by regexp ( 'eth' will check eth0, eth1, - - eth2, ...).
- - If multiple interfaces are selected, all must be up to get an OK - - result
- -
- -
Vérifie par snmp v1, v2c ou v3 l'état des interfaces - - d'un hôte, leur utilisation (bande passante, erreurs, pertes) - - et sortir des informations de performances.
- - Ce script permet d'utiliser des expressions régulières - - pour sélectionner les interfaces : ex 'eth' va vérifier - - eth0, eth1, ...
- - Il permet également de lister toutes les interfaces disponibles - - sur la machine cible (option -v) pour voir leur nom en SNMP.
- - Pour les francophones, je ferais un manuel en Français - - quand j'aurais le temps... (et toute aide est bienvenue).
- -

- - Standard checks
- -

- -

The script will check interface operationnal - - status using the MIB-II table. The interface is (are) selected by - - the -n option.
- - This option will be treated as a regular expression (eth will match - - eth0, eth1, eth2...). You can disable this with the -r option - - : the interface will be selected if it's description exactly matches - - the name given by -n

- -

The interfaces are selected by their description - - in the MIB-II table.
- To see how interface looks like by snmp, you can list all of - them with the '-v' switch.
- -

- -

The script will return OK if ALL interfaces - - selected are UP, or CRITICAL if at least one interface is down.
- -
- - You can make the script return a OK value when all interfaces are - - down (and CRITICAL when at least one is up) with the -i option.

- -

You can make the same tests on administrative - - status instead with the -a option.

-

If you have ISDN interface, and want that DORMANT state returns ok, put -D.

-

To make output shorter, specially when you - - have multiple interface, you can put the -s option.
- - It will get only the first <n> caracters of the interface - - descrition. If the number is negative then get the last <n> - - caracters.

- -

Ex : EL20005 3Com Gigabit NIC (3C2000 Family)
- - -s 4 will output : "EL20".
- - -s -4 will output : "ily)".

- -

Performance output

- -

-f option : activate performance output - (default the In/out octet as a counter).
- -e option : in/out errors and discarded packets. -f must - also be set.
- -S option : Include speed in performance output in bits/s - as '<interface_name>_speed_bps'
- -y option : output performance data in % of interface speed
- -Y
option : output performance data in bits/s or Bytes/s (depending - on -B)

-

Note : -y and -Y options need the usage - check to ba active (-k)

-

Warning : the counters needed by -e - - are not always available on all machines (ex Nokia IP)
- -

- -

Usage check (-k) -
-
-
- A temporary file will be created in "/tmp" by default - : this can be changed at the beginning of the script.
- The file name will be : tmp_Icinga_int.<host IP>.<Interface - name>. One file will be created by interface.
-
- The status UNKNOWN is returned when the script doesn't have enough - information (see -d option).
-
- You will have to tell the warning and critical levels, separated - with "," and you can use decimal (ex : 10.3).
- For standard checks (no "-q" option) :
- -w <In warn>,<Out warn> -c <In warn>,<Out - warn>
-
In warn : warning level for incomming traffic
- Out warn : warning level for outgoing traffic
- In crit : critical level for incomming traffic
- Out crit : critical level for outgoing traffic
-

-

The unit for the check depends on the -B, -M - and -G option :

- - - - - - - - - - - - - - - - - - - - - -
  -B set-B not set
-M & -G not set -
Kbps
-
-
KBps
-
-M set -
Mbps
-
-
MBps
-
-G set -
Gbps
-
-
GBps
-
-

It is possible to put warning and critical - - levels with -b option.
- - 0 means no warning or critical level checks

- -

When the extended checks are activated (-q - option), the warning levels are
- -w <In bytes>,<Out bytes>,<In error>,<Out - error>,<In disc>,<Out disc> -c - <In warn>,<Out warn>, .....
- In error : warn/crit level in inboud error/minute
-
Out error : warn/crit level in outbound error/minute
- In disc : warn/crit level in inboud discarded packets/minute
-
Out disc : warn/crit level in outbound discarded packets/minute -
-

-

-k : activates the standard usage feature
- -q : activates the extended usage
- -d : delta in seconds (default is 300s)
- -w : warning levels
- -c : critical levels
-

-

-d: delta time
- - You can put the delta time as an option : the "delta" - - is the prefered time between two values that the script will use - - to calculate the average Kbytes/s or error/min. The delta time should - - (not must) be bigger than the check interval.
- - Here is an example : Check interval of 2 minutes and delta of 4min

- -

T0 : value 1 : can't calculate usage
- - T0+2 : value 2 : can't calculate usage
- - T0+4 : value 3 : usage=(value3-value1)/((T0+4)-T0)
- - T0+6 : value 4 : usage=(value4-value2)/((T0+6)-T0+2)
- - (Yes I know TO+4-T0=4, it's just to explain..)
- - .........

- -

The script will allow 10% less of the delta - - and 300% more than delta as a correct interval.
- - For example, with a delta of 5 minutes, the acceptable interval - - will be between 4'30" and 15 minutes.

- -

Msg size option (-o option)

-

In case you get a "ERROR: running table - : Message size exceeded maxMsgSize" error, you may need to - adjust the maxMsgSize, i.e. the maximum size of snmp message with - the -o option. Try a value with the -o AND the -v option : the script - will output the actual value so you can add some octets to it with - the -o option.

-

--label option

-

This option just put label before the speed - output :
- Without : eth1:UP (10.3Kbps/4.4Kbps), eth0:UP (10.9Kbps/16.4Kbps):2 - UP: OK
- With : eth1:UP (in=14.4Kbps/out=6.2Kbps), eth0:UP (in=15.3Kbps/out=22.9Kbps):2 - UP: OK
-

-

SNMP Login
- -

- -

See snmp info page

- -

Requirements :

- -

- Perl in /usr/bin/perl - or just run 'perl - - script'
- - - Net::SNMP
- - - file 'utils.pm' in plugin diretory (/usr/local/icinga/libexec)
- -

- -

Dowload - latest version : 1.4.8

- -

Configuration - - examples

- -

Examples :

- -


- - All examples below are considering the script is local directory. - - Host to be checked is 127.0.0.1 with snmp community "public".

- -

If multiple interfaces are selected, all must - - be up to get an OK result

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -

Get help - -

- -

./check_snmp_int.pl -h

- -
List all interfaces./check_snmp_int.pl -H 127.0.0.1 - - -C public -n zzzz -v
snmpv3 login./check_snmp_int.pl -H 127.0.0.1 - - -l login -w passwd
- -

Check eth0 interface is up - -

- -

./check_snmp_int.pl -H 127.0.0.1 -C public -n eth0 -r

- -
- -

Check that all eth interface are up - -

- -

./check_snmp_int.pl -H 127.0.0.1 -C public -n eth

- -
- -

Check that all ppp interface are down - -

- -

./check_snmp_int.pl -H 127.0.0.1 -C public -n ppp -i

- -
- -

Check that all eth interface are administratively up - -

- -

./check_snmp_int.pl -H 127.0.0.1 -C public -n eth -a

- -
- -

Check that FastEternet0/11 to 0/14 are up (Cisco) - -

- -

./check_snmp_int.pl -H 127.0.0.1 -C public -n "Fast.*0.1[1234]"

- -
Check the eth0 - - usage
- - Note : no critical inbound (0)
./check_snmp_int.pl -H 127.0.0.1 - - -C public -n eth0 -k -w 200,400 -c 0,600
- -

Changelog - : On CVS repository on sourceforge : http://nagios-snmp.cvs.sourceforge.net/nagios-snmp/plugins/.

- -

Output of check_snmp_int.pl -h

- - - - - - - - - -
-

SNMP Network Interface Monitor for Nagios version 1.4.8
- GPL licence, (c)2004-2007 Patrick Proy

-

Usage: ./check_snmp_int.pl [-v] -H <host> -C <snmp_community> [-2] | (-l login -x passwd [-X pass -L <authp>,<privp>) [-p <port>] -n <name in desc_oid> [-i -a -D] [-r] [-f[eSyY]] [-k[qBMGu] -g -w<warn levels> -c<crit levels> -d<delta>] [-o <octet_length>] [-t <timeout>] [-s] --label [-V]
- -v, --verbose
- print extra debugging information (including interface list on the system)
- -h, --help
- print this help message
- -H, --hostname=HOST
- name or IP address of host to check
- -C, --community=COMMUNITY NAME
- community name for the host's SNMP agent (implies v1 protocol)
- -l, --login=LOGIN ; -x, --passwd=PASSWD, -2, --v2c
- Login and auth password for snmpv3 authentication
- If no priv password exists, implies AuthNoPriv
- -2 : use snmp v2c
- -X, --privpass=PASSWD
- Priv password for snmpv3 (AuthPriv protocol)
- -L, --protocols=<authproto>,<privproto>
- <authproto> : Authentication protocol (md5|sha : default md5)
- <privproto> : Priv protocole (des|aes : default des)
- -P, --port=PORT
- SNMP port (Default 161)
- -n, --name=NAME
- Name in description OID (eth0, ppp0 ...).
- This is treated as a regexp : -n eth will match eth0,eth1,...
- Test it before, because there are known bugs (ex : trailling /)
- -r, --noregexp
- Do not use regexp to match NAME in description OID
- -i, --inverse
- Make critical when up
- -a, --admin
- Use administrative status instead of operational
- -D, --dormant
- Dormant state is an OK state
- -o, --octetlength=INTEGER
- max-size of the SNMP message, usefull in case of Too Long responses.
- Be carefull with network filters. Range 484 - 65535, default are
- usually 1472,1452,1460 or 1440.
- -f, --perfparse, --perfdata
- Performance data output (no output when interface is down).
- -e, --error
- Add error & discard to Perfparse output
- -S, --intspeed
- Include speed in performance output in bits/s
- -y, --perfprct ; -Y, --perfspeed
- -y : output performance data in % of max speed
- -Y : output performance data in bits/s or Bytes/s (depending on -B)
- -k, --perfcheck ; -q, --extperfcheck
- -k check the input/ouput bandwidth of the interface
- -q also check the error and discard input/output
- --label
- Add label before speed in output : in=, out=, errors-out=, etc...
- -g, --64bits
- Use 64 bits counters instead of the standard counters when checking
- bandwidth & performance data for interface >= 1Gbps.
- You must use snmp v2c or v3 to get 64 bits counters.
- -d, --delta=seconds
- make an average of <delta> seconds (default 300=5min)
- -B, --kbits
- Make the warning and critical levels in K|M|G Bits/s instead of K|M|G Bytes/s
- -G, --giga ; -M, --mega ; -u, --prct
- -G : Make the warning and critical levels in Gbps (with -B) or GBps
- -M : Make the warning and critical levels in Mbps (with -B) or MBps
- -u : Make the warning and critical levels in % of reported interface speed.
- -w, --warning=input,output[,error in,error out,discard in,discard out]
- warning level for input / output bandwidth (0 for no warning)
- unit depends on B,M,G,u options
- warning for error & discard input / output in error/min (need -q)
- -c, --critical=input,output[,error in,error out,discard in,discard out]
- critical level for input / output bandwidth (0 for no critical)
- unit depends on B,M,G,u options
- critical for error & discard input / output in error/min (need -q)
- -s, --short=int
- Make the output shorter : only the first <n> chars of the interface(s)
- If the number is negative, then get the <n> LAST caracters.
- -t, --timeout=INTEGER
- timeout for SNMP in seconds (Default: 5)
- -V, --version
- prints version number
- Note : when multiple interface are selected with regexp,
- all be must be up (or down with -i) to get an OK result.

-
- -
- -

This project is hosted on :
- - SourceForge.net Logo - -

- -

Nagios and the Nagios logo are registered - - trademarks of Ethan Galstad.

- -
- -
- -

 

- - - - - - - diff --git a/plugins/doc/snmp_load.html b/plugins/doc/snmp_load.html deleted file mode 100755 index 7e9abc0..0000000 --- a/plugins/doc/snmp_load.html +++ /dev/null @@ -1,409 +0,0 @@ - - - - -Nagios plugins - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Home

- -
- - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Snmp load check
- -

Script : check_snmp_load.pl

- -

Last update : Sept 5 2006

- -
- -

Description :

- -

Checks by snmp v1, v2c or v3 cpu or average - - load.
- - Works on Windows, Linux/Unix, AS400, Cisco, Cisco catalyst, HP Procurve, LinkProof, - - Blucoat, Nokia, Fortinet, Netscreen.

- -

Check types are selected by the -T option : - -

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-T value
-
-
System
-
-
-w & -c values
-
netslLinux : load provided by Net SNMP3 values : load average on 1 min, 5 min, - 15 min (absolute)
netscLinux : CPU usage given by net-snmp1 value in %
as400as400 CPU usage1 value in %
ciscocisco CPU usage3 values : CPU average on 5sec, 1 min - & 5 min (%)
catacisco catalyst CPU usage3 values : CPU average on 5sec, 1 min - & 5 min (%)
nscNetscreen CPU usage3 values : CPU average on 5sec, 1 min - & 5 min (%)
fgFortigate CPU usage1 value in %
bcbluecoat CPU usage1 value in %
nokianokia CPU usage1 value in %
hpHP procurve switch CPU usage1 value in %
lpLinkproof CPU usage1 value in %
hpuxHP-UX load3 values : load average on 1 min, 5 min, - 15 min
- -

Vérifie par snmp v1,v2c ou v3 la charge - - ou l'ocupation CPU.

- -

SNMP Login
- -

- -

See snmp info page

- -

Requirements :

- -

- Perl in /usr/bin/perl - or just run 'perl - - script'
- - - Net::SNMP
- - - file 'utils.pm' in plugin diretory
- -

- -

Dowload - lastest version : 1.3.1

- -

Configurations - - examples

- -

Changelog - : On CVS repository on sourceforge : http://nagios-snmp.cvs.sourceforge.net/nagios-snmp/plugins/.

-

Examples :

- -


- - All examples below are considering the script is local directory. - - Host to be checked is 127.0.0.1 with snmp community "public".

- -

If multiple interfaces are selected, all must - - be up to get an OK result

- - - - - - - - - - - - - - - - - - -
-

Get help -

-

./check_snmp_load.pl -h

-
-

Check loads on linux with Net-SNMP : checks the 1, 5 and - 15 minutes load average. -

-

./check_snmp_load.pl -H 127.0.0.1 -C public -w 3,3,2 -c - 4,4,3 -T netsl

-
-

Check cpu load (generic) : checks the %used CPU for the last - minute -

-

./check_snmp_load.pl -H 127.0.0.1 -C public -w 98% -c - 99%

-
-

Check cpu load on AS/400 -

-

./check_snmp_load.pl -H 127.0.0.1 -C public -w 98% -c - 99% -T as400

-
- -

Output of check_snmp_load.pl -h

- - - - - - - - - -
-SNMP Load & CPU Monitor for Nagios version 1.3
- (c)2004-2006 Patrick Proy -

Usage: ./check_snmp_load.pl [-v] -H <host> -C <snmp_community> - [-2] | (-l login -x passwd [-X pass -L <authp>,<privp>]) - [-p <port>] -w <warn level> -c <crit level> - -T=[stand|netsl|netsc|as400|cisco|cata|nsc|fg|bc|nokia|hp|lp] - [-f] [-t <timeout>] [-V]
- -v, --verbose
- print extra debugging information
- -h, --help
- print this help message
- -H, --hostname=HOST
- name or IP address of host to check
- -C, --community=COMMUNITY NAME
- community name for the host's SNMP agent (implies v1 protocol)
- -2, --v2c
- Use snmp v2c
- -l, --login=LOGIN ; -x, --passwd=PASSWD
- Login and auth password for snmpv3 authentication
- If no priv password exists, implies AuthNoPriv
- -X, --privpass=PASSWD
- Priv password for snmpv3 (AuthPriv protocol)
- -L, --protocols=<authproto>,<privproto>
- <authproto> : Authentication protocol (md5|sha : default - md5)
- <privproto> : Priv protocole (des|aes : default des) -
- -P, --port=PORT
- SNMP port (Default 161)
- -w, --warn=INTEGER | INT,INT,INT
- 1 value check : warning level for cpu in percent (on one minute)
- 3 value check : comma separated level for load or cpu for - 1min, 5min, 15min
- -c, --crit=INTEGER | INT,INT,INT
- critical level for cpu in percent (on one minute)
- 1 value check : critical level for cpu in percent (on one - minute)
- 3 value check : comma separated level for load or cpu for - 1min, 5min, 15min
- -T, --type=stand|netsl|netsc|as400|cisco|bc|nokia|hp|lp
- CPU check :
- stand : standard MIBII (works with Windows),
- can handle multiple CPU.
- netsl : linux load provided by Net SNMP
- netsc : cpu usage given by net-snmp (100-idle)
- as400 : as400 CPU usage
- cisco : Cisco CPU usage
- cata : Cisco catalyst CPU usage
- nsc : NetScreen CPU usage
- fg : Fortigate CPU usage
- bc : Bluecoat CPU usage
- nokia : Nokia CPU usage
- hp : HP procurve switch CPU usage
- lp : Linkproof CPU usage
- -f, --perfparse, --perfdata
- Performance data output
- -t, --timeout=INTEGER
- timeout for SNMP in seconds (Default: 5)
- -V, --version
- prints version number

-
- -
- -

This project is hosted on :
- - SourceForge.net Logo - -

- -

Nagios and the Nagios logo are registered - - trademarks of Ethan Galstad.

- -
- -
- -

 

- - - - - - - diff --git a/plugins/doc/snmp_mem.html b/plugins/doc/snmp_mem.html deleted file mode 100755 index 646ed70..0000000 --- a/plugins/doc/snmp_mem.html +++ /dev/null @@ -1,485 +0,0 @@ - - - - -Nagios plugins - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Home

- -
- - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Snmp memory check
- -

Script : check_snmp_mem.pl

- -

Last update : Sept 4 2006

- -
- -

Description :

- -

Checks by snmp v1, v2c or v3 :

- -

- Memory and swap usage on Linux given by Net-snmp. - -
- - It checks memory and swap usage independantly : one warning and - - critical level for each of them.
- -

- -

- Memory usage on cisco routers or Pix : the - - plugin will add all of the memory pool and then checks the warning - - and critical levels.
- - On cisco routeurs, it will add 'IO' and 'Processor' memory
- - On Pix, it will check the memory used (one memory pool only on Pix).
- -

- -

- Memory usage on HP Procurve switch.
- - Memory segments will be added then the free memory will be checked.
- -

- -

Vérification de :
- - - l'utilisation mémoire et swap sur Linux/Net-snmp
- - - l'utilisation mémoire sur Cisco (routeurs et Pix).
- - Pour d'autres SE (Windows, AS400), lire la suite.

- -

Checking memory for other os :

- -

AS/400 : use the check_snmp_storage - - command to check the RAM

- -

./check_snmp_storage.pl -H <IP> - - -C <community> -m RAM -s -w <warn%> -c - - <crit%>

- -

Windows : use the check_snmp_storage - - command to check the virtual memory (RAM+Swap)

- -

./check_snmp_storage.pl -H <IP> - - -C <community> -m "^Virtual Memory$" -w <warn%> - - -c <crit%>

- -

SNMP Login
- -

- -

See snmp info page

- -

Requirements :

- -

- Perl in /usr/bin/perl - or just run 'perl - - script'
- - - Net::SNMP
- - - file 'utils.pm' in plugin diretory (/usr/local/icinga/libexec)
- -

- -

Dowload - - lastest version : 1.1

- -

Configurations - - examples

- -

Changelog - : On CVS repository on sourceforge : http://nagios-snmp.cvs.sourceforge.net/nagios-snmp/plugins/.

- -

Examples :

- -


- - All examples below are considering the script is local directory. - - Host to be checked is 127.0.0.1 with snmp community "public".

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -

Get help - -

- -

./check_snmp_mem.pl -h

- -
Verbose output./check_snmp_mem.pl -H <IP> - - -C <com> -w 80 -c 81 -v
snmpv3 login./check_snmp_mem.pl -H 127.0.0.1 - - -l login -x passwd
- -

  - -

- -

Unix/Linux

- -
- -

%used of
- - - RAM < 99% and 100%
- - - Swap : < 20% and 30% - -

- -

./check_snmp_mem.pl -H <IP> -C <com> -w 99,20 - - -c 100,30

- -
- -

Same with no warning levels for memory - -

- -

./check_snmp_mem.pl -H <IP> -C <com> -w 0,20 - - -c 100,30

- -
- -

Check memory on Cisco - -

- -

./check_snmp_mem.pl -H <IP> -C <com> -I -w - - 90% -c 98%

- -
- -

Output of check_snmp_mem.pl -h <

- - - - - - - - - -
- -

- -

-
-SNMP Memory Monitor for Nagios version 1.1
-
-(c)2004-2006 - Patrick Proy
-
-
-
-Usage: ./check_snmp_mem.pl [-v] -H <host> -C <snmp_community> [-2] | (-l login -x passwd [-X pass -L <authp>,<privp>])  [-p <port>] -w <warn level> -c <crit level> [-I|-N|-E] [-f] [-m] [-t <timeout>] [-V]
-
--v, --verbose
-
-   print extra debugging information (including interface list on the system)
-
--h, --help
-
-   print this help message
-
--H, --hostname=HOST
-
-   name or IP address of host to check
-
--C, --community=COMMUNITY NAME
-
-   community name for the host's SNMP agent (implies SNMP v1 or v2c with option)
-
--2, --v2c
-
-   Use snmp v2c
-
--l, --login=LOGIN ; -x, --passwd=PASSWD
-
-   Login and auth password for snmpv3 authentication 
-
-   If no priv password exists, implies AuthNoPriv 
-
--X, --privpass=PASSWD
-
-   Priv password for snmpv3 (AuthPriv protocol)
-
--L, --protocols=<authproto>,<privproto>
-
-   <authproto> : Authentication protocol (md5|sha : default md5)
-
-   <privproto> : Priv protocole (des|aes : default des) 
-
--P, --port=PORT
-
-   SNMP port (Default 161)
-
--w, --warn=INTEGER | INT,INT
-
-   warning level for memory in percent (0 for no checks) 
-
-     Default (-N switch) : comma separated level for Real Memory and Swap 
-
-     -I switch : warning level
-
--c, --crit=INTEGER | INT,INT
-
-   critical level for memory in percent (0 for no checks)
-
-     Default (-N switch) : comma separated level for Real Memory and Swap 
-
-     -I switch : critical level
-
--N, --netsnmp (default)
-
-   check linux memory & swap provided by Net SNMP 
-
--m, --memcache
-
-   include cached memory in used memory (only with Net-SNMP)
-
--I, --cisco
-
-   check cisco memory (sum of all memory pools)
-
--E, --hp
-
-   check HP Procurve memory
-
--f, --perfdata
-
-   Performance data output
-
--t, --timeout=INTEGER
-
-   timeout for SNMP in seconds (Default: 5)
-
--V, --version
-
-   prints version number
-
-
- -
- -
- -

This project is hosted on :
- - SourceForge.net Logo - -

- -

Nagios and the Nagios logo are registered - - trademarks of Ethan Galstad.

- -
- -
- - - - - - - diff --git a/plugins/doc/snmp_process.html b/plugins/doc/snmp_process.html deleted file mode 100755 index 94908f2..0000000 --- a/plugins/doc/snmp_process.html +++ /dev/null @@ -1,377 +0,0 @@ - - -Nagios plugins - - - - - - - - - -
- - - - - - - - - - - - - - -
Home

-
- -
- - - - - - - - - - - - - -
Snmp process check
-

Script : check_snmp_process.pl

-

Last update : Jun 09 2007

-
-

Description :

-

Checks by snmp v1 or v3 if a process is running - and how many instances are running (minimum & maximum).
- It is also possible to check memory and cpu used by one or a group - of process
-
- Works on Windows, Linux/Unix, AS400.

-

Vérifie par snmp v1 ou v3 si un process tourne - et combien d'instances de ce process tournent (minimum et maximum).
- Il est également possible de vérifier la mémoire - et le cpu utilisé.
-
- Standard checks
-

-

The plugin checks if there is at least one - process matching the filter (-n option) when no warning or - critical levels are set.
- The filter is treated as a regular expression by default, but you - can deactivate this (-r)

-

With the following options, you can add to your process selection :

-

-f : get full path of the script instead of only it's name

-

-A : add parameters with the script name

- - - - - - - - - - - - - - - - - - - - - -
Optionhow the script will see the process
Nonenamed
-f/usr/sbin/named
-Anamed -u named -t /var/named/chroot
-f -A /usr/sbin/named -u named -t /var/named/chroot
-

Warning : the -f & -A option will not function properly for Windows hosts (the snmp agent don't give this information)

-

You can use -w and -c options to set the warning - and critical levels :
- -w <minW>,<maxW> : with minW and maxW the minimum - and maximum number of processes.
-
- -c <minC>,<maxC> : same thing
- Of course : minC <= minW < maxW <=maxC
-
- You can omit <maxW> and <maxC>

-
- Saying N is the current number of processes
- - N < minC : critical
- - minC < N <=minW : warning
- - minW< N <= maxW : OK
- - maxW< N <= maxC : warning
- - maxC < N : critical
-

-

Memory checks

-

The -m option can check the memory used - by the selected processes.
- By default, this will select the process wich use the maximum memory. - The -a switch will make an average
-
- Ex : -m 7,20 will send a warning if a process uses more than - 7 Mb, and critical for more than 20Mb.

-

CPU checks

-

When you use the -u option, a temporary - file will be created in "/tmp" by default : this can be - changed at the beginning of the script.
- The file name will be : tmp_Icinga_proc.<host IP>.<process - filter>.

-

The -u option will add all the cpu used by - all selected process and the make the check
-

-

-u 91,95 : will send a warning if more - than 91% of cpu is used, and critical if more than 95% is used.

-

On multiprocessor hosts, the % of cpu use can - be > 100% : on a 4 CPU host, cpu usage can go up to 400% (the - script doesn't check if a host is multiprocessor or not).

-

The script curently wants a minimum of 5 minutes - between values taken from host (can be changed at the beginning - of the scripts). You can check more than once every 5 minutes but - don't put check-interval to more than 15 minutes.
- When the script doesn't have enough data to compute the CPU use - (for example, the first time it is run), then it will return a UNKNOWN - status.

-

Msg size option (-o option)

-

In case you get a "ERROR: running table - : Message size exceeded maxMsgSize" error, you may need to - adjust the maxMsgSize, i.e. the maximum size of snmp message with - the -o option. Try a value with the -o AND the -v option : the script - will output the actual value so you can add some octets to it with - the -o option.

-

SNMP Login
-

-

See snmp info page

-

Requirements :

-

- Perl in /usr/bin/perl - or just run 'perl - script'
- - Net::SNMP
- - file 'utils.pm' in plugin diretory
-

-

Dowload - latest version : 1.5

-

Configurations - examples

-

Changelog - : On CVS repository on sourceforge : http://nagios-snmp.cvs.sourceforge.net/nagios-snmp/plugins/.

-

Examples :

-


- All examples below are considering the script is local directory. - Host to be checked is 127.0.0.1 with snmp community "public".

-

If multiple interfaces are selected, all must - be up to get an OK result

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-

Get help -

-

./check_snmp_process.pl -h

-
snmpv3 login./check_snmp_process.pl -H - 127.0.0.1 -l login -x passwd
-

Check if at least one process matching http is running -

-

./check_snmp_process.pl -H 127.0.0.1 -C public -n http

-
-

Result example : -

-

3 process matching http : > 0 : OK

-
-

Check if at least 3 process matching http are running -

-

./check_snmp_process.pl -H 127.0.0.1 -C public -n http - -w 2 -c 0

-
-
Result example :
- (<=2 will return warning, 0 critical)
-
3 process matching httpd : - > 2 : OK
Check if at - least one process named "httpd" exists (no regexp)./check_snmp_process.pl -H - 127.0.0.1 -C public -n http -r
-

Result example :

-
3 process named httpd - : > 0 : OK
Check process - by their full path : check process of /opt/soft/bin/ (at least - one) ./check_snmp_process.pl -H - 127.0.0.1 -C public -n /opt/soft/bin/ -f
Check that at - least 3 process but not more than 8 are running./check_snmp_process.pl -H - 127.0.0.1 -C public -n http -w 3,8 -c 0,15
Same checks - + checks maximum memory used by process (in Mb) : warning and - critical levels./check_snmp_process.pl -H - 127.0.0.1 -C public -n http -w 3,8 -c 0,15 -m 9,25
Same check but - sum all CPU used by all selected process./check_snmp_process.pl -H - 127.0.0.1 -C public -n http -w 3,8 -c 0,15 -m 9,25 -u 70,99
-

Output of check_snmp_process.pl -h

- - - - -
-

SNMP Process Monitor for Nagios version 1.5
- GPL licence, (c)2004-2006 Patrick Proy

-

Usage: ./check_snmp_process.pl [-v] -H <host> -C <snmp_community> [-2] | (-l login -x passwd) [-p <port>] -n <name> [-w <min_proc>[,<max_proc>] -c <min_proc>[,max_proc] ] [-m<warn Mb>,<crit Mb> -a -u<warn %>,<crit%> -d<delta> ] [-t <timeout>] [-o <octet_length>] [-f -A -F ] [-r] [-V] [-g]
- -v, --verbose
- print extra debugging information (and lists all storages)
- -h, --help
- print this help message
- -H, --hostname=HOST
- name or IP address of host to check
- -C, --community=COMMUNITY NAME
- community name for the host's SNMP agent (implies SNMP v1 or v2c with option)
- -l, --login=LOGIN ; -x, --passwd=PASSWD, -2, --v2c
- Login and auth password for snmpv3 authentication
- If no priv password exists, implies AuthNoPriv
- -2 : use snmp v2c
- -X, --privpass=PASSWD
- Priv password for snmpv3 (AuthPriv protocol)
- -L, --protocols=<authproto>,<privproto>
- <authproto> : Authentication protocol (md5|sha : default md5)
- <privproto> : Priv protocole (des|aes : default des)
- -p, --port=PORT
- SNMP port (Default 161)
- -n, --name=NAME
- Name of the process (regexp)
- No trailing slash !
- -r, --noregexp
- Do not use regexp to match NAME in description OID
- -f, --fullpath
- Use full path name instead of process name
- (Windows doesn't provide full path name)
- -A, --param
- Add parameters to select processes.
- ex : "named.*-t /var/named/chroot" will only select named process with this parameter
- -F, --perfout
- Add performance output
- outputs : memory_usage, num_process, cpu_usage
- -w, --warn=MIN[,MAX]
- Number of process that will cause a warning
- -1 for no warning, MAX must be >0. Ex : -w-1,50
- -c, --critical=MIN[,MAX]
- number of process that will cause an error (
- -1 for no critical, MAX must be >0. Ex : -c-1,50
- Notes on warning and critical :
- with the following options : -w m1,x1 -c m2,x2
- you must have : m2 <= m1 < x1 <= x2
- you can omit x1 or x2 or both
- -m, --memory=WARN,CRIT
- checks memory usage (default max of all process)
- values are warning and critical values in Mb
- -a, --average
- makes an average of memory used by process instead of max
- -u, --cpu=WARN,CRIT
- checks cpu usage of all process
- values are warning and critical values in % of CPU usage
- if more than one CPU, value can be > 100% : 100%=1 CPU
- -d, --delta=seconds
- make an average of <delta> seconds for CPU (default 300=5min)
- -g, --getall
- In some cases, it is necessary to get all data at once because
- process die very frequently.
- This option eats bandwidth an cpu (for remote host) at breakfast.
- -o, --octetlength=INTEGER
- max-size of the SNMP message, usefull in case of Too Long responses.
- Be carefull with network filters. Range 484 - 65535, default are
- usually 1472,1452,1460 or 1440.
- -t, --timeout=INTEGER
- timeout for SNMP in seconds (Default: 5)
- -V, --version
- prints version number
- Note :
- CPU usage is in % of one cpu, so maximum can be 100% * number of CPU
- example :
- Browse process list : <script> -C <community> -H <host> -n <anything> -v
- the -n option allows regexp in perl format :
- All process of /opt/soft/bin : -n /opt/soft/bin/ -f
- All 'named' process : -n named
-
-

-
-
-

This project is hosted on :
- SourceForge.net Logo -

-

Nagios and the Nagios logo are registered - trademarks of Ethan Galstad.

-
-
-

 

- - - - - - - - - diff --git a/plugins/doc/snmp_storage.html b/plugins/doc/snmp_storage.html deleted file mode 100755 index 5fff6f9..0000000 --- a/plugins/doc/snmp_storage.html +++ /dev/null @@ -1,1330 +0,0 @@ - - - - - - - - -Nagios plugins - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Home

- - - -
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Snmp storage check
- - - -

Script : check_snmp_storage.pl

- - - -

Last update : Jun 09 2007

- - - -
- - - -

Description :

- - - -

This scripts checks by snmp (V1 and v3) disks, - - memory, swap, everthing in hrStorage table.
- - Storages selection can be done :
- - - by perl regexp on description or index (-m)
- - - and (optional) by storage type (-q) : Other, Ram, VirtualMemory, - - FixedDisk, RemovableDisk, FloppyDisk, CompactDisk, RamDisk, FlashMemory, - - NetworkDisk
- -
- - One or multiple storages can be selected.
- - It is also possible to sum all selected storages (-s)
- -
- - Warning and critical levels can be checked based on :
- - - Percent of disk used
- - - Percent of disk left
- - - MB left
- - - MB used

- -

Output options (-S):

- -

-S can have 3 options : <type>[,<where>,<cut>]
- - <type> : Make the output shorter :
- - 0 : only print the global result except the disk in warning or critical
- - 1 : Don't print all info for every disk
- - <where> : (optional) if = 1, put the OK/WARN/CRIT at - - the beginning
- - <cut> : take the <n> first caracters or <n> - - last if n<0

- -

With the following disks : /home : 51% used - - and / : 90% used

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Option usedWarningOutput
 99%/home: 51%used(1012MB/1969MB) - - /: 90%used(5781MB/6390MB) (<99%) : OK
 90%/home: 51%used(1012MB/1969MB) - - /: 90%used(5781MB/6390MB) (>90%) : WARNING
-S090%All selected storages (<99%) - - : OK
-S099%/: 90%used(5781MB/6390MB) - - (>90%) : WARNING
-S190%/home: 51% /: 90% (<99%) - - : OK
-S199%/home: 51% /: 90%used(5781MB/6390MB) - - (>90%) : WARNING
-S0,190%OK : (<99%) All - - selected storages
-S0,190%WARNING : (>90%) - - /: 90%used(5781MB/6390MB)
-S1,,299%/h: 51% /: 90% (<99%) - - : OK
-S1,,-299%me: 51% /: 90% (<99%) - - : OK
-S0,1,-230%WARNING : (>30%) me: 51%used(1012MB/1969MB) - - /: 90%used(5781MB/6390MB)
- -

Performance output (-f - option)

-

The performance will remove any weird caracters - ( `~!$%^&*'"<>|?,(= ) ) from the drive name.

-

Msg size option (-o option)

-

In case you get a "ERROR: running table - : Message size exceeded maxMsgSize" error, you may need to - adjust the maxMsgSize, i.e. the maximum size of snmp message with - the -o option. Try a value with the -o AND the -v option : the script - will output the actual value so you can add some octets to it with - the -o option.

-

SNMP Login
-

-

See snmp info page

- -

---
- Vérifie par snmp v1 ou v3 l'occupation des disques, mais aussi de - la swap, de la mémoire, etc.. tout ce qui est disponible en snmp - par la table hrStorage.
- - Les disques sont sélectionnables par expression régulière - - compatible Perl
- -

- -

Requirements :

- - - -

- Perl in /usr/bin/perl - or just run 'perl - - - - script'
- - - - - Net::SNMP
- - - - - file 'utils.pm' in plugin diretory (/usr/local/icinga/libexec)
- - - -

- - - -

Dowload - lastest version : 1.3.3

- - - -

Configurations - - - - examples

- - - -

Changelog - : On CVS repository on sourceforge : http://nagios-snmp.cvs.sourceforge.net/nagios-snmp/plugins/.
-

- - - -

Examples :

- - - -


- - - - All examples below are considering the script is local directory. - - - - Host to be checked is 127.0.0.1 with snmp community "public".

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - -

Get help - - - -

- - - -

./check_snmp_storage.pl -h

- - - -
List all storage./check_snmp_storage.pl -H - - - - 127.0.0.1 -C public -m zzzz -w 80 -c 81 -v
snmpv3 login./check_snmp_storage.pl -H - - - - 127.0.0.1 -l login -x passwd
- - - -

- - - -

- - - -

Unix/Linux

- - - -
- - - -

%used of /home is less than 80% and 90% - - - -

- - - -

./check_snmp_storage.pl -H 127.0.0.1 -C public -m /home - - - - -w 80% -c 90%

- - - -
- - - -

%free of /home is above 10% and 5% - - - -

- - - -

./check_snmp_storage.pl -H 127.0.0.1 -C public -m /home -w - - - - 10% -c 5% -T pl

- - - -
- - - -

Mb used of /home is less than 800 Mb and 900 Mb - - - -

- - - -

./check_snmp_storage.pl -H 127.0.0.1 -C public -m /home - - - - -w 800 -c 900 -T bu

- - - -
- - - -

Mb free of /home is above 100Mb and 30Mb - - - -

- - - -

./check_snmp_storage.pl -H 127.0.0.1 -C public -m /home - - - - -w 100 -c 30 -T bl

- - - -
- - - -

All mountpoints have %used less than 80% and 90% - - - -

- - - -

./check_snmp_storage.pl -H 127.0.0.1 -C public -m / -w - - - - 80% -c 90%

- - - -
%used of / - - - - mountpoint only is less than 80% and 90% - - - -

./check_snmp_storage.pl -H 127.0.0.1 -C public -m / -r - - - - -w 80% -c 90%

- - - -
%used of mountpoint - - - - index 1 only is less than 80% and 90% - - - -

./check_snmp_storage.pl -H 127.0.0.1 -C public -m 1 -p - - - - -w 80% -c 90%

- - - -
Swap %used - - - - is less than 80% and 90% - - - -

./check_snmp_storage.pl -H 127.0.0.1 -C public -m Swap - - - - -w 80% -c 90%

- - - -
Memory %used - - - - is less than 80% and 90% - - - -

./check_snmp_storage.pl -H 127.0.0.1 -C public -m "Real - - - - Memory" -w 80% -c 90%

- - - -
  - - - -

Windows

- - - -
%used of C - - - - is less than 80% and 90% - - - -

./check_snmp_storage.pl -H 127.0.0.1 -C public -m ^C: - - - - -w 80% -c 90%

- - - -
%used of C, - - - - D and E is less than 80% and 90% - - - -

./check_snmp_storage.pl -H 127.0.0.1 -C public -m ^[CDE]: - - - - -w 80% -c 90%

- - - -
%used of C+D+E - - - - is less than 80% and 90% - - - -

./check_snmp_storage.pl -H 127.0.0.1 -C public -m ^[CDE]: - - - - -s -w 80% -c 90%

- - - -
  - - - -

AS/400 specific

- - - -
Sum of all - - - - memory storages is less than 90% and 95% - - - -

./check_snmp_storage.pl -H 127.0.0.1 -C public -m RAM - - - - -s -w 80% -c 90%

- - - -
- - - -

Output of check_snmp_storage.pl -h

- - - - - - - - - - - - - - - - - -
-

SNMP Disk Monitor for Nagios version 1.3.3
- (c)2004-2007 Patrick Proy

-

Usage: check_snmp_storage [-v] -H <host> -C <snmp_community> [-2] | (-l login -x passwd [-X pass -L <authp>,<privp>]) [-p <port>] -m <name in desc_oid> [-q storagetype] -w <warn_level> -c <crit_level> [-t <timeout>] [-T pl|pu|bl|bu ] [-r -s -i -G] [-e] [-S 0|1[,1,<car>]] [-o <octet_length>] [-R <% reserved>]
- By default, plugin will monitor %used on drives :
- warn if %used > warn and critical if %used > crit
- -v, --verbose
- print extra debugging information (and lists all storages)
- -h, --help
- print this help message
- -H, --hostname=HOST
- name or IP address of host to check
- -C, --community=COMMUNITY NAME
- community name for the host's SNMP agent (implies SNMP v1)
- -2, --v2c
- Use snmp v2c
- -l, --login=LOGIN ; -x, --passwd=PASSWD
- Login and auth password for snmpv3 authentication
- If no priv password exists, implies AuthNoPriv
- -X, --privpass=PASSWD
- Priv password for snmpv3 (AuthPriv protocol)
- -L, --protocols=<authproto>,<privproto>
- <authproto> : Authentication protocol (md5|sha : default md5)
- <privproto> : Priv protocole (des|aes : default des)
- -x, --passwd=PASSWD
- Password for snmpv3 authentication
- -p, --port=PORT
- SNMP port (Default 161)
- -m, --name=NAME
- Name in description OID (can be mounpoints '/home' or 'Swap Space'...)
- This is treated as a regexp : -m /var will match /var , /var/log, /opt/var ...
- Test it before, because there are known bugs (ex : trailling /)
- No trailing slash for mountpoints !
- -q, --storagetype=[Other|Ram|VirtualMemory|FixedDisk|RemovableDisk|FloppyDisk
- CompactDisk|RamDisk|FlashMemory|NetworkDisk]
- Also check the storage type in addition of the name
- It is possible to use regular expressions ( "FixedDisk|FloppyDisk" )
- -r, --noregexp
- Do not use regexp to match NAME in description OID
- -s, --sum
- Add all storages that match NAME (used space and total space)
- THEN make the tests.
- -i, --index
- Parse index table instead of description table to select storage
- -e, --exclude
- Select all storages except the one(s) selected by -m
- No action on storage type selection
- -T, --type=TYPE
- pl : calculate percent left
- pu : calculate percent used (Default)
- bl : calculate MegaBytes left
- bu : calculate MegaBytes used
- -w, --warn=INTEGER
- percent / MB of disk used to generate WARNING state
- you can add the % sign
- -c, --critical=INTEGER
- percent / MB of disk used to generate CRITICAL state
- you can add the % sign
- -R, --reserved=INTEGER
- % reserved blocks for superuser
- For ext2/3 filesystems, it is 5% by default
- -G, --gigabyte
- output, warning & critical levels in gigabytes
- -f, --perfparse, --perfdata
- Performance data output
- -S, --short=<type>[,<where>,<cut>]
- <type>: Make the output shorter :
- 0 : only print the global result except the disk in warning or critical
- ex: "< 80% : OK"
- 1 : Don't print all info for every disk
- ex : "/ : 66 %used (< 80) : OK"
- <where>: (optional) if = 1, put the OK/WARN/CRIT at the beginning
- <cut>: take the <n> first caracters or <n> last if n<0
- -o, --octetlength=INTEGER
- max-size of the SNMP message, usefull in case of Too Long responses.
- Be carefull with network filters. Range 484 - 65535, default are
- usually 1472,1452,1460 or 1440.
- -t, --timeout=INTEGER
- timeout for SNMP in seconds (Default: 5)
- -V, --version
- prints version number
- Note :
- with T=pu or T=bu : OK < warn < crit
- with T=pl ot T=bl : crit < warn < OK
-
- If multiple storage are selected, the worse condition will be returned
- i.e if one disk is critical, the return is critical
-
- example :
- Browse storage list : <script> -C <community> -H <host> -m <anything> -w 1 -c 2 -v
- the -m option allows regexp in perl format :
- Test drive C,F,G,H,I on Windows : -m ^[CFGHI]:
- Test all mounts containing /var : -m /var
- Test all mounts under /var : -m ^/var
- Test only /var : -m /var -r
- Test all swap spaces : -m ^Swap
- Test all but swap spaces : -m ^Swap -e
-

-


-

- - - -
- - - -

This project is hosted on :
- - - - SourceForge.net Logo - - - -

- - - -

Nagios and the Nagios logo are registered - - - - trademarks of Ethan Galstad.

- - - -
- - - -
- - - -

 

- - - - - - - - - - - - - - - diff --git a/plugins/doc/snmp_vrrp.html b/plugins/doc/snmp_vrrp.html deleted file mode 100755 index 66e37be..0000000 --- a/plugins/doc/snmp_vrrp.html +++ /dev/null @@ -1,358 +0,0 @@ - - - - -Nagios plugins - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Home

- -
- - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Snmp vrrp check
- -

Script : check_snmp_vrrp.pl

- -

Last update : Sept 4 2006

- -
- -

Description :

- -

Checks by snmp v1, v2c or v3 the vrrp status - of all vrrp enabled interfaces.
- Works on
- - Nokia IP with ipso 3.X , 4.X in VRRP mode.
- - Nokia IP with ipso 3.X , 4.X in clustering mode.
- - Radware Linkproof
- - Alteon AD4 Loadbalancers

-

Depending on the state you put as option ("master" - or "backup") the script will get all the vrrp enables - interface and check they are in this state.
- If not, it will retrun a critical status
- By default, it will check Nokia IP platforms using vrrp, you can - test other platforms with the '-T' option :
-
- - Alteon
- - Linkproof (VRRP)
- - Nokia clustering.

-

Nokia clustering check

-

Nokia clustering check does not have a master - & backup state. Instead, the plugin will check :

-

- The number of cluster member
- - The % load on each cluster.

-

For example -s 2,90 will issue
- - A critical level if there is not 2 members.
- - A warning level if more than 90% is assigned to one cluster member.

-

To have a long output, put the '-g' option.

- -

SNMP Login
-

-

See snmp info page

-

French : - Vérifie par snmp v1 ou v3 l'état des interfaces vrrp : Nokia, - Linkproof, Altéon ou l'état d'un cluster Nokia.

- -

Requirements :

- -

- Perl in /usr/bin/perl - or just run 'perl - - script'
- - - Net::SNMP
- - - file 'utils.pm' in plugin diretory
- -

- -

Dowload - lastest version : 1.3

- -

Configurations - - examples

- -

Examples :

- -


- - All examples below are considering the script is local directory. - - Host to be checked is 127.0.0.1 with snmp community "public".

- -

If multiple interfaces are selected, all must - - be up to get an OK result

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-

Get help -

-

./check_snmp_vrrp.pl -h

-
snmpv3 login./check_snmp_vrrp.pl -H 127.0.0.1 - -l login -x passwd
-

Check vrrp state of a node to be master. -

-

./check_snmp_vrrp.pl -H 127.0.0.1 -C public -s master

-
-
-

Output example :
- The ouput is : <vrid>(<state>,<status>,<priority>) -

-
-
Vrid : 10(master/up/100), - 1(master/up/100), 3(master/up/100), 2(master/up/100), : All - master :OK
Check vrrp state - of a node to be backup. ./check_snmp_vrrp.pl -H 127.0.0.1 - -C public -s backup
-

Output example : -

-

Vrid : 1(backup/up/95), 3(backup/up/95), 10(backup/up/95), - 2(backup/up/95), : All backup :OK

-
Test a Linkproof./check_snmp_vrrp.pl -H 127.0.0.1 - -C public -s master -T lp
Test a Nokia - cluster : 2 cluster members and max 90% load assigned to one - cluster. ./check_snmp_vrrp.pl -H 127.0.0.1 - -C public -s 2,90%-T ipso
- -

Changelog - : On CVS repository on sourceforge : http://nagios-snmp.cvs.sourceforge.net/nagios-snmp/plugins/.

- -

Output of check_snmp_vrrp.pl -h

- - - - - - - - - -
-

SNMP VRRP Monitor for Nagios version - 1.3
- (c)2004-2006 to my cat Ratoune - Author : Patrick Proy -

Usage: ./check_snmp_vrrp.pl [-v] -H <host> -C <snmp_community> - [-2] | (-l login -x passwd [-X pass -L <authp>,<privp>]) - -s <master|backup|num,%> [-T <nokia|alteon|lp|nsc|ipsocluster>] - [-p <port>] [-t <timeout>] [-V]
- -v, --verbose
- print extra debugging information (including interface list - on the system)
- -h, --help
- print this help message
- -H, --hostname=HOST
- name or IP address of host to check
- -C, --community=COMMUNITY NAME
- community name for the host's SNMP agent (implies v1 protocol)
- -2, --v2c
- Use snmp v2c
- -l, --login=LOGIN ; -x, --passwd=PASSWD
- Login and auth password for snmpv3 authentication
- If no priv password exists, implies AuthNoPriv
- -X, --privpass=PASSWD
- Priv password for snmpv3 (AuthPriv protocol)
- -L, --protocols=<authproto>,<privproto>
- <authproto> : Authentication protocol (md5|sha : default - md5)
- <privproto> : Priv protocole (des|aes : default des) -
- -P, --port=PORT
- SNMP port (Default 161)
- -T, --type=<nokia|alteon|lp|nsc|ipso>
- Type of vrrp router to check
- nokia (default) : Nokai vrrp. Should be working for most vrrp - routers
- alteon : for Alteon AD4 Loadbalancers
- lp : Radware Linkproof
- nsc : Nescreen (ScreenOS 5.x NSRP)
- ipso : Nokia IPSO clustering
- -s, --state=master|backup|num,%
- Nokia ipso clustering : number of members, max % assigned - to nodes.
- Other : check vrrp interface to be master or backup
- -g, --long
- Make output long even is all is OK
- -t, --timeout=INTEGER
- timeout for SNMP in seconds (Default: 5)
- -V, --version
- prints version number

-
- -
- -

This project is hosted on :
- - SourceForge.net Logo - -

- -

Nagios and the Nagios logo are registered - - trademarks of Ethan Galstad.

- -
- -
- -

 

- - - - - - - - - - - diff --git a/plugins/doc/snmp_windows.html b/plugins/doc/snmp_windows.html deleted file mode 100755 index 4a8f513..0000000 --- a/plugins/doc/snmp_windows.html +++ /dev/null @@ -1,261 +0,0 @@ - - -Nagios plugins - - - - - - - - - -
- - - - - - - - - - - - - - -
Home

-
- -
- - - - - - - - - - - - - -
Snmp windows check
-

Script : check_snmp_win.pl

-

Last update : Jan 11 2007

-
-

Description :

-

Checks by snmp v1 or v3 windows specific health - monitoring (service state for now).
-
- Works on Windows server (2000, 2003) maybe XP and NT.

-

Vérifie par snmp v1 ou v3 si un(des) service - Windows tournent.
-
- Service checks
-

-

The plugin checks if there if the Windows service(s) - he gets as input are running.
- You can provide multiple services, comma separated :
- -n <service1>,<service2>

-

The script will return :
- OK : if <service1> is found (and active) and <service2> - is found (and active).
- WARNING : if <service1> and <service2> match more - than 2 active services.
- CRITICAL : if <service1> OR <service2> don't match any - active service.

-

-N <number> : will return OK if - <number> of active services matches the filter

-

-s : will show all active services instead - of the non active ones only

-

Requirements :

-

- Perl in /usr/bin/perl - or just run 'perl - script'
- - Net::SNMP
- - file 'utils.pm' in plugin diretory
-

-

Dowload - latest version : 0.6

-

Configurations - examples

-

Examples :

-


- All examples below are considering the script is local directory. - Host to be checked is 127.0.0.1 with snmp community "public".

-

If multiple interfaces are selected, all must - be up to get an OK result

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-

Get help -

-

./check_snmp_win.pl -h

-
snmpv3 login./check_snmp_win.pl -H 127.0.0.1 - -l login -x passwd
-

Check if at least one process matching dns is running -

-

./check_snmp_win.pl -H 127.0.0.1 -C public -n dns

-
-

Result example : -

-

1 services active (matching "dns") : OK

-
-

Check if at least 3 process matching dns are running -

-

./check_snmp_win.pl -H 127.0.0.1 -C public -n http -N - 2

-
-
Result example :
- (<=2 will return warning, 0 critical)
-
1 services active (matching - "dns") : CRITICAL
Check if dns - and ssh services are running./check_snmp_win.pl -H 127.0.0.1 - -C public -n dns,ssh
-

Result example :

-
"dns" active, "ssh" - active : OK
Check if dns - and toto services are running./check_snmp_win.pl -H 127.0.0.1 - -C public -n dns,toto
-
Result example :
-
"toto" not active - : CRITICAL
-

 

-

Changelog - : On CVS repository on sourceforge : http://nagios-snmp.cvs.sourceforge.net/nagios-snmp/plugins/.
-

-

Output of check_snmp_win.pl -h

- - - - -
-

SNMP Windows Monitor for Nagios version 0.6
- GPL licence, (c)2004-2005 Patrick Proy

-

Usage: check_snmp_win [-v] -H <host> -C <snmp_community> - [-2] | (-l login -x passwd) [-p <port>] -n <name>[,<name2] - [-T=service] [-r] [-s] [-N=<n>] [-t <timeout>] - [-V]
- -v, --verbose
- print extra debugging information (and lists all services)
- -h, --help
- print this help message
- -H, --hostname=HOST
- name or IP address of host to check
- -C, --community=COMMUNITY NAME
- community name for the host's SNMP agent (implies SNMP v1 - or v2c with option)
- -2, --v2c
- Use snmp v2c
- -l, --login=LOGIN
- Login for snmpv3 authentication (implies v3 protocol with - MD5)
- -x, --passwd=PASSWD
- Password for snmpv3 authentication
- -p, --port=PORT
- SNMP port (Default 161)
- -T, --type=service
- Check type :
- - service (default) checks service
- -n, --name=NAME[,NAME2...]
- Comma separated names of services (perl regular expressions - can be used for every one).
- By default, it is not case sensitive.
- -N, --number=<n>
- Compare matching services with <n> instead of the number - of names provided.
- -s, --showall
- Show all services in the output, instead of only the non-active - ones.
- -r, --noregexp
- Do not use regexp to match NAME in service description.
- -t, --timeout=INTEGER
- timeout for SNMP in seconds (Default: 5)
- -V, --version
- prints version number
- Note :
- The script will return
- OK if ALL services are in active state,
- WARNING if there is more than specified (ex 2 service specified, - 3 active services matching),
- CRITICAL if at least one of them is non active.
- The -n option will allows regexp in perl format
- -n "service" will match 'service WINS' 'sevice DNS' - etc...
- It is not case sensitive by default : WINS = wins

-
-
-

This project is hosted on :
- SourceForge.net Logo -

-

Nagios and the Nagios logo are registered - trademarks of Ethan Galstad.

-
-
-

 

- - - - - From be48e7215c349f6b0d566a4eba58d64e36d57558 Mon Sep 17 00:00:00 2001 From: Michael Friedrich Date: Thu, 12 Oct 2017 15:40:36 +0200 Subject: [PATCH 2/2] Enhance the documentation and apply doc/*.md structure README.md applies the common structure known from Icinga Web 2 modules. doc/ contains about, installation, configuration and plugins. This includes several configuration examples for Icinga 2. This commit also re-adds the LICENSE file now mentioned in README.md --- LICENSE | 280 +++++++++++++ README.md | 84 ++-- doc/01-About.md | 30 ++ doc/02-Installation.md | 56 +++ doc/03-Configuration.md | 104 +++++ doc/04-Plugins.md | 891 ++++++++++++++++++++++++++++++++++++++++ 6 files changed, 1415 insertions(+), 30 deletions(-) create mode 100644 LICENSE create mode 100644 doc/01-About.md create mode 100644 doc/02-Installation.md create mode 100644 doc/03-Configuration.md create mode 100644 doc/04-Plugins.md diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..8420802 --- /dev/null +++ b/LICENSE @@ -0,0 +1,280 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS diff --git a/README.md b/README.md index e23c4e6..6d132a8 100644 --- a/README.md +++ b/README.md @@ -1,17 +1,52 @@ # Manubulon SNMP Plugins -## General information +#### Table of Contents + +1. [About](#about) +2. [License](#license) +3. [Support](#support) +4. [Requirements](#requirements) +5. [Installation](#installation) +6. [Configuration](#configuration) +7. [FAQ](#faq) +8. [Thanks](#thanks) +9. [Contributing](#contributing) + +## About Manubulon SNMP plugins is a set of Icinga/Nagios plugins -to check hosts/devices using the SNMP protocol. Check -[http://nagios.manubulon.com](http://nagios.manubulon.com) for more details. +to check hosts/devices using the SNMP protocol. + +### Plugin Overview + +Plugin | Description +------------------------------|---------------------------------------- +check\_snmp\_storage | Storage checks (disks, swap, memory, etc.) +check\_snmp\_int | Interface states, usage on hosts, switches, routers, etc. +check\_snmp\_process | Running processes, their number, used CPU and memory. +check\_snmp\_load | Load/CPU checks +check\_snmp\_mem | Memory and swap usage +check\_snmp\_env | Environmental status of fan, temp, power supplies. +check\_snmp\_vrrp | Interface state of a VRRP cluster +check\_snmp\_cpfw | Checkpoint Firewall-1 status +check\_snmp\_win | Windows services +check\_snmp\_css | CSS service states +check\_snmp\_nsbox | Nsbox VHost and diode status +check\_snmp\_boostedge | Boostedge services +check\_snmp\_linkproof\_ndr | Linkproof NHR + +## License + +These plugins are licensed under the terms of the GNU General Public License. +You will find a copy of this license in the LICENSE file included in the source package. -This is a fork using a [cvs2git import](http://sourceforge.net/projects/nagios-snmp/develop) which includes community patches. +## Support -The original project was last active in 2007 so this project -helps collect all patches and feature requests. +Join the [Icinga community channels](https://www.icinga.com/about/get-involved/) for questions. -Feel free to use & distribute it under the original license. +If you want to help maintain this project, just contact +me on [twitter](https://twitter.com/dnsmichi) and I'll +happily grant commit access. ## Requirements @@ -25,41 +60,30 @@ Feel free to use & distribute it under the original license. [Crypt::Rijndael](http://search.cpan.org/~leont/Crypt-Rijndael-1.13/Rijndael.pm) and [Digest::HMAC](http://search.cpan.org/~gaas/Digest-HMAC-1.03/lib/Digest/HMAC.pm) -Distribution-specific packages: -* Debian/Ubuntu: `libnet-snmp-perl` and `libcrypt-des-perl libcrypt-rijndael-perl libdigest-hmac-perl` -* RHEL/CentOS: `perl-Net-SNMP perl-Getopt-Long` and `perl-Crypt-DES perl-Crypt-Rijndael perl-Digest-HMAC` +## Installation -Perl, default directory and temp files location can be changed using the install.sh script. +Detailed installation instructions can be found [here](doc/02-Installation.md). -`utils.pm` from `Monitoring::Plugin::Perl` is no longer required. +## Configuration -## Documentation +Proceed [here](doc/03-Configuration.md) to get details on the configuration with Icinga 2, Icinga 1.x, etc. -The original documentation and sourcecode is located at -[http://nagios.manubulon.com](http://nagios.manubulon.com). -A website copy was added underneath the `doc/` directory. +## FAQ -## Support - -You may create [GitHub issues](https://github.com/dnsmichi/manubulon-snmp) -as well. I do have a lot of things on my plate so best is to send in a tested (!) patch at the same time. - -If you want to help maintain this project, just contact -me on [twitter](https://twitter.com/dnsmichi) and I'll -happily grant commit access. -You may head over to [monitoring-portal.org community](http://www.monitoring-portal.org) -for questions and feedback. +## Thanks -The original support tracker is still located on [sourceforge](https://sourceforge.net/p/nagios-snmp/feature-requests/). +Patrick Proy for creating and maintaining the original plugins. -## Development +## Contributing -Fork this repository on Github and send in a PR. +Fork this repository on GitHub and send in a PR. There's a `.perltidyrc` file in the main repository tree. If you are uncertain about the coding style, create your patch and then run: - $ perltidy -b plugins/*.pl +``` +$ perltidy -b plugins/*.pl +``` This requires the `perltidy` module being installed. diff --git a/doc/01-About.md b/doc/01-About.md new file mode 100644 index 0000000..f36c62e --- /dev/null +++ b/doc/01-About.md @@ -0,0 +1,30 @@ +# About Manubulon SNMP Plugins + +Manubulon SNMP plugins is a set of Icinga/Nagios plugins +to check hosts/devices using the SNMP protocol. + +Please find more insights in the following chapters: + +* [Installation](02-Installation.md) +* [Configuration](03-Configuration.md) +* [Plugins](04-Plugins.md) + + + +## History + +These plugins have been written by Patrick Proy several years ago. + +Many community members still use them, but development and patches +stopped. + +I've used these plugins in my previous job, and decided to fork them +into this repository. Many patches have been applied, and put into +official releases for packagers. + +This is reflected by moving each plugin into a v2.x version although +there are not so many changes. + +I don't have a test system/hardware nor do much with these plugins these days. +Still this repository allows community members to send in their patches +and discuss bugs and feature requests. diff --git a/doc/02-Installation.md b/doc/02-Installation.md new file mode 100644 index 0000000..171abfd --- /dev/null +++ b/doc/02-Installation.md @@ -0,0 +1,56 @@ +# Manubulon SNMP Plugins Installation + +The plugins rely on the `Net::SNMP` Perl library for fetching +data from SNMP enabled hosts. + +## Prerequisites + +### RHEL/CentOS EPEL Repository + +RHEL/CentOS requires the EPEL repository: + +``` +yum -y install epel-release +yum makecache +``` + +If you are using RHEL you need enable the `optional` repository and then install +the [EPEL rpm package](https://fedoraproject.org/wiki/EPEL#How_can_I_use_these_extra_packages.3F). + +## Perl Dependencies + +Debian/Ubuntu: + +``` +apt-get -y install libnet-snmp-perl libcrypt-des-perl libcrypt-rijndael-perl libdigest-hmac-perl +``` + +RHEL/CentOS/Fedora: + +``` +yum -y install perl-Net-SNMP perl-Getopt-Long perl-Crypt-DES perl-Crypt-Rijndael perl-Digest-HMAC +``` + +## Plugin Setup + +Debian/Ubuntu: + +``` +install -o root -g root -m750 plugins/*.pl /usr/lib/nagios/plugins/ +``` +RHEL/CentOS/Fedora: + +``` +install -o root -g root -m750 plugins/*.pl /usr/lib64/nagios/plugins/ +``` + +Proceed with inspecting the plugins `--help` parameter in [this chapter](04-Plugins.md). + +Next up: Integrate the plugins into your monitoring by adding [configuration](03-Configuration.md). + +## Advanced Hints + +Perl, default directory and temp files location can be changed using the install.sh script. + +`utils.pm` from `Monitoring::Plugin::Perl` is no longer required. + diff --git a/doc/03-Configuration.md b/doc/03-Configuration.md new file mode 100644 index 0000000..699e6ee --- /dev/null +++ b/doc/03-Configuration.md @@ -0,0 +1,104 @@ +# Manubulon SNMP Plugins Configuration + +Each plugin requires a command definition which defines the command line parameters +and arguments passed from service checks. + +* [Icinga 2](03-Configuration.md#manubulon-snmp-plugins-configuration-icinga-2) integration +* [Icinga 1.x/Naemon/Nagios](03-Configuration.md#manubulon-snmp-plugins-configuration-icinga-1) integration + +## Icinga 2 + +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) +out of the box. This enables you to just use the CheckCommand object and focus +on your service apply rules. + +### Icinga 2: Best Practices + +Best practice is to store the credentials in a separate constant: + +``` +vim /etc/icinga2/constants.conf + +const ManubulonSnmpCommunity = "icingasnmpro" +``` + +Define a generic SNMP service template and set common attributes. + +``` +template Service "snmp-template" { + vars.snmp_community = ManubulonSnmpCommunity +} +``` +### Icinga 2: Apply Rules + + +Define service apply rules like this: + +``` +apply Service "snmp-memory" { + import "snmp-template" + check_command = "snmp-memory" + + vars.snmp_warn = "50,0" + vars.snmp_crit = "80,0" + + assign where "snmp" in host.groups +} + +apply Service "snmp-storage /var" { + import "snmp-template" + check_command = "snmp-storage" + + vars.snmp_warn = "50" + vars.snmp_crit = "80" + vars.snmp_storage_name = "/var" + + assign where "snmp" in host.groups +} + +apply Service "snmp-storage" { + import "snmp-template" + check_command = "snmp-storage" + + vars.snmp_warn = "50" + vars.snmp_crit = "80" + + assign where "snmp" in host.groups +} +``` + +### Icinga 2: Apply For Rules + +A more complex example using apply for rules is to store the +monitored storage disks on the host. This allows to generate +service objects in a more efficient way. + +``` +object Host "snmp-host" { + check_command = "hostalive" + + vars.snmp_storage["/"] = { + snmp_warn = "80" + snmp_crit = "90" + } + vars.snmp_storage["/var"] = { + snmp_warn = "60" + snmp_crit = "90" + } +} + +apply Service "snmp-storage-" for (storage_name => config in host.vars.snmp_storage) { + import "snmp-template" + + display_name = "Storage: " + storage_name + + vars += config + vars.snmp_storage_name = storage_name +} +``` + + +## Icinga 1.x/Naemon/Nagios + +You need to write a check command definition and use that in your service definitions. +Please refer to [this documentation](http://nagios.manubulon.com/index_commands.html). diff --git a/doc/04-Plugins.md b/doc/04-Plugins.md new file mode 100644 index 0000000..fb2ae8b --- /dev/null +++ b/doc/04-Plugins.md @@ -0,0 +1,891 @@ +# Manubulon SNMP Plugins + +## Plugin Overview + +Plugin | Description +----------------------------------------------------------------------|---------------------------------------- +[check_snmp_storage](04-Plugins.md#manubulon-snmp-plugins-storage) | Storage checks (disks, swap, memory, etc.) +[check_snmp_int](04-Plugins.md#manubulon-snmp-plugins-int) | Interface states, usage on hosts, switches, routers, etc. +[check_snmp_process](04-Plugins.md#manubulon-snmp-plugins-process) | Running processes, their number, used CPU and memory. +[check_snmp_load](04-Plugins.md#manubulon-snmp-plugins-load) | Load/CPU checks +[check_snmp_mem](04-Plugins.md#manubulon-snmp-plugins-mem) | Memory and swap usage +[check_snmp_env](04-Plugins.md#manubulon-snmp-plugins-env) | Environmental status of fan, temp, power supplies. +[check_snmp_vrrp](04-Plugins.md#manubulon-snmp-plugins-vrrp) | Interface state of a VRRP cluster +[check_snmp_cpfw](04-Plugins.md#manubulon-snmp-plugins-cpfw) | Checkpoint Firewall-1 status +[check_snmp_win](04-Plugins.md#manubulon-snmp-plugins-win) | Windows services +[check_snmp_css](04-Plugins.md#manubulon-snmp-plugins-css) | CSS service states +[check_snmp_nsbox](04-Plugins.md#manubulon-snmp-plugins-nsbox) | Nsbox VHost and diode status +[check_snmp_boostedge](04-Plugins.md#manubulon-snmp-plugins-hostedge) | Boostedge services +[check_snmp_linkproof_ndr](04-Plugins.md#manubulon-snmp-plugins-ndr) | Linkproof NHR + + +## check\_snmp\_storage + +``` +$ ./check_snmp_storage.pl --help + +SNMP Disk Monitor for Icinga/Nagios/Naemon/Shinken, Version 2.1.0 +(c)2004-2007 Patrick Proy + +Usage: check_snmp_storage [-v] -H -C [-2] | (-l login -x passwd [-X pass -L ,]) [-p ] [-P ] -m [-q storagetype] -w -c [-t ] [-T pl|pu|bl|bu ] [-r -s -i -G] [-e] [-S 0|1[,1,]] [-o ] [-R <% reserved>] +By default, plugin will monitor %used on drives : +warn if %used > warn and critical if %used > crit +-v, --verbose + print extra debugging information (and lists all storages) +-h, --help + print this help message +-H, --hostname=HOST + name or IP address of host to check +-C, --community=COMMUNITY NAME + community name for the host's SNMP agent (implies SNMP v1) +-2, --v2c + Use snmp v2c +-l, --login=LOGIN ; -x, --passwd=PASSWD + Login and auth password for snmpv3 authentication + If no priv password exists, implies AuthNoPriv +-X, --privpass=PASSWD + Priv password for snmpv3 (AuthPriv protocol) +-L, --protocols=, + : Authentication protocol (md5|sha : default md5) + : Priv protocole (des|aes : default des) +-x, --passwd=PASSWD + Password for snmpv3 authentication +-p, --port=PORT + SNMP port (Default 161) +-P, --protocol=PROTOCOL + Network protocol to be used + ['udp/ipv4'] : UDP over IPv4 + 'udp/ipv6' : UDP over IPv6 + 'tcp/ipv4' : TCP over IPv4 + 'tcp/ipv6' : TCP over IPv6 +-m, --name=NAME + Name in description OID (can be mounpoints '/home' or 'Swap Space'...) + This is treated as a regexp : -m /var will match /var , /var/log, /opt/var ... + Test it before, because there are known bugs (ex : trailling /) + No trailing slash for mountpoints ! +-q, --storagetype=[Other|Ram|VirtualMemory|FixedDisk|RemovableDisk|FloppyDisk + CompactDisk|RamDisk|FlashMemory|NetworkDisk] + Also check the storage type in addition of the name + It is possible to use regular expressions ( "FixedDisk|FloppyDisk" ) +-r, --noregexp + Do not use regexp to match NAME in description OID +-s, --sum + Add all storages that match NAME (used space and total space) + THEN make the tests. +-i, --index + Parse index table instead of description table to select storage +-e, --exclude + Select all storages except the one(s) selected by -m + No action on storage type selection +-T, --type=TYPE + pl : calculate percent left + pu : calculate percent used (Default) + bl : calculate MegaBytes left + bu : calculate MegaBytes used +-w, --warn=INTEGER + percent / MB of disk used to generate WARNING state + you can add the % sign +-c, --critical=INTEGER + percent / MB of disk used to generate CRITICAL state + you can add the % sign +-R, --reserved=INTEGER + % reserved blocks for superuser + For ext2/3 filesystems, it is 5% by default +-G, --gigabyte + output, warning & critical levels in gigabytes +-f, --perfparse, --perfdata + Performance data output +-S, --short=[,,] + : Make the output shorter : + 0 : only print the global result except the disk in warning or critical + ex: "< 80% : OK" + 1 : Don't print all info for every disk + ex : "/ : 66 %used (< 80) : OK" + : (optional) if = 1, put the OK/WARN/CRIT at the beginning + : take the first caracters or last if n<0 +-o, --octetlength=INTEGER + max-size of the SNMP message, usefull in case of Too Long responses. + Be carefull with network filters. Range 484 - 65535, default are + usually 1472,1452,1460 or 1440. +-t, --timeout=INTEGER + timeout for SNMP in seconds (Default: 5) +-V, --version + prints version number +Note : + with T=pu or T=bu : OK < warn < crit + with T=pl ot T=bl : crit < warn < OK + + If multiple storage are selected, the worse condition will be returned + i.e if one disk is critical, the return is critical + + example : + Browse storage list :