From 44a321cb8a42d6c0ea2d96a1086a17f2134c89cc Mon Sep 17 00:00:00 2001 From: Ethan Galstad Date: Thu, 28 Feb 2002 06:42:51 +0000 Subject: Initial revision git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@2 f882894a-f735-0410-b71e-b25c423dba1c diff --git a/.cvsignore b/.cvsignore new file mode 100644 index 0000000..96f4d1a --- /dev/null +++ b/.cvsignore @@ -0,0 +1,10 @@ +configure +debian +Makefile +Makefile.in +config.* +test.pl +subst +command.cfg +Cache.pm +build-* \ No newline at end of file diff --git a/AUTHORS b/AUTHORS new file mode 100644 index 0000000..8e7bfeb --- /dev/null +++ b/AUTHORS @@ -0,0 +1,12 @@ +Felipe Gustavo de Almeida +Ian Cass +Robert Dale +Karl DeBisschop +Ragnar Hojland Espinosa +Ethan Galstad +Bo Kersey +Pedro Leite +Richard Mayhew +Remi Paulmier +Didi Rieder +Tom Shields \ No newline at end of file diff --git a/CODING b/CODING new file mode 100644 index 0000000..9509391 --- /dev/null +++ b/CODING @@ -0,0 +1,38 @@ +The following guidelines are intended to aid programmers in creating +code that is consistent with the existing core plugins. + +The primary goals of these standards are internal consistency, and +readability in a wide range of environments. + +1. C Language Programming + +All code should comply with the requirements of the Free Software +Foundation Coding standards (which are currently available at +http://www.gnu.org/prep/standards_toc.html). We also follow most of +the FSF guidelines. Developers may suggest deviations from the FSF +style recommendations, which will be considered by open discussion on +the netsaintplug-devel mailing list. Any such deviations will apply to +the entire code base to ensure consistency. + +Currently, the exceptions to FSF recommendatios are roughly equivalent +to GNU indent with invoked as 'indent -ts 2 -br'. Specifically, the +exceptions are as follows: + +a) leading white space for a statement should be formatted as tabs, +with one tab for each code indentation level. + +b) in statement continuation lines, format whitespace up to the column +starting the statement as tabs, format the rest as spaces (this +results in code that is legible regardless of tab-width setting). + +c) with the exception of the above, tabs should generally be avoided + +d) when tab width is 2 spaces, line-length should not exceed 80 +characters + +e) The opening brace of an if or while block is on the same line as +the end of the conditional expression (the '-br' option). + +2. Perl Language Programming + + diff --git a/COPYING b/COPYING new file mode 100644 index 0000000..d60c31a --- /dev/null +++ b/COPYING @@ -0,0 +1,340 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 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 + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General +Public License instead of this License. diff --git a/ChangeLog b/ChangeLog new file mode 100644 index 0000000..c08f73a --- /dev/null +++ b/ChangeLog @@ -0,0 +1,2533 @@ +2000-12-08 karldebisschop + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_http.c, /cvsroot/netsaintplug/netsaintplug/plugins/utils.c: + fix memory leaks + +2000-12-07 karldebisschop + + * /cvsroot/netsaintplug/netsaintplug/contrib/check_qmailq.pl: + checks mail in queue (needs much work still) + + * /cvsroot/netsaintplug/netsaintplug/contrib/check_ftpget.pl: + tests fetching files from FTP server + +2000-12-02 karldebisschop + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_ldap.c: + password authentication patch, indent, standardize usage/help functions + + * /cvsroot/netsaintplug/netsaintplug/plugins/utils.h.in: + don't quote PROGNAME + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_http.c: + print pagesize on verbose flag + + * /cvsroot/netsaintplug/netsaintplug/plugins/utils.c: + strncat causes segv in RH6.2 + + * /cvsroot/netsaintplug/netsaintplug/configure.in: + more tweaks for mysql + + * /cvsroot/netsaintplug/netsaintplug/plugins/utils.h.in: typo in usage2 + + * /cvsroot/netsaintplug/netsaintplug/configure.in: + additional tweaks needed for mysql + + * /cvsroot/netsaintplug/netsaintplug/plugins/utils.h.in: + add usage2 macro + + * /cvsroot/netsaintplug/netsaintplug/plugins/utils.c: + use strncat in strscat + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_http.c: + fix recent bug in redirects + + * /cvsroot/netsaintplug/netsaintplug/configure.in: + loof for libs in /usr/lib/mysql as well + + * /cvsroot/netsaintplug/netsaintplug/plugins/t/check_fping.t: + test on nullhost may return warning or error + +2000-12-01 karldebisschop + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_dns.c: + typo - fix dns left trim on bind 9 + + * /cvsroot/netsaintplug/netsaintplug/ChangeLog: details for 1.2.9-beta3 + + * /cvsroot/netsaintplug/netsaintplug/package.def: 1.2.9-beta3 + + * /cvsroot/netsaintplug/netsaintplug/configure.in: + remove AC_MSG_WARN for openSSL (redundant) + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_http.c: + use size constants in preference to sizeof() + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_dns.c: + typo - chopped one ltoo many lead characters + + * /cvsroot/netsaintplug/netsaintplug/ChangeLog: 1.2.9-beta3 + + * /cvsroot/netsaintplug/netsaintplug/configure.in: + add argsument-array option to check_procs + + * /cvsroot/netsaintplug/netsaintplug/netsaint-plugins-custom.spec, /cvsroot/netsaintplug/netsaintplug/netsaint-plugins.spec, /cvsroot/netsaintplug/netsaintplug/plugins/version.h.in: + prepare for 1.2.9-beta3 + + * /cvsroot/netsaintplug/netsaintplug/plugins/netutils.c, /cvsroot/netsaintplug/netsaintplug/plugins/netutils.h.in, /cvsroot/netsaintplug/netsaintplug/plugins/utils.c, /cvsroot/netsaintplug/netsaintplug/plugins/utils.h.in: + move strip() to utils.c + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_procs.c: + add documentation for new argument-arry option + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_procs.c: + allow test against ARGS with -a switch + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_dns.c, /cvsroot/netsaintplug/netsaintplug/plugins/t/check_dns.t: + update for bind 9 + + * /cvsroot/netsaintplug/netsaintplug/contrib/check_rrd_data.pl: + checks RRD data (for use with cricket) + +2000-12-01 karldebisschop + + * /cvsroot/netsaintplug/netsaintplug/package.def: 1.2.9-beta3 + + * /cvsroot/netsaintplug/netsaintplug/configure.in: + remove AC_MSG_WARN for openSSL (redundant) + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_http.c: + use size constants in preference to sizeof() + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_dns.c: + typo - chopped one ltoo many lead characters + + * /cvsroot/netsaintplug/netsaintplug/ChangeLog: 1.2.9-beta3 + + * /cvsroot/netsaintplug/netsaintplug/configure.in: + add argsument-array option to check_procs + + * /cvsroot/netsaintplug/netsaintplug/netsaint-plugins-custom.spec, /cvsroot/netsaintplug/netsaintplug/netsaint-plugins.spec, /cvsroot/netsaintplug/netsaintplug/plugins/version.h.in: + prepare for 1.2.9-beta3 + + * /cvsroot/netsaintplug/netsaintplug/plugins/netutils.c, /cvsroot/netsaintplug/netsaintplug/plugins/netutils.h.in, /cvsroot/netsaintplug/netsaintplug/plugins/utils.c, /cvsroot/netsaintplug/netsaintplug/plugins/utils.h.in: + move strip() to utils.c + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_procs.c: + add documentation for new argument-arry option + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_procs.c: + allow test against ARGS with -a switch + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_dns.c, /cvsroot/netsaintplug/netsaintplug/plugins/t/check_dns.t: + update for bind 9 + + * /cvsroot/netsaintplug/netsaintplug/contrib/check_rrd_data.pl: + checks RRD data (for use with cricket) + +2000-12-01 karldebisschop + + * /cvsroot/netsaintplug/netsaintplug/configure.in: + add argsument-array option to check_procs + + * /cvsroot/netsaintplug/netsaintplug/netsaint-plugins-custom.spec, /cvsroot/netsaintplug/netsaintplug/netsaint-plugins.spec, /cvsroot/netsaintplug/netsaintplug/plugins/version.h.in: + prepare for 1.2.9-beta3 + + * /cvsroot/netsaintplug/netsaintplug/plugins/netutils.c, /cvsroot/netsaintplug/netsaintplug/plugins/netutils.h.in, /cvsroot/netsaintplug/netsaintplug/plugins/utils.c, /cvsroot/netsaintplug/netsaintplug/plugins/utils.h.in: + move strip() to utils.c + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_procs.c: + add documentation for new argument-arry option + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_procs.c: + allow test against ARGS with -a switch + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_dns.c, /cvsroot/netsaintplug/netsaintplug/plugins/t/check_dns.t: + update for bind 9 + + * /cvsroot/netsaintplug/netsaintplug/contrib/check_rrd_data.pl: + checks RRD data (for use with cricket) + +2000-11-30 karldebisschop + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_ping.c: + fix typo, indent + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_ping.c: + don't trigger warning for Redhat 7 ping output on stderr (Warning: no SO_TIMESTAMP support, falling back to SIOCGSTAMP) + +2000-11-28 karldebisschop + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_snmp.c: indent + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_http.c: + remove line continuations + +2000-11-18 karldebisschop + + * /cvsroot/netsaintplug/netsaintplug/plugins-scripts/check_disk_smb.pl: + add option for workgroups + +2000-11-17 karldebisschop + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_disk.c: + run `indent -ts2 -sob check_disk.c` + + * /cvsroot/netsaintplug/netsaintplug/plugins/common.h.in: + typo in #ifndef HAVE_STROL + +2000-11-16 karldebisschop + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_ssh.c: run indent + fix bugs on solaris + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_http.c: + run indent over code + use strscat function instaed on messy internal loop + fix a couple of things that should have been ifdef'd for REGEX + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_ping.c, /cvsroot/netsaintplug/netsaintplug/plugins/t/check_ping.t: + indent, use state_text() for output + + * /cvsroot/netsaintplug/netsaintplug/plugins/t/check_snmp.t, /cvsroot/netsaintplug/netsaintplug/plugins/check_snmp.c: + explicitly initialize eval_method array + +2000-11-15 hgayosso + + * /cvsroot/netsaintplug/netsaintplug/command.cfg.in: + Added examples for: check_reply and check_radius. + +2000-11-08 karldebisschop + + * /cvsroot/netsaintplug/netsaintplug/contrib/check_joy.sh: + checks joystick port + +2000-11-07 karldebisschop + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_real.c: fix segfault + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_snmp.c: + set label and units in validate() + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_ping.c: + automatically increase timeout if critical treshold is greater than crta + +2000-11-03 karldebisschop + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_tcp.c: + fis segfault looking for EOL on stripped line + +2000-10-25 karldebisschop + + * /cvsroot/netsaintplug/netsaintplug/ChangeLog: automatic update + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_ssh.c: cleanup + move a slight bit closer to SSH protocal compliance + needs much more work + +2000-10-25 karldebisschop + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_ssh.c: cleanup + move a slight bit closer to SSH protocal compliance + needs much more work + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_http.c: + change type of counter 'i' to int + allow = in url query string + +2000-10-11 karldebisschop + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_mrtg.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_mrtgtraf.c: + allow expiration to be optional + + * /cvsroot/netsaintplug/netsaintplug/netsaint-plugins-custom.spec, /cvsroot/netsaintplug/netsaintplug/netsaint-plugins.spec, /cvsroot/netsaintplug/netsaintplug/package.def: + prepare for beta 2 + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_overcr.c: + use new process_tcp_request2 throughtout + + * /cvsroot/netsaintplug/netsaintplug/plugins/netutils.c: + prototype for process_tcp_request2 + + * /cvsroot/netsaintplug/netsaintplug/plugins/netutils.h.in: + new process_tcp_request2 + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_overcr.c, /cvsroot/netsaintplug/netsaintplug/plugins/netutils.c: + add function to get multiple lines of data from recv() loop + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_mrtgtraf.c: + result was being improperly initialized + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_mrtg.c: + make consistent with check_mrtgtraf + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_snmp.c: + cleanup arrays for '-u' and '-l' options + +2000-10-10 karldebisschop + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_tcp.c: + fix count of expect strings + +2000-10-06 karldebisschop + + * /cvsroot/netsaintplug/netsaintplug/contrib/checkciscotemp.pl: + missing comma + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_tcp.c: + don't check output string content if there is no test string + + * /cvsroot/netsaintplug/netsaintplug/plugins/utils.h.in: + add a few comments + + * /cvsroot/netsaintplug/netsaintplug/command.cfg.in: + fix some line breaks, OID typos + + * /cvsroot/netsaintplug/netsaintplug/plugins/popen.c: + make sure cmd exists before runnin strstr + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_load.c: + cpp conditionals must be in consistent order + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_tcp.c: + additional fixes for munged multiple expect loop + +2000-10-02 karldebisschop + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_tcp.c: + fix bug in server expect code, due to bad logic in testing for + alternative expects for check_nntp + +2000-09-27 karldebisschop + + * /cvsroot/netsaintplug/netsaintplug/command.cfg.in: + fix some extraneous linefeeds + fix missing leading dots in a few SNMP OIDs + +2000-09-25 karldebisschop + + * /cvsroot/netsaintplug/netsaintplug/.cvsignore: + make a separate distrib directory to run 'make dist' + + * /cvsroot/netsaintplug/netsaintplug/ChangeLog: + 1.2.9 beta 11.2.9 beta 11.2.9 beta 11.2.9 beta 11.2.9 beta 11.2.9 beta 11.2.9 beta 11.2.9 beta 11.2.9 beta 1 + + * /cvsroot/netsaintplug/netsaintplug/plugins/popen.c: + set cmd to NULL when there are characters left, but they are all whitespace + +2000-09-24 karldebisschop + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_time.c, /cvsroot/netsaintplug/netsaintplug/plugins/t/check_time.t: + something funky in check_time failure mode -- remove tests for now + + * /cvsroot/netsaintplug/netsaintplug/plugins/popen.c, /cvsroot/netsaintplug/netsaintplug/plugins/utils.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_procs.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_swap.c: + fix possible buffer overflows revealed by libsafe + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_time.c: + give CRITICAL|WARNING on connect failures only if connect-time checking used + +2000-09-24 karldebisschop + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_time.c, /cvsroot/netsaintplug/netsaintplug/plugins/t/check_time.t: + something funky in check_time failure mode -- remove tests for now + + * /cvsroot/netsaintplug/netsaintplug/plugins/popen.c, /cvsroot/netsaintplug/netsaintplug/plugins/utils.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_procs.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_swap.c: + fix possible buffer overflows revealed by libsafe + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_time.c: + give CRITICAL|WARNING on connect failures only if connect-time checking used + +2000-09-21 karldebisschop + + * /cvsroot/netsaintplug/netsaintplug/aclocal.m4, /cvsroot/netsaintplug/netsaintplug/configure.in, /cvsroot/netsaintplug/netsaintplug/plugins/common.h.in, /cvsroot/netsaintplug/netsaintplug/plugins/getopt1.c, /cvsroot/netsaintplug/netsaintplug/plugins/getopt.c, /cvsroot/netsaintplug/netsaintplug/plugins/getopt.h, /cvsroot/netsaintplug/netsaintplug/plugins/Makefile.am: + provide getopt_long for those OS's that do not have it + +2000-09-20 karldebisschop + + * /cvsroot/netsaintplug/netsaintplug/plugins/t/check_time.t: + plugin now warns if server is not present + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_time.c: + trap connect errors before invalid time difference is returned + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_ssh.c: + strip line from server to remove EOL + use ssprintf to send proper length string to server + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_mrtgtraf.c: + a few fixes for help screens + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_mrtg.c: + fix missed token in reverse-compatibility mode + help was completely worng + +2000-09-18 karldebisschop + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_nntp.c: + look for error codes oonly at beginning of string + add option to switch to MODE READER + +2000-09-14 karldebisschop + + * /cvsroot/netsaintplug/netsaintplug/INSTALL: + Use list as primry contact, not Ethan + + * /cvsroot/netsaintplug/netsaintplug/INSTALL: Add preamble for CVS tree + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_ping.c: + add 'mdev' to output forms to scan + +2000-09-13 karldebisschop + + * /cvsroot/netsaintplug/netsaintplug/test.pl.in: + get path a little closer to working on solaris with build dirs + + * /cvsroot/netsaintplug/netsaintplug/plugins/t/check_dns.t, /cvsroot/netsaintplug/netsaintplug/plugins/t/check_procs.t: + print when test is unexpectedly successful + + * /cvsroot/netsaintplug/netsaintplug/plugins-scripts/t/check_rpc.t: + print better info on errors + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_http.c: + authentication for SSL + +2000-09-12 karldebisschop + + * /cvsroot/netsaintplug/netsaintplug/plugins/t/check_load.t, /cvsroot/netsaintplug/netsaintplug/plugins/t/check_mysql.t, /cvsroot/netsaintplug/netsaintplug/plugins/t/check_ping.t, /cvsroot/netsaintplug/netsaintplug/plugins/t/check_pop.t, /cvsroot/netsaintplug/netsaintplug/plugins/t/check_procs.t, /cvsroot/netsaintplug/netsaintplug/plugins/t/check_smtp.t, /cvsroot/netsaintplug/netsaintplug/plugins/t/check_snmp.t, /cvsroot/netsaintplug/netsaintplug/plugins/t/check_swap.t, /cvsroot/netsaintplug/netsaintplug/plugins/t/check_users.t, /cvsroot/netsaintplug/netsaintplug/plugins/t/check_vsz.t, /cvsroot/netsaintplug/netsaintplug/plugins/t/check_imap.t: + better nessages when errors are found + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_fping.c: cleanup + + * /cvsroot/netsaintplug/netsaintplug/plugins/t/check_fping.t: + tweaks for better operation on debian (still not right) + + * /cvsroot/netsaintplug/netsaintplug/plugins/t/check_dns.t: typo + + * /cvsroot/netsaintplug/netsaintplug/plugins/t/check_ftp.t, /cvsroot/netsaintplug/netsaintplug/plugins/t/check_hpjd.t, /cvsroot/netsaintplug/netsaintplug/plugins/t/check_tcp.t, /cvsroot/netsaintplug/netsaintplug/plugins/t/check_time.t, /cvsroot/netsaintplug/netsaintplug/plugins/t/check_disk.t, /cvsroot/netsaintplug/netsaintplug/plugins/t/check_dns.t, /cvsroot/netsaintplug/netsaintplug/plugins/t/check_fping.t: + print better messages on failure + +2000-09-11 karldebisschop + + * /cvsroot/netsaintplug/netsaintplug/ChangeLog: beta 1 + + * /cvsroot/netsaintplug/netsaintplug/netsaint-plugins-custom.spec, /cvsroot/netsaintplug/netsaintplug/netsaint-plugins.spec, /cvsroot/netsaintplug/netsaintplug/package.def: + 1.2.9-b11.2.9-b11.2.9-b11.2.9-b11.2.9-b11.2.9-b11.2.9-b11.2.9-b11.2.9-b1 + + * /cvsroot/netsaintplug/netsaintplug/plugins/t/check_time.t: + better output for error diagnosis + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_dig.c: + trim newline on on DOS/MAC as well + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_dig.c: + trim extra linefeed + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_time.c: + also allow commas for critical (AKA, fix my stupid ommision) + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_time.c: + accept comma as arglist separator + + * /cvsroot/netsaintplug/netsaintplug/plugins/t/check_dns.t, /cvsroot/netsaintplug/netsaintplug/plugins/t/check_fping.t, /cvsroot/netsaintplug/netsaintplug/plugins/t/check_ftp.t, /cvsroot/netsaintplug/netsaintplug/plugins/t/check_http.t, /cvsroot/netsaintplug/netsaintplug/plugins/t/check_tcp.t, /cvsroot/netsaintplug/netsaintplug/plugins/t/check_time.t, /cvsroot/netsaintplug/netsaintplug/plugins/t/check_udp.t: + don't check output when testing against nullhost or noserver + - there are just too many variants + +2000-09-11 karldebisschop + + * /cvsroot/netsaintplug/netsaintplug/netsaint-plugins-custom.spec, /cvsroot/netsaintplug/netsaintplug/netsaint-plugins.spec, /cvsroot/netsaintplug/netsaintplug/package.def: + 1.2.9-b1 + + * /cvsroot/netsaintplug/netsaintplug/plugins/t/check_time.t: + better output for error diagnosis + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_dig.c: + trim newline on on DOS/MAC as well + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_dig.c: + trim extra linefeed + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_time.c: + also allow commas for critical (AKA, fix my stupid ommision) + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_time.c: + accept comma as arglist separator + + * /cvsroot/netsaintplug/netsaintplug/plugins/t/check_dns.t, /cvsroot/netsaintplug/netsaintplug/plugins/t/check_fping.t, /cvsroot/netsaintplug/netsaintplug/plugins/t/check_ftp.t, /cvsroot/netsaintplug/netsaintplug/plugins/t/check_http.t, /cvsroot/netsaintplug/netsaintplug/plugins/t/check_tcp.t, /cvsroot/netsaintplug/netsaintplug/plugins/t/check_time.t, /cvsroot/netsaintplug/netsaintplug/plugins/t/check_udp.t: + don't check output when testing against nullhost or noserver + - there are just too many variants + + * /cvsroot/netsaintplug/netsaintplug/configure.in: test for openssl + + * /cvsroot/netsaintplug/netsaintplug/plugins/t/check_http.t: + don't check output string when testing nullhost + +2000-09-10 karldebisschop + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_http.c: + bug killing 'ssl' twice cause segfault + +2000-09-07 karldebisschop + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_dig.c: + decalaration was moved into autoconf + + * /cvsroot/netsaintplug/netsaintplug/plugins/popen.c: + solaris had problems with prototypes + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_ping.c: + typo in variable name + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_tcp.c: + add NNTP personality + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_snmp.c, /cvsroot/netsaintplug/netsaintplug/plugins/utils.c, /cvsroot/netsaintplug/netsaintplug/plugins/utils.h.in: + put strpcat and strpcpy into utils + + * /cvsroot/netsaintplug/netsaintplug/acconfig.h, /cvsroot/netsaintplug/netsaintplug/configure.in: + add detection for getopt_long function call + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_radius.c: + cahnges needed fro Navis radius + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_nntp.c: + by default only look for numeric codes, use server expect only when user specifies + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_disk.c: + show both long and short form for --help and --version + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_swap.c: + fix typo in warning note + show both long and short forn for --help and --version + + * /cvsroot/netsaintplug/netsaintplug/configure.in: + PS_RAW_COMMAND needs to look at full path + +2000-09-06 karldebisschop + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_ping.c: + use ssprintf function to formulate command + +2000-09-01 karldebisschop + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_nntp.c: + accidentally dropped ! + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_nntp.c: + add verbose printf's and checnge NNRP to NNTP + +2000-09-01 karldebisschop + + * /cvsroot/netsaintplug/netsaintplug/plugins-scripts/subst.in: + escape = for nawk (AIX) + + * /cvsroot/netsaintplug/netsaintplug/plugins-scripts/check_ircd.pl: + change chop to chomp + + * /cvsroot/netsaintplug/netsaintplug/plugins-scripts/check_ircd.pl: + typo in usage warning + + * /cvsroot/netsaintplug/netsaintplug/plugins/utils.c: + terminate copied string explicitly + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_http.c: + ndle post operations + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_snmp.c, /cvsroot/netsaintplug/netsaintplug/plugins/t/check_snmp.t: + handle multiple line output + +2000-08-31 karldebisschop + + * /cvsroot/netsaintplug/netsaintplug/Makefile.am: add acconfig.h + + * /cvsroot/netsaintplug/netsaintplug/ChangeLog: alpha 7 + + * /cvsroot/netsaintplug/netsaintplug/plugins-scripts/check_ircd.pl: + add space in '$Revision$' to make emacs perl-maode work right + + * /cvsroot/netsaintplug/netsaintplug/package.def, /cvsroot/netsaintplug/netsaintplug/netsaint-plugins-custom.spec, /cvsroot/netsaintplug/netsaintplug/netsaint-plugins.spec: + alpha 7 + + * /cvsroot/netsaintplug/netsaintplug/plugins-scripts/Makefile.am: + fix typo + + * /cvsroot/netsaintplug/netsaintplug/plugins/utils.c: + was reallocing the wrong thing + +2000-08-31 karldebisschop + + * /cvsroot/netsaintplug/netsaintplug/plugins-scripts/check_ircd.pl: + add space in '$Revision$' to make emacs perl-maode work right + + * /cvsroot/netsaintplug/netsaintplug/package.def, /cvsroot/netsaintplug/netsaintplug/netsaint-plugins-custom.spec, /cvsroot/netsaintplug/netsaintplug/netsaint-plugins.spec: + alpha 7 + + * /cvsroot/netsaintplug/netsaintplug/plugins-scripts/Makefile.am: + fix typo + + * /cvsroot/netsaintplug/netsaintplug/plugins/utils.c: + was reallocing the wrong thing + + * /cvsroot/netsaintplug/netsaintplug/test.pl.in: + PWD environment variable is not always present + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_ups.c: + fix option handling for -v and fix testing of ups_name + + * /cvsroot/netsaintplug/netsaintplug/plugins-scripts/t/check_rpc.t, /cvsroot/netsaintplug/netsaintplug/plugins/t/check_dns.t, /cvsroot/netsaintplug/netsaintplug/plugins/t/check_fping.t, /cvsroot/netsaintplug/netsaintplug/plugins/t/check_ftp.t, /cvsroot/netsaintplug/netsaintplug/plugins/t/check_hpjd.t, /cvsroot/netsaintplug/netsaintplug/plugins/t/check_http.t, /cvsroot/netsaintplug/netsaintplug/plugins/t/check_imap.t, /cvsroot/netsaintplug/netsaintplug/plugins/t/check_load.t, /cvsroot/netsaintplug/netsaintplug/plugins/t/check_mysql.t, /cvsroot/netsaintplug/netsaintplug/plugins/t/check_ping.t, /cvsroot/netsaintplug/netsaintplug/plugins/t/check_pop.t, /cvsroot/netsaintplug/netsaintplug/plugins/t/check_procs.t, /cvsroot/netsaintplug/netsaintplug/plugins/t/check_smtp.t, /cvsroot/netsaintplug/netsaintplug/plugins/t/check_snmp.t, /cvsroot/netsaintplug/netsaintplug/plugins/t/check_swap.t, /cvsroot/netsaintplug/netsaintplug/plugins/t/check_tcp.t, /cvsroot/netsaintplug/netsaintplug/plugins/t/check_time.t, /cvsroot/netsaintplug/netsaintplug/plugins/t/check_udp.t, /cvsroot/netsaintplug/netsaintplug/plugins/t/check_users.t, /cvsroot/netsaintplug/netsaintplug/plugins/t/check_vsz.t, /cvsroot/netsaintplug/netsaintplug/plugins/t/check_disk.t: + always return 0 if called from Test::Harness + +2000-08-30 karldebisschop + + * /cvsroot/netsaintplug/netsaintplug/plugins/Makefile.am, /cvsroot/netsaintplug/netsaintplug/plugins-scripts/Makefile.am: + fix test environment + + * /cvsroot/netsaintplug/netsaintplug/configure.in: + remove typo: AC_DEFINE_UNQUOTED + + * /cvsroot/netsaintplug/netsaintplug/configure.in: + get check_disk to build on cygwin + +2000-08-28 karldebisschop + + * /cvsroot/netsaintplug/netsaintplug/ChangeLog: autoupdate + + * /cvsroot/netsaintplug/netsaintplug/plugins/t/check_time.t: use Helper + + * /cvsroot/netsaintplug/netsaintplug/plugins-scripts/check_wave.pl: + add option processing + + * /cvsroot/netsaintplug/netsaintplug/plugins-scripts/check_ntp.pl: + typo in ERROR hash, better host name checking + + * /cvsroot/netsaintplug/netsaintplug/plugins-scripts/check_disk_smb.pl: + typo in ERROR hash + + * /cvsroot/netsaintplug/netsaintplug/plugins/t/check_time.t: fix typo + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_tcp.c: + fix args to strscpy + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_netsaint.c: + argc=2 IS valid (--help), optopt is char + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_mrtgtraf.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_ftp.c: + fix incorrect PROGNAME + + * /cvsroot/netsaintplug/netsaintplug/opttest.pl: + test -h, -V, --help, --version, and check for correct PROGNAME + +2000-08-28 karldebisschop + + * /cvsroot/netsaintplug/netsaintplug/plugins/t/check_time.t: use Helper + + * /cvsroot/netsaintplug/netsaintplug/plugins-scripts/check_wave.pl: + add option processing + + * /cvsroot/netsaintplug/netsaintplug/plugins-scripts/check_ntp.pl: + typo in ERROR hash, better host name checking + + * /cvsroot/netsaintplug/netsaintplug/plugins-scripts/check_disk_smb.pl: + typo in ERROR hash + + * /cvsroot/netsaintplug/netsaintplug/plugins/t/check_time.t: fix typo + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_tcp.c: + fix args to strscpy + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_netsaint.c: + argc=2 IS valid (--help), optopt is char + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_mrtgtraf.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_ftp.c: + fix incorrect PROGNAME + + * /cvsroot/netsaintplug/netsaintplug/opttest.pl: + test -h, -V, --help, --version, and check for correct PROGNAME + +2000-08-28 karldebisschop + + * /cvsroot/netsaintplug/netsaintplug/plugins/t/check_time.t: + use udp_hostname instead of localhost + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_load.c: + fix typo in #if statements + + * /cvsroot/netsaintplug/netsaintplug/plugins/t/check_imap.t, /cvsroot/netsaintplug/netsaintplug/plugins/t/check_pop.t, /cvsroot/netsaintplug/netsaintplug/plugins/t/check_smtp.t: + not all OS types take long opts -- remove from test + + * /cvsroot/netsaintplug/netsaintplug/plugins/t/check_hpjd.t, /cvsroot/netsaintplug/netsaintplug/plugins/t/check_mysql.t, /cvsroot/netsaintplug/netsaintplug/plugins/t/check_snmp.t: + don't run test if plugin was not made + + * /cvsroot/netsaintplug/netsaintplug/plugins/t/check_fping.t: + don't run tests if plugin wasn't made + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_netsaint.c: + arg processing typos + + * /cvsroot/netsaintplug/netsaintplug/plugins-scripts/Makefile.am: + specify t as directory rather than wildcard - allows make dist in subdir + + * /cvsroot/netsaintplug/netsaintplug/plugins/Makefile.am: + pecify t as directory rather than wildcard - allows make dist in subdir + + * /cvsroot/netsaintplug/netsaintplug/package.def, /cvsroot/netsaintplug/netsaintplug/netsaint-plugins.spec, /cvsroot/netsaintplug/netsaintplug/netsaint-plugins-custom.spec: + 1.2.9 alpha 6 + + * /cvsroot/netsaintplug/netsaintplug/configure.in: + PS_COMMAND checks for debian + +2000-08-25 karldebisschop + + * /cvsroot/netsaintplug/netsaintplug/plugins/Makefile.am: + chieck_by_ssh should also be in extras + + * /cvsroot/netsaintplug/netsaintplug/ChangeLog: update + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_disk.c: + remove extra printf from debigging + + * /cvsroot/netsaintplug/netsaintplug/plugins/Makefile.am: + make check_netsaint an extra + + * /cvsroot/netsaintplug/netsaintplug/plugins/t/check_fping.t: + small tweak to match latest check_fping mods + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_ssh.c: + check to see if MSG_DONTWAIT is defined before using + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_fping.c: + check times, variable packet size + +2000-08-25 karldebisschop + + * /cvsroot/netsaintplug/netsaintplug/ChangeLog: update + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_disk.c: + remove extra printf from debigging + + * /cvsroot/netsaintplug/netsaintplug/plugins/Makefile.am: + make check_netsaint an extra + + * /cvsroot/netsaintplug/netsaintplug/plugins/t/check_fping.t: + small tweak to match latest check_fping mods + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_ssh.c: + check to see if MSG_DONTWAIT is defined before using + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_fping.c: + check times, variable packet size + +2000-08-23 karldebisschop + + * /cvsroot/netsaintplug/netsaintplug/netsaint-plugins-custom.spec, /cvsroot/netsaintplug/netsaintplug/netsaint-plugins.spec: + 1.2.9 alpha 5 + + * /cvsroot/netsaintplug/netsaintplug/package.def: ID breaks autoconf + + * /cvsroot/netsaintplug/netsaintplug/package.def: 1.2.9 alpha 5 + + * /cvsroot/netsaintplug/netsaintplug/plugins/t/check_fping.t: + update to reflect changes to check_fping for variable packet size handling + + * /cvsroot/netsaintplug/netsaintplug/ChangeLog: + more 1.2.9-a5 log entries + + * /cvsroot/netsaintplug/netsaintplug/ChangeLog: + log some 1.2.9a5 changes + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_fping.c: + provide option to control number of packets and packet size + + * /cvsroot/netsaintplug/netsaintplug/command.cfg.in: + add $ after HOSTADDRESS in check_http + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_tcp.c, /cvsroot/netsaintplug/netsaintplug/plugins/t/check_tcp.t: + Should now answer for any of check_(imap|pop|smtp|udp|tcp|reply) + +2000-08-22 karldebisschop + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_load.c: + HOUX reveals bug with PROC_LOADAVG logic + + * /cvsroot/netsaintplug/netsaintplug/.cvsignore, /cvsroot/netsaintplug/netsaintplug/plugins/.cvsignore, /cvsroot/netsaintplug/netsaintplug/plugins-scripts/.cvsignore: + housekeeping + + * /cvsroot/netsaintplug/netsaintplug/acconfig.h, /cvsroot/netsaintplug/netsaintplug/configure.in, /cvsroot/netsaintplug/netsaintplug/plugins/check_fping.c, /cvsroot/netsaintplug/netsaintplug/plugins-scripts/check_ntp.pl: + bug fixes on 1.2.9-a4 + + * /cvsroot/netsaintplug/netsaintplug/plugins/config.h.in: + made by autoheader now + + * /cvsroot/netsaintplug/netsaintplug/netsaint-plugins.spec, /cvsroot/netsaintplug/netsaintplug/plugins-scripts/Makefile.am: + need to install utils.pm and utils.sh + +2000-08-18 karldebisschop + + * /cvsroot/netsaintplug/netsaintplug/Makefile.am, /cvsroot/netsaintplug/netsaintplug/netsaint-plugins-custom.spec, /cvsroot/netsaintplug/netsaintplug/netsaint-plugins.spec: + last few things to get rpm working for 1.2.9-a4 + + * /cvsroot/netsaintplug/netsaintplug/configure.in, /cvsroot/netsaintplug/netsaintplug/Helper.pm, /cvsroot/netsaintplug/netsaintplug/Makefile.am, /cvsroot/netsaintplug/netsaintplug/plugins/check_radius.c, /cvsroot/netsaintplug/netsaintplug/plugins/Makefile.am, /cvsroot/netsaintplug/netsaintplug/plugins-scripts/Makefile.am, /cvsroot/netsaintplug/netsaintplug/test.pl.in: + get make test to work again + a couple of doc fixes for check_radius + + * /cvsroot/netsaintplug/netsaintplug/Makefile.am, /cvsroot/netsaintplug/netsaintplug/netsaint-plugins.spec: + update spec for 1.2.9a4 + add Helper.pm to dist + +2000-08-17 karldebisschop + + * /cvsroot/netsaintplug/netsaintplug/plugins-scripts/t/check_rpc.t: + output does not begin with ./ + + * /cvsroot/netsaintplug/netsaintplug/plugins-scripts/check_log.sh, /cvsroot/netsaintplug/netsaintplug/plugins-scripts/check_oracle.sh, /cvsroot/netsaintplug/netsaintplug/plugins-scripts/check_sensors.sh, /cvsroot/netsaintplug/netsaintplug/plugins-scripts/utils.sh.in, /cvsroot/netsaintplug/netsaintplug/plugins-scripts/check_flexlm.pl: + add standard option syntax to shell plugins + + * /cvsroot/netsaintplug/netsaintplug/configure.in: + standard option handling for shell scripts + +2000-08-16 karldebisschop + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_tcp.c, /cvsroot/netsaintplug/netsaintplug/plugins/t/check_imap.t, /cvsroot/netsaintplug/netsaintplug/plugins/t/check_pop.t, /cvsroot/netsaintplug/netsaintplug/plugins/t/check_smtp.t, /cvsroot/netsaintplug/netsaintplug/plugins/t/check_udp.t: + tcp: don't scan unless --expect or --send + others: create a few new host types + + * /cvsroot/netsaintplug/netsaintplug/acconfig.h, /cvsroot/netsaintplug/netsaintplug/configure.in, /cvsroot/netsaintplug/netsaintplug/package.def, /cvsroot/netsaintplug/netsaintplug/plugins/config.h.in, /cvsroot/netsaintplug/netsaintplug/plugins-scripts/utils.pm.in, /cvsroot/netsaintplug/netsaintplug/plugins/utils.c: + lost correct release tracking with change to automake - fixed + +2000-08-15 karldebisschop + + * /cvsroot/netsaintplug/netsaintplug/configure.in, /cvsroot/netsaintplug/netsaintplug/plugins-scripts/check_breeze.pl, /cvsroot/netsaintplug/netsaintplug/plugins-scripts/check_disk_smb.pl, /cvsroot/netsaintplug/netsaintplug/plugins-scripts/check_ircd.pl, /cvsroot/netsaintplug/netsaintplug/plugins-scripts/check_ntp.pl, /cvsroot/netsaintplug/netsaintplug/plugins-scripts/check_rpc.pl, /cvsroot/netsaintplug/netsaintplug/plugins-scripts/subst.in, /cvsroot/netsaintplug/netsaintplug/plugins-scripts/utils.pm.in: + convert to getopt + +2000-08-12 karldebisschop + + * /cvsroot/netsaintplug/netsaintplug/plugins-scripts/check_ntp.pl, /cvsroot/netsaintplug/netsaintplug/plugins-scripts/check_rpc.pl, /cvsroot/netsaintplug/netsaintplug/plugins-scripts/utils.pm.in: + conversion to getopt and automake + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_overcr.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_nwstat.c, /cvsroot/netsaintplug/netsaintplug/plugins/Makefile.am: + change to getopt + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_reply.c: + obsolete - functionanlity added to check_tcp + +2000-08-11 karldebisschop + + * /cvsroot/netsaintplug/netsaintplug/contrib/checkciscotemp.pl, /cvsroot/netsaintplug/netsaintplug/plugins/check_nwstat.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_tcp.c, /cvsroot/netsaintplug/netsaintplug/plugins/t/check_tcp.t, /cvsroot/netsaintplug/netsaintplug/netsaint-plugins-custom.spec: + conversion to standard options syntax + +2000-08-10 karldebisschop + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_radius.c: + complete change to getopt + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_radius.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_tcp.c: + convert radius to getopt, cleanup on tcp + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_nwstat.c: + wrong PROGNAME + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_fping.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_netsaint.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_nwstat.c: + convert to getopt + +2000-08-08 karldebisschop + + * /cvsroot/netsaintplug/netsaintplug/plugins/.cvsignore, /cvsroot/netsaintplug/netsaintplug/plugins-scripts/.cvsignore, /cvsroot/netsaintplug/netsaintplug/.cvsignore: + Makefile.in is built by automake + + * /cvsroot/netsaintplug/netsaintplug/plugins/t/check_dns.t, /cvsroot/netsaintplug/netsaintplug/plugins/t/check_fping.t: + test for bin existence doesn't work right + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_by_ssh.c: + use newer strscpy and ssprintf + fix typo (called wrong DEFINE) + + * /cvsroot/netsaintplug/netsaintplug/acconfig.h, /cvsroot/netsaintplug/netsaintplug/configure.in, /cvsroot/netsaintplug/netsaintplug/Makefile.am, /cvsroot/netsaintplug/netsaintplug/plugins/Makefile.am, /cvsroot/netsaintplug/netsaintplug/plugins-scripts/Makefile.am: + use automake + + * /cvsroot/netsaintplug/netsaintplug/Makefile.in, /cvsroot/netsaintplug/netsaintplug/plugins/Makefile.in, /cvsroot/netsaintplug/netsaintplug/plugins-scripts/Makefile.in: + switch to automake + + * /cvsroot/netsaintplug/netsaintplug/plugins-scripts/check_rpc.pl, /cvsroot/netsaintplug/netsaintplug/plugins-scripts/Makefile.in, /cvsroot/netsaintplug/netsaintplug/plugins-scripts/t/check_rpc.t: + use automake + + * /cvsroot/netsaintplug/netsaintplug/plugins/config.h.in, /cvsroot/netsaintplug/netsaintplug/plugins/Makefile.in, /cvsroot/netsaintplug/netsaintplug/plugins/netutils.h.in, /cvsroot/netsaintplug/netsaintplug/plugins/t/check_disk.t, /cvsroot/netsaintplug/netsaintplug/plugins/t/check_dns.t, /cvsroot/netsaintplug/netsaintplug/plugins/t/check_fping.t, /cvsroot/netsaintplug/netsaintplug/plugins/t/check_ftp.t, /cvsroot/netsaintplug/netsaintplug/plugins/t/check_hpjd.t, /cvsroot/netsaintplug/netsaintplug/plugins/t/check_http.t, /cvsroot/netsaintplug/netsaintplug/plugins/t/check_imap.t, /cvsroot/netsaintplug/netsaintplug/plugins/t/check_load.t, /cvsroot/netsaintplug/netsaintplug/plugins/t/check_mysql.t, /cvsroot/netsaintplug/netsaintplug/plugins/t/check_ping.t, /cvsroot/netsaintplug/netsaintplug/plugins/t/check_pop.t, /cvsroot/netsaintplug/netsaintplug/plugins/t/check_procs.t, /cvsroot/netsaintplug/netsaintplug/plugins/t/check_smtp.t, /cvsroot/netsaintplug/netsaintplug/plugins/t/check_snmp.t, /cvsroot/netsaintplug/netsaintplug/plugins/t/check_swap.t, /cvsroot/netsaintplug/netsaintplug/plugins/t/check_tcp.t, /cvsroot/netsaintplug/netsaintplug/plugins/t/check_time.t, /cvsroot/netsaintplug/netsaintplug/plugins/t/check_udp.t, /cvsroot/netsaintplug/netsaintplug/plugins/t/check_users.t, /cvsroot/netsaintplug/netsaintplug/plugins/t/check_vsz.t: + convert to automake + +2000-08-04 karldebisschop + + * /cvsroot/netsaintplug/netsaintplug/plugins/popen.c: + needed for cygwin, other systems that don't meet SVr4 or BSD4.3 + +2000-08-03 karldebisschop + + * /cvsroot/netsaintplug/netsaintplug/.cvsignore, /cvsroot/netsaintplug/netsaintplug/plugins/.cvsignore: + prep for automake + + * /cvsroot/netsaintplug/netsaintplug/aclocal.m4, /cvsroot/netsaintplug/netsaintplug/AUTHORS, /cvsroot/netsaintplug/netsaintplug/missing, /cvsroot/netsaintplug/netsaintplug/mkinstalldirs, /cvsroot/netsaintplug/netsaintplug/NEWS: + GNU conformance, prep for automake + + * /cvsroot/netsaintplug/netsaintplug/ChangeLog, /cvsroot/netsaintplug/netsaintplug/Changelog: + rename to comply with GNU standards + + * /cvsroot/netsaintplug/netsaintplug/plugins-scripts/.cvsignore: + needed now that there's a make process + + * /cvsroot/netsaintplug/netsaintplug/plugins-scripts/check_dns.pl, /cvsroot/netsaintplug/netsaintplug/plugins-scripts/check_netdns.pl: + rename to avoid conflict when installing + + * /cvsroot/netsaintplug/netsaintplug/plugins-scripts/check_dns.pl: + use Net::DNS to check name server + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_dig.c: + use dig instead of nslookup. + + * /cvsroot/netsaintplug/netsaintplug/acconfig.h: use autoheader + +2000-08-02 karldebisschop + + * /cvsroot/netsaintplug/netsaintplug/configure.in, /cvsroot/netsaintplug/netsaintplug/Makefile.in, /cvsroot/netsaintplug/netsaintplug/plugins/common.h.in, /cvsroot/netsaintplug/netsaintplug/plugins/config.h.in, /cvsroot/netsaintplug/netsaintplug/plugins/Makefile.in, /cvsroot/netsaintplug/netsaintplug/plugins/version.h.in: + get rid of common/*.h + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_swap.c: bugfix + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_mrtg.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_mrtgtraf.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_mysql.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_netsaint.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_nntp.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_nwstat.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_overcr.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_pgsql.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_ping.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_pop.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_procs.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_radius.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_real.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_reply.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_smtp.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_snmp.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_ssh.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_swap.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_tcp.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_time.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_udp.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_ups.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_users.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_vsz.c, /cvsroot/netsaintplug/netsaintplug/plugins/netutils.c, /cvsroot/netsaintplug/netsaintplug/plugins/urlize.c, /cvsroot/netsaintplug/netsaintplug/plugins/utils.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_by_ssh.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_disk.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_dns.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_dummy.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_fping.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_ftp.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_game.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_hpjd.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_http.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_imap.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_ldap.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_load.c: + move config.h and common.h out of ../common + ---------------------------------------------------------------------- + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_disk.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_dummy.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_ftp.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_http.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_ldap.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_load.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_ping.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_snmp.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_swap.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_tcp.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_time.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_udp.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_users.c, /cvsroot/netsaintplug/netsaintplug/plugins/netutils.c: + correct return status for --help and --version + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_mrtgtraf.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_real.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_ups.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_mrtg.c: + convert to getopt + + * /cvsroot/netsaintplug/netsaintplug/opttest.pl: + test all plugins for -h --help -v --version options + + * /cvsroot/netsaintplug/netsaintplug/configure.in, /cvsroot/netsaintplug/netsaintplug/plugins/Makefile.in: + reorganize LIBS to use as .IGNORED deps -- -L/usr/lib must be in LDFLAGS + +2000-07-30 hgayosso + + * /cvsroot/netsaintplug/netsaintplug/command.cfg.in: + Added examples for: check_nmap. + +2000-07-29 karldebisschop + + * /cvsroot/netsaintplug/netsaintplug/.cvsignore: add sparc64 + + * /cvsroot/netsaintplug/netsaintplug/configure.in, /cvsroot/netsaintplug/netsaintplug/Makefile.in, /cvsroot/netsaintplug/netsaintplug/subst.in: + use shell/sed for subst script to meet GNU coding stamdards + + * /cvsroot/netsaintplug/netsaintplug/plugins/t/check_imap.t, /cvsroot/netsaintplug/netsaintplug/plugins/t/check_pop.t, /cvsroot/netsaintplug/netsaintplug/plugins/t/check_smtp.t: + new tests written with getopt conversion + + * /cvsroot/netsaintplug/netsaintplug/subst.sh: + shell wrapper handles diff'ing after sed substitution + (awk fails GNU coding stds) + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_disk.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_hpjd.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_imap.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_nntp.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_pop.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_smtp.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_ups.c, /cvsroot/netsaintplug/netsaintplug/plugins/t/check_swap.t: + switch to getopt + eliminate overflow in t/check_swap.t (still need to fix check_swap.c) + + * /cvsroot/netsaintplug/netsaintplug/plugins/utils.c: + better way of doing is_int + +2000-07-26 karldebisschop + + * /cvsroot/netsaintplug/netsaintplug/.cvsignore: + ignore arch-specific build directories + +2000-07-25 karldebisschop + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_mysql.c: + convert to getopt + + * /cvsroot/netsaintplug/netsaintplug/plugins/utils.c: + clean out a few sscanf calls + + * /cvsroot/netsaintplug/netsaintplug/plugins/t/check_mysql.t: new test + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_disk.c: + help screen typo + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_snmp.c: + delete extra printf + +2000-07-23 karldebisschop + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_by_ssh.c: + improve documentation of -i option and its use + + * /cvsroot/netsaintplug/netsaintplug/plugins-scripts/subst.in: + add -_ to acceptable cahracters in commad name + +2000-07-21 karldebisschop + + * /cvsroot/netsaintplug/netsaintplug/plugins-scripts/check_rpc.pl: + we use explicit path with new subst script + + * /cvsroot/netsaintplug/netsaintplug/configure.in, /cvsroot/netsaintplug/netsaintplug/plugins-scripts/subst.in, /cvsroot/netsaintplug/netsaintplug/subst.in: + convert perl utility scripts to awk + + * /cvsroot/netsaintplug/netsaintplug/command.cfg.in: + use -H where possible, change @libexec@ to @libexecdir@ + +2000-07-20 karldebisschop + + * /cvsroot/netsaintplug/netsaintplug/plugins-scripts/check_rpc.pl: + taint checking for -p option + + * /cvsroot/netsaintplug/netsaintplug/plugins/Makefile.in: order of libs + + * /cvsroot/netsaintplug/netsaintplug/plugins-scripts/Makefile.in, /cvsroot/netsaintplug/netsaintplug/plugins-scripts/subst.in: + convert old perl script to awk + + * /cvsroot/netsaintplug/netsaintplug/configure.in: + use package.def for tracking package release (works for scripts too) + allow df and ping syntax to be specified on command line + + * /cvsroot/netsaintplug/netsaintplug/package.def: + defines package release + +2000-07-19 karldebisschop + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_ssh.c: + remove debugging printf + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_ssh.c: + another attempt to get this to work with all servers. + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_ssh.c: + get protocol version from buffer, but send reasonable client string + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_ping.c: + remove inconsistent comment info + change ':' as list separator to ',' (retain ':' for back-compatibility) + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_ssh.c: + fix goof in revision + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_ssh.c: + send ident string (suppresses server error) + +2000-07-17 karldebisschop + + * /cvsroot/netsaintplug/netsaintplug/plugins-scripts/check_ntp.pl: + use utils.py + use ntpdc if available + clarify final logic (still needs mor work) + + * /cvsroot/netsaintplug/netsaintplug/configure.in: make perl utils.pm + + * /cvsroot/netsaintplug/netsaintplug/plugins-scripts/utils.pm.in: + perl script essential functions + +2000-07-15 karldebisschop + + * /cvsroot/netsaintplug/netsaintplug/contrib/utils.py: + user contribution + + * /cvsroot/netsaintplug/netsaintplug/contrib/check_nmap.py: tag as 1.20 + + * /cvsroot/netsaintplug/netsaintplug/contrib/check_nmap.py: + closing in on consiostent options, etc + +2000-07-14 karldebisschop + + * /cvsroot/netsaintplug/netsaintplug/contrib/check_ircd.tar.gz: + This was in core + + * /cvsroot/netsaintplug/netsaintplug/plugins-scripts/check_ircd.pl: + dd $Id$ + + * /cvsroot/netsaintplug/netsaintplug/plugins-scripts/check_ircd.pl: + 1.3 was accidental reversion of 1.2 to 1.1 - flip to correct state + + * /cvsroot/netsaintplug/netsaintplug/contrib/check_nmap.py: + contributor revisions + +2000-07-13 karldebisschop + + * /cvsroot/netsaintplug/netsaintplug/plugins-scripts/check_ntp.pl: + if xntpdc is present, check dispersion + set $state to be integer so compares can be done + +2000-07-12 karldebisschop + + * /cvsroot/netsaintplug/netsaintplug/rpm: typo in macro for srcrpmdir + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_disk.c, /cvsroot/netsaintplug/netsaintplug/rpm: + reverse compatibility for ':' + + * /cvsroot/netsaintplug/netsaintplug/netsaint-plugins-custom.spec, /cvsroot/netsaintplug/netsaintplug/netsaint-plugins.spec: + 1.2.9-a2 + + * /cvsroot/netsaintplug/netsaintplug/COPYING: + We refer to it but didn't distrubute it before + + * /cvsroot/netsaintplug/netsaintplug/contrib/check_nmap.py: + add note that license is GPL + + * /cvsroot/netsaintplug/netsaintplug/plugins/t/check_time.t, /cvsroot/netsaintplug/netsaintplug/plugins/t/check_udp.t: + set timeout, add new text matches + + * /cvsroot/netsaintplug/netsaintplug/Changelog: 1.2.9-a2 + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_procs.c: + fix bug resulting from use of strncmp + + * /cvsroot/netsaintplug/netsaintplug/plugins/Makefile.in: + define suffix rules so both gnumake and pmake will work + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_http.c: + must not send more than 2 \r\n pairs to zope + + * /cvsroot/netsaintplug/netsaintplug/contrib/check_nmap.py: + new contribution + + * /cvsroot/netsaintplug/netsaintplug/plugins/t/check_udp.t: new test + + * /cvsroot/netsaintplug/netsaintplug/plugins/t/check_disk.t, /cvsroot/netsaintplug/netsaintplug/plugins/t/check_ftp.t, /cvsroot/netsaintplug/netsaintplug/plugins/t/check_swap.t, /cvsroot/netsaintplug/netsaintplug/plugins/t/check_tcp.t: + edit to go with change to getopt + + * /cvsroot/netsaintplug/netsaintplug/plugins/utils.c: + documentation typo + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_udp.c: use getopt + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_http.c: + documentation typo + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_load.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_swap.c: + use getopt + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_disk.c: + use comma for pairs of options, reserve colon for ranges + +2000-07-12 hgayosso + + * /cvsroot/netsaintplug/netsaintplug/command.cfg.in: + Added command examples for: check_fping, check_game, check_imap, check_rpc. + Changed one `/bin/printf' for `/bin/echo -e'. (hgayosso) + +2000-07-11 karldebisschop + + * /cvsroot/netsaintplug/netsaintplug/REQUIREMENTS: add check_radius + + * /cvsroot/netsaintplug/netsaintplug/contrib/check_sockets.pl: + new contribution + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_swap.c: + command termination on usage macro can be ambiguous in if block + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_swap.c: + convert to getopt + +2000-07-07 karldebisschop + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_time.c, /cvsroot/netsaintplug/netsaintplug/plugins/t/check_time.t: + make output a little more standard + + * /cvsroot/netsaintplug/netsaintplug/plugins/utils.c, /cvsroot/netsaintplug/netsaintplug/plugins/utils.h.in: + add function ssprintf to print to mallocable string + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_disk.c: + use new ssprintf function + don't sscanf for mount point + + * /cvsroot/netsaintplug/netsaintplug/contrib/check_mem.pl: + check memory (written on BSD) + +2000-07-06 karldebisschop + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_tcp.c: typos in docs + + * /cvsroot/netsaintplug/netsaintplug/plugins/utils.c, /cvsroot/netsaintplug/netsaintplug/plugins/utils.h.in: + add support message + + * /cvsroot/netsaintplug/netsaintplug/plugins/t/check_time.t, /cvsroot/netsaintplug/netsaintplug/plugins/check_time.c: + creation + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_ping.c: + revert to 1.29 + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_ping.c: + this mod is wrong - it will go away + +2000-07-05 karldebisschop + + * /cvsroot/netsaintplug/netsaintplug/Changelog, /cvsroot/netsaintplug/netsaintplug/plugins/t/check_fping.t, /cvsroot/netsaintplug/netsaintplug/plugins/t/check_tcp.t, /cvsroot/netsaintplug/netsaintplug/plugins/t/check_users.t, /cvsroot/netsaintplug/netsaintplug/make-tarball, /cvsroot/netsaintplug/netsaintplug/plugins/check_ftp.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_tcp.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_users.c, /cvsroot/netsaintplug/netsaintplug/plugins/utils.h.in: + 1.2.9-a1 cleanup + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_procs.c: + fix usage statement + +2000-07-04 karldebisschop + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_fping.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_ftp.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_tcp.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_users.c: + convert to getopt + +2000-07-03 karldebisschop + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_by_ssh.c: + minor bug fixes + + * /cvsroot/netsaintplug/netsaintplug/plugins/t/check_disk.t: + match messages with new multidisk checks + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_ping.c: + CRITICAL if any unkown message are picked up on STDERR + + * /cvsroot/netsaintplug/netsaintplug/make-tarball: exclude sparc-64 + + * /cvsroot/netsaintplug/netsaintplug/Changelog: exclude sparc64 + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_by_ssh.c: + add documentation + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_ping.c: + fix inaccurate comment + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_http.c: help screen + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_disk.c: + check multiple disks + + * /cvsroot/netsaintplug/netsaintplug/netsaint-plugins-custom.spec, /cvsroot/netsaintplug/netsaintplug/netsaint-plugins.spec: + 1.2.9-a1 + + * /cvsroot/netsaintplug/netsaintplug/make-tarball: + make bz2 files as well + + * /cvsroot/netsaintplug/netsaintplug/configure.in, /cvsroot/netsaintplug/netsaintplug/plugins/check_fping.c: + use getopt + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_by_ssh.c: + functional multichecks, still need to tweak args + +2000-06-30 karldebisschop + + * /cvsroot/netsaintplug/netsaintplug/plugins/utils.c: + better error trapping for strscpy and strscat + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_disk.c: + further work on checking multiple partitions - some cleanup left, + plus documentation + +2000-06-29 karldebisschop + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_disk.c: + snapshot working toward multidisk checks + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_by_ssh.c, /cvsroot/netsaintplug/netsaintplug/plugins/utils.c: + next snapshot for passive multichecks + +2000-06-28 karldebisschop + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_ping.c: + add new form of rta for FreeBSD + + * /cvsroot/netsaintplug/netsaintplug/plugins/Makefile.in, /cvsroot/netsaintplug/netsaintplug/plugins-scripts/Makefile.in, /cvsroot/netsaintplug/netsaintplug/test.pl.in: + multiplatform build stuff + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_by_ssh.c: + napshot - at least this one compiles + + * /cvsroot/netsaintplug/netsaintplug/command.cfg.in: + still trying to make complete + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_by_ssh.c, /cvsroot/netsaintplug/netsaintplug/plugins/utils.c, /cvsroot/netsaintplug/netsaintplug/plugins/utils.h.in: + snapshot - updating for passive multichecks + + * /cvsroot/netsaintplug/netsaintplug/plugins/Makefile.in, /cvsroot/netsaintplug/netsaintplug/plugins-scripts/Makefile.in, /cvsroot/netsaintplug/netsaintplug/test.pl, /cvsroot/netsaintplug/netsaintplug/test.pl.in: + multiplatform builds + + * /cvsroot/netsaintplug/netsaintplug/configure.in, /cvsroot/netsaintplug/netsaintplug/plugins/check_procs.c: + now able to specify varlist to ps so various orders can be handled (AIX) + +2000-06-27 karldebisschop + + * /cvsroot/netsaintplug/netsaintplug/plugins-scripts/Helper.pm, /cvsroot/netsaintplug/netsaintplug/plugins-scripts/Makefile.in: + multiplatform builds + + * /cvsroot/netsaintplug/netsaintplug/plugins/Helper.pm: + modev for multiplatform builds + + * /cvsroot/netsaintplug/netsaintplug/Helper.pm: + moved here for multipltform build + + * /cvsroot/netsaintplug/netsaintplug/plugins/Makefile.in, /cvsroot/netsaintplug/netsaintplug/plugins/popen.c: + multiplatform builds + + * /cvsroot/netsaintplug/netsaintplug/plugins/utils.c, /cvsroot/netsaintplug/netsaintplug/plugins/utils.h.in: + strscat and strscpy functions + + * /cvsroot/netsaintplug/netsaintplug/netsaint-plugins-custom.spec, /cvsroot/netsaintplug/netsaintplug/netsaint-plugins.spec: + 1.2.8-4 plus switch to bzip2 + +2000-06-26 karldebisschop + + * /cvsroot/netsaintplug/netsaintplug/netsaint-plugins.spec: + 1.2.8-41.2.8-41.2.8-41.2.8-4 + +2000-06-25 karldebisschop + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_ping.c: + use standard POSIX getopt (only GNU supports '-' leadin for optarg + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_ping.c, /cvsroot/netsaintplug/netsaintplug/plugins/Makefile.in, /cvsroot/netsaintplug/netsaintplug/plugins/utils.c, /cvsroot/netsaintplug/netsaintplug/plugins/utils.h.in: + possible fix for check_ping + +2000-06-23 karldebisschop + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_ping.c: + try to get -p 1 at end of line to work + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_ping.c: + misplaced paren on host strlen + +2000-06-22 karldebisschop + + * /cvsroot/netsaintplug/netsaintplug/make-tarball, /cvsroot/netsaintplug/netsaintplug/netsaint-plugins-custom.spec, /cvsroot/netsaintplug/netsaintplug/rpm: + housekeeping for rpm builds + + * /cvsroot/netsaintplug/netsaintplug/.cvsignore, /cvsroot/netsaintplug/netsaintplug/make-tarball: + housekeeping + + * /cvsroot/netsaintplug/netsaintplug/make-tarball: + automatically create md5sum + + * /cvsroot/netsaintplug/netsaintplug/Changelog: + 1.2.8-3 bugfix release1.2.8-3 bugfix release1.2.8-3 bugfix release + + * /cvsroot/netsaintplug/netsaintplug/Changelog: houskeeping + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_ssh.c: + was not printing errors correctly + + * /cvsroot/netsaintplug/netsaintplug/plugins/.cvsignore, /cvsroot/netsaintplug/netsaintplug/rpm, /cvsroot/netsaintplug/netsaintplug/configure.in, /cvsroot/netsaintplug/netsaintplug/README, /cvsroot/netsaintplug/netsaintplug/REQUIREMENTS: + housekeeping + + * /cvsroot/netsaintplug/netsaintplug/Makefile.in, /cvsroot/netsaintplug/netsaintplug/make-tarball, /cvsroot/netsaintplug/netsaintplug/netsaint-plugins-custom.spec, /cvsroot/netsaintplug/netsaintplug/netsaint-plugins.spec, /cvsroot/netsaintplug/netsaintplug/plugins/Makefile.in: + houskeeping + +2000-06-21 karldebisschop + + * /cvsroot/netsaintplug/netsaintplug/Changelog: regular update + + * /cvsroot/netsaintplug/netsaintplug/netsaint-plugins.spec: + make more mandrake style + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_ping.c: + allocate extra byte for trailing null when using malloc + + * /cvsroot/netsaintplug/netsaintplug/plugins-scripts/check_sensors.sh: + fix bug in version string cleanup + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_disk.c: + use new terminate, add':' to usage statement + + * /cvsroot/netsaintplug/netsaintplug/plugins/utils.c, /cvsroot/netsaintplug/netsaintplug/plugins/utils.h.in: + terminate can now take format,arglist like printf + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_procs.c: update docs + + * /cvsroot/netsaintplug/netsaintplug/Changelog: + new info, cleanup old info + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_http.c: + another fix for reverse compatibility for -nohtml + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_ping.c: + another fix to revers compatibility for -nohtml + + * /cvsroot/netsaintplug/netsaintplug/netsaint-plugins.spec: + first step in making SRPM more mandrake compatible + +2000-06-19 karldebisschop + + * /cvsroot/netsaintplug/netsaintplug/Changelog: update + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_http.c: + restore -nohtml as do-nothing option for reverse compatibility + + * /cvsroot/netsaintplug/netsaintplug/Changelog: typo + +2000-06-18 karldebisschop + + * /cvsroot/netsaintplug/netsaintplug/Changelog: + 1.2.8-2 -- really this time + +2000-06-17 karldebisschop + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_vsz.c: + assume 20-char max size for int + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_ping.c: + fix DUP checking, use malloc instead of fixed length strings + +2000-06-16 karldebisschop + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_ping.c: + fix docs, use malloc, fix bug with warn on DUPs + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_ping.c: + forgat to double % in printf spec + + * /cvsroot/netsaintplug/netsaintplug/Changelog: + 1.2.8-2 changes (complete?) + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_http.c: + show header, status, content separately + do more rigorous parsing of where content starts + +2000-06-15 karldebisschop + + * /cvsroot/netsaintplug/netsaintplug/plugins/urlize.c: doc fix + + * /cvsroot/netsaintplug/netsaintplug/plugins/urlize.c: + and long opts to docs + + * /cvsroot/netsaintplug/netsaintplug/netsaint-plugins-custom.spec, /cvsroot/netsaintplug/netsaintplug/netsaint-plugins.spec: + dd a little header stuff, upgrade to 1.2.8-1 + + * /cvsroot/netsaintplug/netsaintplug/Changelog, /cvsroot/netsaintplug/netsaintplug/plugins/check_ping.c: + fix docs, make nothml the default, and --link (-L) option + + * /cvsroot/netsaintplug/netsaintplug/Changelog: + update to release new current + + * /cvsroot/netsaintplug/netsaintplug/plugins/Makefile.in: + make failed if there were no extras + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_http.c: + fix docs, add separate option for vhost + +2000-06-14 karldebisschop + + * /cvsroot/netsaintplug/netsaintplug/Changelog: dd todays changes + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_procs.c: + change name of variable stat - it conflicts on AIX with + + * /cvsroot/netsaintplug/netsaintplug/configure.in, /cvsroot/netsaintplug/netsaintplug/plugins/Makefile.in: + make check_process obsolete + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_process.c: + all new functionality now incorporated into check_procs.c + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_dns.c: + fix documentation + + * /cvsroot/netsaintplug/netsaintplug/subst.in: + -q option for mktemp breaks on HPUX + + * /cvsroot/netsaintplug/netsaintplug/plugins-scripts/check_sensors.sh: + make version reporting GNU like + + * /cvsroot/netsaintplug/netsaintplug/plugins-scripts/check_rpc.pl: + comments were inaccurate + + * /cvsroot/netsaintplug/netsaintplug/plugins/utils.h.in: + add #defines for standard options - testing only right now + + * /cvsroot/netsaintplug/netsaintplug/plugins/utils.c: + make print_version more compatible with GNU coding standards + + * /cvsroot/netsaintplug/netsaintplug/plugins/Makefile.in, /cvsroot/netsaintplug/netsaintplug/plugins-scripts/Makefile.in: + add $(DESTDIR) + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_vsz.c: + use getopt, cleanup documentation, retabify + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_http.c: + clean up documentation, retabify + +2000-06-13 karldebisschop + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_snmp.c, /cvsroot/netsaintplug/netsaintplug/Changelog: + tabify, update documentation + + * /cvsroot/netsaintplug/netsaintplug/Changelog, /cvsroot/netsaintplug/netsaintplug/plugins/check_procs.c: + typo in print_help + + * /cvsroot/netsaintplug/netsaintplug/Changelog: + progress on 12 June 2000 + + * /cvsroot/netsaintplug/netsaintplug/plugins-scripts/check_sensors.sh: + dd --verbose + + * /cvsroot/netsaintplug/netsaintplug/plugins-scripts/check_sensors.sh: + add help and usage routines + + * /cvsroot/netsaintplug/netsaintplug/plugins-scripts/check_sensors.sh: + test for non-zero exit, fix bug + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_ldap.c: + dd netutils.h and timeout + + * /cvsroot/netsaintplug/netsaintplug/plugins/Makefile.in: + dd netlibs to check_ldap + +2000-06-12 karldebisschop + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_by_ssh.c: + convert spaces to tab stops + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_by_ssh.c: + bux fix in command loop + + * /cvsroot/netsaintplug/netsaintplug/configure.in, /cvsroot/netsaintplug/netsaintplug/Makefile.in: + remove some GNUisms in Makefile, quote test strings + +2000-06-09 karldebisschop + + * /cvsroot/netsaintplug/netsaintplug/netsaint-plugins-custom.spec, /cvsroot/netsaintplug/netsaintplug/netsaint-plugins.spec: + 1.2.8 release + + * /cvsroot/netsaintplug/netsaintplug/contrib/restrict.pl: + add comment that openssh will not work with this script + + * /cvsroot/netsaintplug/netsaintplug/plugins-scripts/check_ntp.pl: + patch from William Pietri + +2000-06-08 karldebisschop + + * /cvsroot/netsaintplug/netsaintplug/Changelog: just getting up to date + + * /cvsroot/netsaintplug/netsaintplug/configure.in: + mysql configure problems - will still want a bit more work + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_by_ssh.c: + make -H option work right + + * /cvsroot/netsaintplug/netsaintplug/contrib/check_ora_table_space.pl: + add a few comments + + * /cvsroot/netsaintplug/netsaintplug/contrib/restrict.pl, /cvsroot/netsaintplug/netsaintplug/contrib/check_ora_table_space.pl: + new contributions + +2000-06-07 karldebisschop + + * /cvsroot/netsaintplug/netsaintplug/netsaint-plugins.spec: + no check_https anymore + + * /cvsroot/netsaintplug/netsaintplug/configure.in: + check_https no longer exists + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_http.c: + get HAVE_SSL def right + + * /cvsroot/netsaintplug/netsaintplug/plugins/Makefile.in: typo + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_http.c, /cvsroot/netsaintplug/netsaintplug/plugins/Makefile.in: + consolidate ssl for check_http into one plugin + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_http2.c: + seems debugged, so moved into check_http + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_https.c: + ssl functionality has been move into check_http + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_http2.c: + fix problem with --onredirect + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_by_ssh.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_disk.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_dns.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_http2.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_https.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_ldap.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_pgsql.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_ping.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_procs.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_snmp.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_ssh.c: + fix option processing, hopefully for the last time + + * /cvsroot/netsaintplug/netsaintplug/netsaint-plugins.spec, /cvsroot/netsaintplug/netsaintplug/plugins/Makefile.in, /cvsroot/netsaintplug/netsaintplug/netsaint-plugins-custom.spec: + prepare for pre7 RPMs + + * /cvsroot/netsaintplug/netsaintplug/netsaint-plugin-core.spec, /cvsroot/netsaintplug/netsaintplug/netsaint-plugin-extra.spec: + now contained in one netsaint-plugins spec + + * /cvsroot/netsaintplug/netsaintplug/netsaint-plugins.spec: + upgrade to 1.2.8pre7, change install dir to plugins, add command.cfg to doc + + * /cvsroot/netsaintplug/netsaintplug/netsaint-plugins-custom.spec: + undefined build list + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_http2.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_pgsql.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_ping.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_procs.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_snmp.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_ssh.c: + streamline and debug reverse compatibility mode for option processing + + * /cvsroot/netsaintplug/netsaintplug/plugins/t/check_http.t: + use hostname to test http + +2000-06-06 karldebisschop + + * /cvsroot/netsaintplug/netsaintplug/configure.in: + clean up warn where user has no libcrypto + + * /cvsroot/netsaintplug/netsaintplug/netsaint-plugin-core.spec, /cvsroot/netsaintplug/netsaintplug/netsaint-plugin-extra.spec: + minor changes + + * /cvsroot/netsaintplug/netsaintplug/configure.in: pgsql on solaris + + * /cvsroot/netsaintplug/netsaintplug/netsaint-plugin-core.spec, /cvsroot/netsaintplug/netsaintplug/netsaint-plugin-extra.spec, /cvsroot/netsaintplug/netsaintplug/netsaint-plugins.spec: + call directory plugins instead of plugin + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_by_ssh.c: + comment debugging code + + * /cvsroot/netsaintplug/netsaintplug/make-tarball: + clean and autoconf first to prvent careless errors + +2000-06-05 karldebisschop + + * /cvsroot/netsaintplug/netsaintplug/netsaint-plugin-core.spec, /cvsroot/netsaintplug/netsaintplug/plugins/check_http.c, /cvsroot/netsaintplug/netsaintplug/plugins/Makefile.in: + try to get sane build of extras + modify check_http to try and get AIX to compile + + * /cvsroot/netsaintplug/netsaintplug/configure.in: + cleanup final test for OpenSSL + + * /cvsroot/netsaintplug/netsaintplug/configure.in, /cvsroot/netsaintplug/netsaintplug/Makefile.in: + typo in configure, plus try to get AIX to make scripts + +2000-06-04 karldebisschop + + * /cvsroot/netsaintplug/netsaintplug/configure.in: + try to make postgres work on non-redhat + + * /cvsroot/netsaintplug/netsaintplug/netsaint-plugin-core.spec, /cvsroot/netsaintplug/netsaintplug/netsaint-plugin-extra.spec: + ichnage to pre6 + + * /cvsroot/netsaintplug/netsaintplug/configure.in: + yet another try for BSD + + * /cvsroot/netsaintplug/netsaintplug/configure.in: + fix again for BSD - need to change order of packets option + + * /cvsroot/netsaintplug/netsaintplug/configure.in: + cange order of options to support FreeBSD + + * /cvsroot/netsaintplug/netsaintplug/configure.in: + change to match AIX man page + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_fping.c: + get rid of duplicate definitiopn of max + + * /cvsroot/netsaintplug/netsaintplug/configure.in: + get rid of egrep -s (use >/dev/null for compatibility) + + * /cvsroot/netsaintplug/netsaintplug/netsaint-plugin-core.spec, /cvsroot/netsaintplug/netsaintplug/netsaint-plugin-extra.spec: + core should install on any system, extars may require nodeps + + * /cvsroot/netsaintplug/netsaintplug/Makefile.in: + quickcheck target is not defined anymore + +2000-06-03 karldebisschop + + * /cvsroot/netsaintplug/netsaintplug/netsaint-plugins.spec: + update for 1.2.8pre5 + + * /cvsroot/netsaintplug/netsaintplug/plugins/Makefile.in: + add rule for urlize (and check_http2, temporary) + + * /cvsroot/netsaintplug/netsaintplug/plugins/urlize.c: + add help/usage/version info, plus a few comments + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_http2.c: comments + + * /cvsroot/netsaintplug/netsaintplug/plugins/t/check_ping.t: + fix needed to match new output from plugin + +2000-06-02 karldebisschop + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_http2.c: + put up short term - will soon replace check_http and check_https + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_by_ssh.c: + typo in email address + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_http.c: + fix calls to realloc + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_swap.c: + typos in print_help + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_by_ssh.c: + typoes in usage and in getopt + + * /cvsroot/netsaintplug/netsaintplug/configure.in: fix for solaris + + * /cvsroot/netsaintplug/netsaintplug/plugins/netutils.c: + pedantic compilers complained these wre not tru prototypes + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_ping.c: + fix bug (rta is not reported if pl = 100) + + * /cvsroot/netsaintplug/netsaintplug/configure.in: + try different hadlning of lib to get OpenSSL to work on FreeBSD + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_snmp.c: + typo (would not have effect under current code, but cleaner) + + * /cvsroot/netsaintplug/netsaintplug/configure.in: + fix logic for check_https + +2000-06-01 karldebisschop + + * /cvsroot/netsaintplug/netsaintplug/netsaint-plugins.spec: + delet build root + + * /cvsroot/netsaintplug/netsaintplug/netsaint-plugins.spec: + change to 1.2.8pre4 + + * /cvsroot/netsaintplug/netsaintplug/Requirements: + just a short list of where to get packages tha plugins depend on + + * /cvsroot/netsaintplug/netsaintplug/contrib/maser-oracle.pl: + expand from archive + + * /cvsroot/netsaintplug/netsaintplug/Makefile.in, /cvsroot/netsaintplug/netsaintplug/plugins/Makefile.in: + fix bad @LIBS@ in makefiles + update version + +2000-05-31 karldebisschop + + * /cvsroot/netsaintplug/netsaintplug/netsaint-plugins.spec: + random changes + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_hpjd.c: + check a bunch more OIDs + + * /cvsroot/netsaintplug/netsaintplug/contrib/readme.txt: + make notes about moving some stuff to core + + * /cvsroot/netsaintplug/netsaintplug/plugins/Makefile.in: + DO NOT include @LIBS@ in LDFLAGS - configure messes it up + + * /cvsroot/netsaintplug/netsaintplug/contrib/check_ipxping.c, /cvsroot/netsaintplug/netsaintplug/contrib/check_ipxping.tar.gz: + unpack source + + * /cvsroot/netsaintplug/netsaintplug/contrib/check_ntp.tar.gz: + moved to core + + * /cvsroot/netsaintplug/netsaintplug/contrib/check_nfs.tar.gz: + functionality moved to check_rpc in core + + * /cvsroot/netsaintplug/netsaintplug/contrib/check_real.tar.gz: + moved to core + + * /cvsroot/netsaintplug/netsaintplug/contrib/readme.txt: + updated file from www.netsaint.org + + * /cvsroot/netsaintplug/netsaintplug/contrib/check_bgpstate.pl, /cvsroot/netsaintplug/netsaintplug/contrib/check_dns_random.pl, /cvsroot/netsaintplug/netsaintplug/contrib/check_ifoperstatus.pl, /cvsroot/netsaintplug/netsaintplug/contrib/check_ifstatus.pl, /cvsroot/netsaintplug/netsaintplug/contrib/check_maxchannels.pl, /cvsroot/netsaintplug/netsaintplug/contrib/check_maxwanstate.pl, /cvsroot/netsaintplug/netsaintplug/contrib/check_mysql.c, /cvsroot/netsaintplug/netsaintplug/contrib/check_mysql.pl, /cvsroot/netsaintplug/netsaintplug/contrib/check_pop3.pl, /cvsroot/netsaintplug/netsaintplug/contrib/check_radius.tar.gz, /cvsroot/netsaintplug/netsaintplug/contrib/check_sap.sh, /cvsroot/netsaintplug/netsaintplug/contrib/check_uptime.c: + copied and unpacked from www.netsaint.org + + * /cvsroot/netsaintplug/netsaintplug/plugins/popen.c: + minor typo in comment + + * /cvsroot/netsaintplug/netsaintplug/plugins/urlize.c: + wraps output of another plugin with a URL + +2000-05-30 karldebisschop + + * /cvsroot/netsaintplug/netsaintplug/contrib/check_netapp.pl: + new contribution + + * /cvsroot/netsaintplug/netsaintplug/contrib/checkciscotemp.pl, /cvsroot/netsaintplug/netsaintplug/contrib/check_nwstat.pl, /cvsroot/netsaintplug/netsaintplug/contrib/mrtgext.pl, /cvsroot/netsaintplug/netsaintplug/contrib/urlize.pl: + new contributions, pending review and inclusion in main source tree + +2000-05-25 karldebisschop + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_hpjd.c: + general cleanup - keep test order consistent so possible bugs are + more likely to be caught + + * /cvsroot/netsaintplug/netsaintplug/plugins/Makefile.in: + do not include @LIBS@ in LDFLAGS - it's getting munged by configure + + * /cvsroot/netsaintplug/netsaintplug/configure.in: + get openssl and mysql to work on redhat 6.2 + +2000-05-24 karldebisschop + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_hpjd.c: + some printers may be going offline with POWERSAVE mode + +2000-05-19 karldebisschop + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_http.c: + realloc crashes when calloc outside of memory page - code page size as + define (I really need a better solution here) + + * /cvsroot/netsaintplug/netsaintplug/plugins/popen.c: + fix possible sscanf overflow + +2000-05-18 karldebisschop + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_http.c: + get regex and string searched to work for HTML pages longer than 1024 chars + + * /cvsroot/netsaintplug/netsaintplug/command.cfg.in: fix a few typos + + * /cvsroot/netsaintplug/netsaintplug/plugins-scripts/check_rpc.pl: + spell author names correctly, fix help screen info + +2000-05-11 karldebisschop + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_by_ssh.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_disk.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_dns.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_ide-smart.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_ldap.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_pgsql.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_ping.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_procs.c: + use text constants (no|required)_argument instead of numbers in getopt_long + options for clarity. Fix any mis-specified options + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_snmp.c: + make regex scan work + fix errors in specification of getopt_long parameters + +2000-05-10 karldebisschop + + * /cvsroot/netsaintplug/netsaintplug/plugins/Makefile.in: + drop reference to old saintcheck script + +2000-05-05 karldebisschop + + * /cvsroot/netsaintplug/netsaintplug/command.cfg.in: + fix typoes in OID definition + +2000-05-04 karldebisschop + + * /cvsroot/netsaintplug/netsaintplug/saintcheck: obsoleted by test.pl + + * /cvsroot/netsaintplug/netsaintplug/plugins-scripts/check_rpc.pl: + update version number in -V option + + * /cvsroot/netsaintplug/netsaintplug/plugins-scripts/check_rpc.pl: + add author, revision tracking + +2000-05-03 karldebisschop + + * /cvsroot/netsaintplug/netsaintplug/plugins-scripts/check_rpc.pl, /cvsroot/netsaintplug/netsaintplug/plugins-scripts/t/check_rpc.t: + try to get arg checking to work, add full rpc list + + * /cvsroot/netsaintplug/netsaintplug/plugins-scripts/check_rpc.pl: + bug fixes + + * /cvsroot/netsaintplug/netsaintplug/.cvsignore: + use this file to block syncronizing configure script (developers should run + autoconf on their own) + + * /cvsroot/netsaintplug/netsaintplug/configure.in: + fix includes for llber + + * /cvsroot/netsaintplug/netsaintplug/test.pl: + replaces saintcheck (new script is based on standard perl test harness) + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_ldap.c: + use plugin standard -h for help + move -h(ost) option to -H + fix getopt to work on machines with no getopt_long + + * /cvsroot/netsaintplug/netsaintplug/Makefile.in: fix conflicts + + * /cvsroot/netsaintplug/netsaintplug/Changelog, /cvsroot/netsaintplug/netsaintplug/command.cfg.in, /cvsroot/netsaintplug/netsaintplug/configure.in, /cvsroot/netsaintplug/netsaintplug/netsaint-plugins.spec, /cvsroot/netsaintplug/netsaintplug/subst.in, /cvsroot/netsaintplug/netsaintplug/plugins/check_hpjd.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_process.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_netsaint.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_load.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_pgsql.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_ping.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_swap.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_users.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_dns.c: + bug fixes + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_vsz.c: bug fix + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_by_ssh.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_disk.c: + use getopt + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_procs.c: use getopt + include enhancements from check_process + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_snmp.c: use getopt + scane multiple OIDs + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_dummy.c: + add --version and --help + +2000-05-02 karldebisschop + + * /cvsroot/netsaintplug/netsaintplug/plugins-scripts/check_sensors: + moved to check_sensor.sh + + * /cvsroot/netsaintplug/netsaintplug/plugins-scripts/check_sensors.sh: + add basic error checking + + * /cvsroot/netsaintplug/netsaintplug/plugins-scripts/check_oracle.sh: + for simpler make + + * /cvsroot/netsaintplug/netsaintplug/plugins-scripts/check_oracle: + replace with check_oracle.sh + + * /cvsroot/netsaintplug/netsaintplug/plugins-scripts/Makefile.in: + fix 'clean' target + +2000-05-01 karldebisschop + + * /cvsroot/netsaintplug/netsaintplug/plugins/Makefile.in: + changes to get paths right for scripts + + * /cvsroot/netsaintplug/netsaintplug/plugins/Helper.pm, /cvsroot/netsaintplug/netsaintplug/plugins/t/check_disk.t, /cvsroot/netsaintplug/netsaintplug/plugins/t/check_dns.t, /cvsroot/netsaintplug/netsaintplug/plugins/t/check_ftp.t, /cvsroot/netsaintplug/netsaintplug/plugins/t/check_hpjd.t, /cvsroot/netsaintplug/netsaintplug/plugins/t/check_http.t, /cvsroot/netsaintplug/netsaintplug/plugins/t/check_load.t, /cvsroot/netsaintplug/netsaintplug/plugins/t/check_ping.t, /cvsroot/netsaintplug/netsaintplug/plugins/t/check_procs.t, /cvsroot/netsaintplug/netsaintplug/plugins/t/check_snmp.t, /cvsroot/netsaintplug/netsaintplug/plugins/t/check_swap.t, /cvsroot/netsaintplug/netsaintplug/plugins/t/check_users.t, /cvsroot/netsaintplug/netsaintplug/plugins/t/check_vsz.t: + use perl test harness + + * /cvsroot/netsaintplug/netsaintplug/plugins/utils.h.in, /cvsroot/netsaintplug/netsaintplug/plugins/utils.c: + bug fixes + + * /cvsroot/netsaintplug/netsaintplug/plugins-scripts/check_log, /cvsroot/netsaintplug/netsaintplug/plugins-scripts/check_log.sh: + replace check_log with check_log.sh + + * /cvsroot/netsaintplug/netsaintplug/plugins-scripts/check_oracle.sh: + to replace check_oracle + + * /cvsroot/netsaintplug/netsaintplug/plugins-scripts/check_log.sh: + to replace check_log + + * /cvsroot/netsaintplug/netsaintplug/plugins-scripts/check_rpc.pl: + replaces check_nfs and check_ypbind + + * /cvsroot/netsaintplug/netsaintplug/plugins-scripts/t/check_rpc.t, /cvsroot/netsaintplug/netsaintplug/plugins-scripts/Helper.pm, /cvsroot/netsaintplug/netsaintplug/plugins-scripts/subst.in: + use perl test harness + + * /cvsroot/netsaintplug/netsaintplug/plugins-scripts/check_breeze.pl, /cvsroot/netsaintplug/netsaintplug/plugins-scripts/check_disk_smb.pl, /cvsroot/netsaintplug/netsaintplug/plugins-scripts/check_flexlm.pl, /cvsroot/netsaintplug/netsaintplug/plugins-scripts/check_ircd.pl, /cvsroot/netsaintplug/netsaintplug/plugins-scripts/check_ntp.pl, /cvsroot/netsaintplug/netsaintplug/plugins-scripts/check_wave.pl, /cvsroot/netsaintplug/netsaintplug/plugins-scripts/Makefile.in: + small mods to get paths reasonable for script files + + * /cvsroot/netsaintplug/netsaintplug/make-tarball: Makes a tar ball + +2000-02-17 karldebisschop + + * /cvsroot/netsaintplug/netsaintplug/configure.in, /cvsroot/netsaintplug/netsaintplug/Makefile.in, /cvsroot/netsaintplug/netsaintplug/plugins/Makefile.in: + changes for check_https + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_https.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_ide-smart.c, /cvsroot/netsaintplug/netsaintplug/plugins-scripts/check_sensors: + C contribs unmodified. + Script had to be retyed from scratch - maybe CR/LF problem? + +2000-02-15 karldebisschop + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_ldap.c: + add argv[0] to uasge + include common/config.h + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_ldap.c: + encapsulate getopt_long stuff in ifdefs + + * /cvsroot/netsaintplug/netsaintplug/configure.in: + fix solaris check_swap bug - change sscanf format from %*d,%*d to %*[0-9,-] + +2000-02-11 karldebisschop + + * /cvsroot/netsaintplug/netsaintplug/configure.in, /cvsroot/netsaintplug/netsaintplug/plugins/check_ping.c: + modify to check uid and ppid for architectures other than linux + +2000-02-09 karldebisschop + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_procs.c, /cvsroot/netsaintplug/netsaintplug/configure.in: + step one to testing user (actually, userid) and ppid in check_procs + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_ping.c: + get DUP check to give warning + + * /cvsroot/netsaintplug/netsaintplug/configure: + should not be handed down - autoconf locally before making tarballs/RPMS + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_process.c: + use foo[SIZE-1]=0 instead =f '\0' for better compatibility + + * /cvsroot/netsaintplug/netsaintplug/configure.in: + change linux ping syntax to scan for DUPs + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_ping.c: + check for duplicates + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_pgsql.c: + fix DB_NAMELEN and string comparison tests + get rid of waron about discarding constant string + + * /cvsroot/netsaintplug/netsaintplug/configure.in: + use ps for HPUX that is close to working - still broken on check_vsz/rss + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_pgsql.c: + pass authentication info if either passwd or user is given + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_pgsql.c: + allow user without password for authentication + fix dbname check + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_process.c: + Patch submitted by author to use strncpy + +2000-02-08 karldebisschop + + * /cvsroot/netsaintplug/netsaintplug/configure, /cvsroot/netsaintplug/netsaintplug/configure.in: + fix problem with test -e for solaris - kludge with 'cat filename' + + * /cvsroot/netsaintplug/netsaintplug/plugins/popen.h, /cvsroot/netsaintplug/netsaintplug/plugins/utils.h: + superceded bu utils.h.in and popen.h.in + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_dummy.c, /cvsroot/netsaintplug/netsaintplug/plugins/Makefile.in, /cvsroot/netsaintplug/netsaintplug/plugins/netutils.c, /cvsroot/netsaintplug/netsaintplug/plugins/popen.c, /cvsroot/netsaintplug/netsaintplug/plugins/popen.h.in, /cvsroot/netsaintplug/netsaintplug/plugins-scripts/Makefile.in, /cvsroot/netsaintplug/netsaintplug/plugins/utils.c, /cvsroot/netsaintplug/netsaintplug/plugins/utils.h.in, /cvsroot/netsaintplug/netsaintplug/Makefile.in, /cvsroot/netsaintplug/netsaintplug/subst.in: + use configure to check signal return type + use subst.in to fillin command.cfg + +2000-02-05 karldebisschop + + * /cvsroot/netsaintplug/netsaintplug/configure, /cvsroot/netsaintplug/netsaintplug/configure.in: + fix typo - triple slash in a few URLs + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_radius.c: + remove extra comma in terminate subroutine + +2000-02-04 karldebisschop + + * /cvsroot/netsaintplug/netsaintplug/plugins-scripts/check_oracle: + submission by latigid010@yahoo.com + no scratch file + check db option + more normal switches (kdebisschop) + + * /cvsroot/netsaintplug/netsaintplug/configure.in, /cvsroot/netsaintplug/netsaintplug/Makefile.in, /cvsroot/netsaintplug/netsaintplug/netsaint-plugins.spec, /cvsroot/netsaintplug/netsaintplug/plugins/Makefile.in: + compile only base plugins for RPM + fix little glitches in commands.cfg + + * /cvsroot/netsaintplug/netsaintplug/plugins-scripts/check_ntp.pl: + better arg checking for perl taint + +2000-02-01 hgayosso + + * /cvsroot/netsaintplug/netsaintplug/contrib/check_hprsc.tar.gz: + Perl script (check_hprsc) to check HP-UX resources via SNMP daemon (hgayosso) + + * /cvsroot/netsaintplug/netsaintplug/contrib/readme.txt: + check_hprsc.tar.gz added to the contrib plugins (hgayosso) + +2000-01-28 karldebisschop + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_disk.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_dns.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_dummy.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_fping.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_ftp.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_game.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_hpjd.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_http.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_imap.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_ldap.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_load.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_mrtg.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_mrtgtraf.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_mysql.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_netsaint.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_nntp.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_nwstat.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_overcr.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_pgsql.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_ping.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_pop.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_process.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_procs.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_radius.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_real.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_reply.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_smtp.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_snmp.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_ssh.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_swap.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_tcp.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_time.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_udp.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_ups.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_users.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_vsz.c, /cvsroot/netsaintplug/netsaintplug/plugins/Makefile.in, /cvsroot/netsaintplug/netsaintplug/plugins/netutils.c, /cvsroot/netsaintplug/netsaintplug/plugins/netutils.h.in: + get date include correct + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_by_ssh.c: + get date include right + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_by_ssh.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_disk.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_dns.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_dummy.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_fping.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_ftp.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_game.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_hpjd.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_http.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_imap.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_ldap.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_load.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_mrtg.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_mrtgtraf.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_mysql.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_netsaint.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_nntp.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_nwstat.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_overcr.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_ping.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_pop.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_process.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_procs.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_radius.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_real.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_reply.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_smtp.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_snmp.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_ssh.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_swap.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_tcp.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_time.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_udp.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_ups.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_users.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_vsz.c, /cvsroot/netsaintplug/netsaintplug/plugins/Makefile.in, /cvsroot/netsaintplug/netsaintplug/plugins/netsaint.h, /cvsroot/netsaintplug/netsaintplug/plugins/netutils.c, /cvsroot/netsaintplug/netsaintplug/plugins/netutils.h.in, /cvsroot/netsaintplug/netsaintplug/plugins/utils.c: + try to get version includes right + + * /cvsroot/netsaintplug/netsaintplug/netsaint-plugins.spec, /cvsroot/netsaintplug/netsaintplug/plugins/check_procs.c, /cvsroot/netsaintplug/netsaintplug/plugins/utils.c: + get revision listsing fixed + + * /cvsroot/netsaintplug/netsaintplug/plugins/utils.c: + udpate for release 1.2.8pre1 + + * /cvsroot/netsaintplug/netsaintplug/Makefile.in, /cvsroot/netsaintplug/netsaintplug/netsaint-plugins.spec: + update spec for 1.2.8-pre1 + have makefile delete command.cfg on make distclean + + * /cvsroot/netsaintplug/netsaintplug/configure, /cvsroot/netsaintplug/netsaintplug/configure.in, /cvsroot/netsaintplug/netsaintplug/plugins/check_by_ssh.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_disk.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_dns.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_dummy.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_fping.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_ftp.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_game.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_hpjd.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_http.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_imap.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_ldap.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_load.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_mrtg.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_mrtgtraf.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_mysql.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_netsaint.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_nntp.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_nwstat.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_overcr.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_pgsql.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_ping.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_pop.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_process.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_procs.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_radius.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_real.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_reply.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_smtp.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_snmp.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_ssh.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_swap.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_tcp.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_time.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_udp.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_ups.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_users.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_vsz.c, /cvsroot/netsaintplug/netsaintplug/plugins/Makefile.in, /cvsroot/netsaintplug/netsaintplug/plugins/netutils.c, /cvsroot/netsaintplug/netsaintplug/plugins/netutils.h.in, /cvsroot/netsaintplug/netsaintplug/plugins/popen.c, /cvsroot/netsaintplug/netsaintplug/plugins/popen.h, /cvsroot/netsaintplug/netsaintplug/plugins/utils.c, /cvsroot/netsaintplug/netsaintplug/plugins/utils.h: + use print_revision function in utils + use included timeout_handlers throughout [(socket|popen)?alarm_handler] + clean up use of externs in popen.[hc] and utils.[hc] for above + handle percent or KB in check_disk + +2000-01-23 karldebisschop + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_snmp.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_ups.c, /cvsroot/netsaintplug/netsaintplug/plugins/utils.c: + snmp: start trying to clarify hex mesages + ups: manually apply submitted patch + utils: bug fix in is_numeric + + * /cvsroot/netsaintplug/netsaintplug/plugins-scripts/check_ircd.pl, /cvsroot/netsaintplug/netsaintplug/plugins-scripts/check_ntp.pl, /cvsroot/netsaintplug/netsaintplug/plugins-scripts/check_oracle: + minor fixes posted to bugs list: + ircd - fix match string + ntp - return critical if server is down + oracle - make no temp files + +2000-01-22 karldebisschop + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_ping.c, /cvsroot/netsaintplug/netsaintplug/plugins/utils.c: + streamline utils functions is_integer and is_numeric + tighten check_ping error prose so it nearly shows on a 80x24 display + +2000-01-21 karldebisschop + + * /cvsroot/netsaintplug/netsaintplug/configure, /cvsroot/netsaintplug/netsaintplug/configure.in, /cvsroot/netsaintplug/netsaintplug/plugins/check_ping.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_procs.c, /cvsroot/netsaintplug/netsaintplug/plugins/utils.c, /cvsroot/netsaintplug/netsaintplug/plugins/utils.h: + fix bug in adapting configure to check_netsaint + fix omission in check_procs arg testing + fix utils sscanf syntax - linux uses EOF where FreeBSD uses 0 + + * /cvsroot/netsaintplug/netsaintplug/configure, /cvsroot/netsaintplug/netsaintplug/configure.in, /cvsroot/netsaintplug/netsaintplug/plugins/check_pgsql.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_process.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_procs.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_radius.c, /cvsroot/netsaintplug/netsaintplug/plugins/Makefile.in, /cvsroot/netsaintplug/netsaintplug/saintcheck: + add check_process and check_radius as extras + make check_pgsl understand old syntax as well + modify check_procs to look for specific comman names and test on ranges + modify configure.in tests so check_netsaint can maybe work with more OS's + +2000-01-20 karldebisschop + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_by_ssh.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_dns.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_http.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_httpstr.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_pgsql.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_ping.c, /cvsroot/netsaintplug/netsaintplug/plugins/netutils.h.in, /cvsroot/netsaintplug/netsaintplug/plugins/Makefile.in, /cvsroot/netsaintplug/netsaintplug/saintcheck: + set default timeout to 10 seconds + make tests give fewer warnings + move check_httpstr to check_http + +2000-01-19 karldebisschop + + * /cvsroot/netsaintplug/netsaintplug/configure, /cvsroot/netsaintplug/netsaintplug/configure.in, /cvsroot/netsaintplug/netsaintplug/plugins/check_pgsql.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_users.c, /cvsroot/netsaintplug/netsaintplug/plugins/Makefile.in, /cvsroot/netsaintplug/netsaintplug/plugins/utils.c: + use -q option for who if available + use getopt for check_pgsql + make check_users work even if no users are logged in + clean up (developmental) utils.c + +2000-01-17 karldebisschop + + * /cvsroot/netsaintplug/netsaintplug/configure, /cvsroot/netsaintplug/netsaintplug/configure.in: + use the -n switch to prevent host lookups in check_ping + + * /cvsroot/netsaintplug/netsaintplug/configure, /cvsroot/netsaintplug/netsaintplug/configure.in, /cvsroot/netsaintplug/netsaintplug/plugins/check_users.c: + update for FreeBSD: + add new tests for FreeBSD ps syntax + add test for swapinfo command + modify check_users to work without -q option + modify check_vsz test to work without requiring 'init' listing in `ps` output + +2000-01-13 karldebisschop + + * /cvsroot/netsaintplug/netsaintplug/configure, /cvsroot/netsaintplug/netsaintplug/configure.in: + add HAVE_REGEX_H to configure + + * /cvsroot/netsaintplug/netsaintplug/command.cfg.in: + this should be included by reference in hosts.cfg + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_httpstr.c: + check redirects working + regex content search working + +2000-01-10 karldebisschop + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_ping.c, /cvsroot/netsaintplug/netsaintplug/plugins/netutils.c: + Incorporate netsaint_plugins-1.2.7p1 changes: + - Fixed RH 6.1 ICMP error "bug" in check_ping plugin + (patch by Luiz Felipe R E) + - Fixed uninitialized memory bug in netutils.c (patch by Frank Conrad) + +1999-12-28 holoway + + * /cvsroot/netsaintplug/netsaintplug/netsaint-plugins.spec: + I'm a schmuck. :) Would help if I deleted the line, doncha think? + + * /cvsroot/netsaintplug/netsaintplug/netsaint-plugins.spec: + Removed the requirement of netsaint in the rpm build; the plugins may + live on a machine without it. (nrpe or nrpep may use the plugins without + having netsaint proper present) + +1999-12-17 karldebisschop + + * /cvsroot/netsaintplug/netsaintplug/contrib/berger-ping.tar.gz, /cvsroot/netsaintplug/netsaintplug/contrib/bowen-langley_plugins.tar.gz, /cvsroot/netsaintplug/netsaintplug/contrib/check_bgp-1.0.tar.gz, /cvsroot/netsaintplug/netsaintplug/contrib/check_breeze.tar.gz, /cvsroot/netsaintplug/netsaintplug/contrib/check_flexlm.tar.gz, /cvsroot/netsaintplug/netsaintplug/contrib/check_hltherm.tar.gz, /cvsroot/netsaintplug/netsaintplug/contrib/check_ipxping.tar.gz, /cvsroot/netsaintplug/netsaintplug/contrib/check_ircd.tar.gz, /cvsroot/netsaintplug/netsaintplug/contrib/check_memory.tgz, /cvsroot/netsaintplug/netsaintplug/contrib/check_nfs.tar.gz, /cvsroot/netsaintplug/netsaintplug/contrib/check_ntp.tar.gz, /cvsroot/netsaintplug/netsaintplug/contrib/check_real.tar.gz, /cvsroot/netsaintplug/netsaintplug/contrib/check_wave.tar.gz, /cvsroot/netsaintplug/netsaintplug/contrib/hopcroft-plugins.tar.gz, /cvsroot/netsaintplug/netsaintplug/contrib/radius.tar.gz, /cvsroot/netsaintplug/netsaintplug/contrib/readme.txt: + adds files from www.netsaint.org contrib area. + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_httpstr: + add STATE_DEPENDENT to common/common.h + check_httpstr binary should never have been there in the first place + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_httpstr.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_snmp.c: + made actual http check into subroutine + cleaned up help screen + added option checking for --onredirect + added long-style syntax for all other current options + +1999-12-15 holoway + + * /cvsroot/netsaintplug/netsaintplug/netsaint-plugins.spec: + Modified the spec file to change the name of the tarball to + netsaint-plugins-version-release.tar.gz + + * /cvsroot/netsaintplug/netsaintplug/netsaint-plugins.spec: + Added the spec file for creating RPMs from the CVS source. + +1999-12-14 karldebisschop + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_httpstr.c: + checkpoint - incorporate version info in header + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_httpstr: + use version.h for release date tracking + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_httpstr.c: + use sscanf to clean up HTTP error code checking + +1999-12-10 karldebisschop + + * /cvsroot/netsaintplug/netsaintplug/plugins-scripts/check_ircd.pl, /cvsroot/netsaintplug/netsaintplug/plugins-scripts/check_nfs.pl, /cvsroot/netsaintplug/netsaintplug/plugins-scripts/check_ntp.pl, /cvsroot/netsaintplug/netsaintplug/plugins-scripts/check_wave.pl: + Initial checkin. + Release 1.2.7 plus bugfixes + + * /cvsroot/netsaintplug/netsaintplug/plugins-scripts/check_ircd.pl, /cvsroot/netsaintplug/netsaintplug/plugins-scripts/check_nfs.pl, /cvsroot/netsaintplug/netsaintplug/plugins-scripts/check_ntp.pl, /cvsroot/netsaintplug/netsaintplug/plugins-scripts/check_wave.pl: + New file. + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_httpstr, /cvsroot/netsaintplug/netsaintplug/plugins-scripts/check_breeze.pl, /cvsroot/netsaintplug/netsaintplug/plugins-scripts/check_disk_smb.pl, /cvsroot/netsaintplug/netsaintplug/plugins-scripts/check_flexlm.pl, /cvsroot/netsaintplug/netsaintplug/plugins-scripts/check_log, /cvsroot/netsaintplug/netsaintplug/plugins-scripts/check_oracle: + Initial checkin. + Release 1.2.7 plus bugfixes + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_httpstr, /cvsroot/netsaintplug/netsaintplug/plugins-scripts/check_breeze.pl, /cvsroot/netsaintplug/netsaintplug/plugins-scripts/check_disk_smb.pl, /cvsroot/netsaintplug/netsaintplug/plugins-scripts/check_flexlm.pl, /cvsroot/netsaintplug/netsaintplug/plugins-scripts/check_log, /cvsroot/netsaintplug/netsaintplug/plugins-scripts/check_oracle: + New file. + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_httpstr.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_real.c, /cvsroot/netsaintplug/netsaintplug/plugins/Makefile.in, /cvsroot/netsaintplug/netsaintplug/plugins/utils.c, /cvsroot/netsaintplug/netsaintplug/plugins/utils.h: + Initial checkin. + Release 1.2.7 plus bugfixes + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_httpstr.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_real.c, /cvsroot/netsaintplug/netsaintplug/plugins/Makefile.in, /cvsroot/netsaintplug/netsaintplug/plugins/utils.c, /cvsroot/netsaintplug/netsaintplug/plugins/utils.h: + New file. + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_by_ssh.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_netsaint.c: + Initial checkin. + Release 1.2.7 plus bugfixes + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_by_ssh.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_netsaint.c: + New file. + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_fping.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_game.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_ldap.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_mysql.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_reply.c, /cvsroot/netsaintplug/netsaintplug/plugins/netsaint.h, /cvsroot/netsaintplug/netsaintplug/plugins/netutils.c, /cvsroot/netsaintplug/netsaintplug/plugins/netutils.h.in, /cvsroot/netsaintplug/netsaintplug/plugins/popen.c, /cvsroot/netsaintplug/netsaintplug/plugins/popen.h: + Initial checkin. + Release 1.2.7 plus bugfixes + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_fping.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_game.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_ldap.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_mysql.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_reply.c, /cvsroot/netsaintplug/netsaintplug/plugins/netsaint.h, /cvsroot/netsaintplug/netsaintplug/plugins/netutils.c, /cvsroot/netsaintplug/netsaintplug/plugins/netutils.h.in, /cvsroot/netsaintplug/netsaintplug/plugins/popen.c, /cvsroot/netsaintplug/netsaintplug/plugins/popen.h: + New file. + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_overcr.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_snmp.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_ssh.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_ups.c: + Initial checkin. + Release 1.2.7 plus bugfixes + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_overcr.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_snmp.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_ssh.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_ups.c: + New file. + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_swap.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_tcp.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_time.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_udp.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_users.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_vsz.c: + Initial checkin. + Release 1.2.7 plus bugfixes + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_swap.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_tcp.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_time.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_udp.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_users.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_vsz.c: + New file. + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_pgsql.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_ping.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_pop.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_procs.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_smtp.c: + Initial checkin. + Release 1.2.7 plus bugfixes + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_pgsql.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_ping.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_pop.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_procs.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_smtp.c: + New file. + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_mrtgtraf.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_nntp.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_nwstat.c: + Initial checkin. + Release 1.2.7 plus bugfixes + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_mrtgtraf.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_nntp.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_nwstat.c: + New file. + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_hpjd.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_http.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_imap.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_load.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_mrtg.c: + Initial checkin. + Release 1.2.7 plus bugfixes + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_hpjd.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_http.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_imap.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_load.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_mrtg.c: + New file. + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_disk.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_dns.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_dummy.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_ftp.c: + Initial checkin. + Release 1.2.7 plus bugfixes + + * /cvsroot/netsaintplug/netsaintplug/plugins/check_disk.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_dns.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_dummy.c, /cvsroot/netsaintplug/netsaintplug/plugins/check_ftp.c: + New file. + + * /cvsroot/netsaintplug/netsaintplug/configure, /cvsroot/netsaintplug/netsaintplug/configure.in, /cvsroot/netsaintplug/netsaintplug/install-sh, /cvsroot/netsaintplug/netsaintplug/saintcheck: + Initial checkin. + Release 1.2.7 plus bugfixes + + * /cvsroot/netsaintplug/netsaintplug/configure, /cvsroot/netsaintplug/netsaintplug/configure.in, /cvsroot/netsaintplug/netsaintplug/install-sh, /cvsroot/netsaintplug/netsaintplug/saintcheck: + New file. + + * /cvsroot/netsaintplug/netsaintplug/Changelog, /cvsroot/netsaintplug/netsaintplug/INSTALL, /cvsroot/netsaintplug/netsaintplug/Makefile.in, /cvsroot/netsaintplug/netsaintplug/README, /cvsroot/netsaintplug/netsaintplug/REQUIREMENTS: + Initial checkin. + Release 1.2.7 plus bugfixes + + * /cvsroot/netsaintplug/netsaintplug/Changelog, /cvsroot/netsaintplug/netsaintplug/INSTALL, /cvsroot/netsaintplug/netsaintplug/Makefile.in, /cvsroot/netsaintplug/netsaintplug/README, /cvsroot/netsaintplug/netsaintplug/REQUIREMENTS: + New file. + +NetSaint Plugins Changelog +-------------------------- + +Current +------- +1.2.9-a6 - 25 August 2000 (alpha code) +-------------------------------------- +* check_disk + (process_arguments) remove stray debugging printf in -p option +* plugins/Makefile.am + (check_netsaint) move to EXTRAS + + +1.2.9-a5 - 23 August 2000 (alpha code) +-------------------------------------- +* check_fping + (main) check rta and packet loss, control packet size and count + (process_arguments) add options for number of packets and size +* check_tcp + (main) alter to run as any of check_(ftp|imaop|pop|smtp|tcp|ucp) +* check_rpc + (main) fix checking against initial error state (start UNKNOWN) +* plugins-scripts/Makefile.am + fix install.dist for utils.pm and utils.sh + +1.2.9-a2 - 12 July 2000 (alpha code) +------------------------------------ +* check_http + (check_http) remove "\r\n" pair causing problems for zope + (print_help) fix documentation +* check_disk + (global) malloc string pointers for most character variables + (print_help) fix documentation + (call_getopt) use comma for pairs of options, reserve colon for ranges + (main) use new ssprintf function to assemble 'command_line' + don't sscanf for mount point +* check_load + (global) malloc string pointers for most character variables + (main) use getopt + (process_arguments, print_help, print_usage) new functions +* check_procs + (main) was reporting too many matches due to strncmp +* check_swap + (global) malloc string pointers for most character variables + (main) use getopt + (process_arguments, print_help, print_usage) new functions +* check_time + (global) malloc string pointers for most character variables + (main) use getopt + (process_arguments, print_help, print_usage) new functions +* check_tcp + (print_help) fix documentation +* check_udp + (global) malloc string pointers for most character variables + (main) use getopt + (process_arguments, print_help, print_usage) new functions +* check_users + (global) malloc string pointers for most character variables + (main) use getopt + (process_arguments, print_help, print_usage) new functions +* utils + (strscpy) new -- safe string copy does its own malloc + (strscat) new -- safe string cat does its own malloc + (ssprintf) new -- safe string sprintf does its own malloc + +1.2.9-a1 - 3 July 2000 (alpha code) +----------------------------------- +* check_by_ssh.c (main) allow multiple services for passive checks + (call_getopt) add options needed for passive multichecks +* check_disk.c (main) check all mounted partitions if none specified +* check_fping.c (main) use getopt + (process_arguments, print_help, print_usage) new functions +* check_ftp.c (main) use getopt + (process_arguments, print_help, print_usage) new functions +* check_ping.c (check_ping) return critical if output comes on STDERR + add another sscanf for FreeBSD +* check_procs.c (print_usage) fix docs +* check_tcp.c (main) use getopt + (process_arguments, print_help, print_usage) new functions +* check_users.c (main) use getopt + (process_arguments, print_help, print_usage) new functions +* utils.h (macros) provide standard usage() macro +* rearrange directory for multiplatform builds +* test scripts added for check_fping and check_tcp + +1.2.8.4 +------- +* check_ping.c (process_arguments): don't malloc - just copy pointer + tweak to get non-POSIX order working + (call_getopt): don't malloc - just copy pointer + +1.2.8.3 - 22 June 2000 +---------------------- +* check_http.c (process_arguments): add -nothml to reverse-compat rewrites + (call_getopt): set display_html false for '-n' +* check_procs.c (print_help): update docs + (print_usage): update docs + (call_getopt): fix long option (was 'program', is 'command') + (main): allow inverted order of max/min for outside ranges + (validate_arguments): some valid, though strange, thresholds were rejected +* check_ssh.c (ssh_connect): fix display of host name for connect fails +* check_ping.c (process_arguments): add -nothml to reverse-compat rewrites + fix malloc error - need to malloc strlen+1 + (call_getopt): fix malloc error - need to malloc strlen+1 +* check_disk.c (main): use new terminate + (print_usage): typo in printout +* utils.h.in (terminate): update prototype for terminate +* utils.c (terminate): allow terminate to accept format,arglist as printf +* check_sensors.sh (print_revision): fix bug in Revision string cleanup +* netsaint-plugins.spec: make relocatable + use macros throughout +* netsaint-plugins-custom.spec: make relocatable + use macros throughout +* make-tarball: create md5sum + do some rpm setup + +1.2.8-2 - 16 June 2000 +---------------------- +* check_ping.c (run_ping): was not warning of DUPLICATES anymore, fixed + (all): switch most fixed length buffers to malloc + (print_usage): fix documentation + (print_help): fix documentation + (call_getopt): make nohtml the default, add -L (--link) option +* check_http.c (check_http): more rigorous header/content separation + alter verbose printout to show header, status, and content divisions + (process_arguments): distinguish server and vhost + (call_getopt): distinguish server and vhost + (print_usage): document new -I option for server IPaddress + (print_help): document new -I option for server IPaddress + (all): reindent, tabify +* plugins-scripts/Makfile.in (install): add $(DESTDIR) +* plugins/Makefile.in (install): add $(DESTDIR) + fix for case where there are no extras + (check_ldap): add NETLIBS and SOCKETLIBS + (check_process): remove (obolete) + (all): reorder $(CC) args so -o comes earlier +* check_process.c (all): move to obsolete directory +* configure (check_process): remove (obolete) +* check_procs.c (all): change variable name for 'stat' to 'statopt' for AIX ?bug? + (print_help): fix typo +* check_dns.c (print_help,print_usage): fix documentation + (all): c-indent and retabify +* subst.in (/bin/mktemp): -q option breaks HPUX +* check_sensors.sh (print_help): new function + (print_usage): new function + (main): add --help, --version, --verbose options + (print_revision): make more GNU compatible +* utils.c (print_revision): print license to be more GNU standard +* utils.h.in: add #defines for STDOPTS +* check_rpc.pl (all): fix a few introductory comments +* check_vsz.c (main): move option processing to new process_arguments function + (all): retabify + use malloc and remove most fixed text string sizes +* check_snmp.c (print_help,print_usage): add items, fix typo +* check_by_ssh.c (parse_arguments): bugfix - increment 'c' in remote command parsing +* check_ldap.c (main): add timeout alarm + +1.2.8 - 9 June 2000 +------------------- +* check_by_ssh.c (parse_arguments): bugfix in remote command parsing + +1.2.8pre7 - 8 June 2000 +----------------------- +- make getopt() calls mostly backwards-compatible with all older + options specifications the do not directly conflict with present + standard. (pre-release 2 was only backwards compatible when compiled + against GNU getopt). +- integrate ssl code from Rene Klootwijk into check_http +- a variety of small bug fixes (mostly cases where I left development + printing code in plugin [KBD]). +- add -v (--verbose) option to check_http tp print out page(s) as they + are read and any redirects are followed (if specified in options). +- malloc variable for page contents in check_http so that entire page + can be scanned for strings or regular expressions. +- add urlize to wrap plugin output in HTML link tags, make no-html the + default for check_http. +- develop RPM specs netsaint-plugins.spec with a controlled list of + files in the package, and netsaint-plugins-custom.spec which will + rebuild differently based on the packages installed on the build + machine. + +1.2.8pre2 - 2 May 2000 +---------------------- +- Modify check_snmp to process multiple OIDs in a request (args not backward + compatible) +- Use getopt in check_by_ssh, check_disk, check_dns, check_ldap, check_pgsql, + check_ping, check_procs, check_snmp +- integrate enhancements from check_process [Rene Klootwijk] into check_procs + (including filter by user, parent PID and process name) +- add check_https plugin contributed by Rene Klootwijk +- add check_ide-smart contributed by Robert Dale +- add backward compatibility on check_ping args +- add Makefile for scripts, process trusted path for portability +- use perl test harness in place of saintcheck hack +- fix all plugins calling spopen to also open stderr +- add check_rpc script to replace check_nfs and check_ypbind +- replace check_oracle script with enhanced version by litigid010@yahoo.com +- modularize ping checking loop in check_ping to later allow adaptive loop + count within the plugin +- modify check_disk to accept either paths that are not partition mount points +- modify several plugins to print version number in response to --version opt +- begin distinction between --help (may be many screens) and --usage (1 to 10 + lines only) +- maintain commands.cfg file with syntactically correct command definitions + +1.2.7 - 11/09/1999 +------------------ +- Added check_ntp plugin script contributed by Bo Kersey +- Added check_real plugin contributed by Pedro Leite +- Added check_netsaint plugin +- Added delimiter option to check_snmp plugin +- Added STR and SUBSTR evaluation options to check_snmp plugin +- Fixed bug in check_hpjd where it would erroneously report timeout errors +- Added option to suppress HTML link in check_http and check_ping plugins +- Modified check_http plugin to send carriage returns in http request +- Modified configure script and check_ping plugin to work under FreeBSD +- Changed command line format for check_ping plugin!! + + +1.2.6 - 10/16/1999 +------------------ +- Several plugin bugfixes by Karl DeBisschop +- Added 'saintcheck' script contributed by Karl DeBisschop that can be used + to test various plugins before they are used +- Added check_nfs and check_flexlm plugin scripts contributed by + Ernst-Dieter Martin +- Added check_breeze and check_wave plugin scripts contributed by Jeffrey Blank +- Added check_ircd plugin script contributed by Richard Mayhew + + +1.2.5 - 09/19/1999 +------------------ +- Fixed bug with expect argument (-e) in check_http plugin +- Added additional ping command format to configure script ( -n ) +- Switched several plugins to safer version of popen() contributed by Karl + DeBisschop +- Added basic authentication ability to check_http plugin as contributed by + Perry Clarke +- Changed check_imap expect string to "* OK" (repoted by Matt Shibla) and + default port to 143 (reported by Darin Fisher) +- Added check_reply plugin contributed by Jacob Jundqvist + + +1.2.4 - 08/26/1999 +------------------ +- Added check_ldap and check_mysql plugins contributed by Dietmar Rieder +- Added check_game plugin contributed by Ian Cass +- Modified configure script to work with ping command under OpenBSD + + +1.2.3 - 08/18/1999 +------------------ +- Modified most plugins to use common network utilities and include files +- Plugins no longer create temp files (expect the check_log plugin script) + + +1.2.2 - 08/15/1999 +------------------ +- Modified plugins to create temp files in var/ subdirectory of installation +- Added Michael Anton's check_disk_smb.pl plugin + + +1.2.1 - 08/01/1999 +------------------ +- Added $(SOCKETLIBS) to Makefile for Over-CR plugin +- Added quotes around query in check_log plugin to allow for multiple word + queries +- Added a check for no supported options in the check_ups plugin + + +1.2.0 - 07/30/1999 +------------------ +- Added new check_log plugin script +- Added timeout alarm to the check_ssh plugin +- Added "not equal" evaluation method to check_snmp plugin +- Added new check_ups plugin (only tested on APC SmartUPS 2200) + + +1.1.0 - 07/23/1999 +------------------ +- Added new check_ssh plugin contributed by Remi Paulmier +- Added new check_overcr and check_snmp plugins +- Fixed the help screen on the check_nwstat plugin to correctly reflect the + meanings of the warn_value and crit_value variables. +- Fixed some problems with the check_load plugin to make it compile under + NetBSD +- Minor tweaks to various plugins + + +1.0.0 - 07/13/1999 +------------------ +- Initial release of plugins as a separate distribution + + + + diff --git a/FAQ b/FAQ new file mode 100644 index 0000000..5d59a41 --- /dev/null +++ b/FAQ @@ -0,0 +1,81 @@ +Frequently Asked Questions +************************** + +1. Q: Where can I find documentation for plugin? + + A: All plugins that comply with minimal development guideline for + this project include internal documentation. The documentation + can be read executing plugin with the '-h' option ('--help' if + long options are enabled). If the '-h' option does not work, that + is a bug. + +2. Q: What version of plugin am I running? + + A: All plugins that comply with minimal development guideline for + this project include detailed version information. When executed + with the '-V' option, a version string will be printed: + + check_radius (nagios-plugins 1.3.0-alpha1) 1.11 + + Note that this string include both the assigned package release + name and the CVS-generated revision for the individual plugin. + Authors hould strictly adhere to this format. All bug reports + and help requests should reference this information. + +3. Q: What information do I need to include when asking for help or + submitting a bug report? + + A: At a minimum, the output from 'uname -a' and the version string + from ' -V' and, of course, a description of the + problem and any solution/patch. + +4. Q: I'm using Redhat Linux (or some other RPM-based distribution). + Which packages should I install? + + A: The package nagios-plugins-..rpm contains only + those plugins that should work on any POSIX compliant system. In + other words, you should be able to install this package on your + system, no matter what else is or in not installed. + + However, most of us have more complex systems than barebones + POSIX. We tried creating a variety of separate packages so + each dependency could be installed cleanly, but many people + found that this resulted in too many packages. So in the end, + all the non-POSIX plugins were folded into one RPM + (nagios-plugins-..rpm). Most people will need to + use RPM's '--nodeps' option to install this package. + +5. Q: My sysem uses the .deb package format. What pacakges should I + install? + + A: We strive for cooperation between all packagers and developers. + The answers for .deb are the same as for RPM, afetr changing the + package name suffixes accordingly. + +6. Q: I prefer to build my own RPMs. Do I need to install all of the + various dependencies? + + A: Beginning with the 1.2.9-1 release, you may run + + rpm --define 'custom 1' -ta nagios-plugins-.tar.gz + + In prior releases, you must unpack the tarball and build the + RPM using nagios-custom.spec with 'rpm -ba'. + +7. Q: I get an error like + + Warning: Return code of 127 for check of service 'PING' on host 'anyhost' was out of bounds. + + when I run Nagios. (Often check_ping runs just fine on the + command line). + + A: Commonly, system adminitartors will make security as tight as + possible on the monitoring system. Sometimes this includes OS + options or hardening scripts that prevent unpriveleged users from + running the ping command. Nagios runs with no more priveleges + than 'nobody' -- check to be sure that the nagios user can + actually run check ping. (This can also happen with other binaries + executed by nagios, but ping seems to be far and away the biggest + offender.) + + diff --git a/Helper.pm b/Helper.pm new file mode 100644 index 0000000..198a648 --- /dev/null +++ b/Helper.pm @@ -0,0 +1,44 @@ +package Helper; +use strict; + +use Exporter(); +use vars qw($VERSION @ISA @EXPORT); +$VERSION = 0.01; +@ISA=qw(Exporter); +@EXPORT=qw(&get_option); + +sub get_option ($$) { + my $file = 'Cache'; + my $response; + my $var = shift; + + require "$file.pm"; + if(defined($Cache::{$var})){ + $response=$Cache::{$var}; + return $$response; + } + + my $request = shift; + my $filename; + my $path; + foreach $path (@INC) { + $filename="$path/$file.pm"; + last if (-e $filename); + } + print STDERR "Enter $request\n"; + $response=; + chop($response); + open(CACHE,"<$filename") or die "Cannot open cache for reading"; + undef $/; + my $cache = ; + $/="\n"; + close CACHE; + $cache =~ s/^(\@EXPORT\s*=\s*qw\(\s*[^\)]*)\)\s*;/$1 $var\)\;/msg; + $cache =~ s/^1;[\n\s]*\Z/\$$var=\"$response\"\;\n1\;\n/msg; + open(CACHE,">$filename") or die "Cannot open cache for writing"; + print CACHE $cache; + close CACHE; + return $response; +} + +1; diff --git a/INSTALL b/INSTALL new file mode 100644 index 0000000..c918a12 --- /dev/null +++ b/INSTALL @@ -0,0 +1,49 @@ +Nagios Plugins Quick-and-Dirty Installation Instructions +-------------------------------------------------------- + +0) If using the CVS tree, you need m4, automake, and autoconf. To + start out, run: + + # autoconf + # autoheader + # automake + + +1) Run the configure script to initialize variables and create a Makefile, etc. + + ./configure --prefix=BASEDIRECTORY --with-nagios-user=SOMEUSER --with-nagios-group=SOMEGROUP --with-cgiurl=SOMEURL + + a) Replace BASEDIRECTORY with the path of the directory under which Nagios + is installed (default is '/usr/local/nagios') + b) Replace SOMEUSER with the name of a user on your system that will be + assigned permissions to the installed plugins (default is 'nagios') + c) Replace SOMEGRP with the name of a group on your system that will be + assigned permissions to the installed plugins (default is 'nagios') + d) Replace CGIURL with the path used to access the Nagios CGIs with + a web browser (default is '/cgi-bin/nagios') + + +2) Compile the plugins with the following command: + + make all + + +3) Install the compiled plugins and plugin scripts with the following command: + + make install + + NOTE: + The installation procedure will attempt to place the plugins in a + 'libexec/' subdirectory in the base directory you specified with + the --prefix argument to the configure script. + + +4) Verify that your host configuration file (hosts.cfg) for Nagios contains + the correct paths to the new plugins. + + + +That's it. If you have any problems or questions, feel free send mail +to nagios-users@lists.sourceforge.net + + diff --git a/LEGAL b/LEGAL new file mode 100644 index 0000000..147fc98 --- /dev/null +++ b/LEGAL @@ -0,0 +1,10 @@ + +All source code, binaries, documentation, and information contained +in this distribution are provided AS IS with NO WARRANTY OF ANY KIND, +INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY, AND FITNESS FOR +A PARTICULAR PURPOSE. + +Nagios and the Nagios logo are trademarks of Ethan Galstad. All +other trademarks, servicemarks, registered trademarks, and +registered servicemarks are the property of their respective owner(s). + diff --git a/Makefile.am b/Makefile.am new file mode 100644 index 0000000..d1c7a68 --- /dev/null +++ b/Makefile.am @@ -0,0 +1,9 @@ +## Process this file with automake to produce Makefile.in + +SUBDIRS = plugins plugins-scripts + +EXTRA_DIST = REQUIREMENTS acconfig.h package.def subst.in subst.sh Helper.pm nagios-plugins.spec contrib + +test: + cd plugins; $(MAKE) test + cd plugins-scripts; $(MAKE) test diff --git a/NEWS b/NEWS new file mode 100644 index 0000000..1c3c54c --- /dev/null +++ b/NEWS @@ -0,0 +1,2 @@ +New in 1.2.9: +* Added support for multiplatform builds diff --git a/README b/README new file mode 100644 index 0000000..a9591ec --- /dev/null +++ b/README @@ -0,0 +1,42 @@ +Nagios Plugins README +--------------------- + +* For instructions on installing these plugins for use with Nagios, read + the INSTALL file. + +* For information on what chages have been made or plugin have been added, + read the Changelog file. + +* Some plugins require that you have additional programs and/or + libraries installed on your system before they can be used. Plugins + that are dependent on other programs/libraries that are missing are + usually not compiled. Read the REQUIREMENTS file for more information. + +* Individual plugins are self documenting. All plugins that comply with + the basic guidleines for development will provide detailed help when + invoked with the '-h' option ('--help' also, if long options are enabled). + +* The file command.cfg contains xample configurations for many of the + plugins + +You can check for the latest plugins at: + ftp://download.sourceforge.net/pub/sourceforge/nagiosplug + http://sourceforge.net/projects/nagiosplug/ + +Send mail to nagiosplug-help@lists.sourceforge.net for assistance. Please +include the OS type and version that you are using. Also, run the plugin with +the '-v' option and provide the resulting version information. Of course, +there may be additional diagnostic information required as well. Use good +judgement. + +Send mail to nagiosplug-devel@lists.sourceforge.net for developer discussions. + +For patch submissions and bug reports, please use the appropriate resources at +http://sourceforge.net/projects/nagiosplug/ (navigate to the bug tool and/or +patch tool from the summary page). Patches should be relative to the current +CVS head (development), or to the head of the current stable branch. Also, +please include version information for your OS and the plugin(s) your are +patching/reporting. + +-- +Karl DeBisschop (kdebisschop@users.sourceforge.net) diff --git a/REQUIREMENTS b/REQUIREMENTS new file mode 100644 index 0000000..fe3403e --- /dev/null +++ b/REQUIREMENTS @@ -0,0 +1,52 @@ +Nagios Plugin Requirements +-------------------------- + +Some plugins require that you have additional programs and/or +libraries installed on your system before they can be used. Plugins +that are dependent on other programs/libraries that are missing are +usually not compiled. Requirements for various plugins are listed +below... + +check_fping: + - Requires the fping utility distributed with SATAN. Either + download and install SATAN or grab the fping program from + http://www.stanford.edu/~schemers/docs/fping/fping.html + ftp://ftp.redhat.com/pub/contrib/libc6/SRPMS/fping-2.2b1-1.src.rpm + ftp://ftp.redhat.com/pub/contrib/libc6/RPMS/fping-2.2b1-1.i386.rpm + Note that the fping command must be setuid root to function. + +check_game: + - Requires the qstat utility available from + http://www.activesw.com/people/steve/qstat.html + Last tested on qstat 2.3d BETA + +check_hpjd: + - Requires the UCD-SNMP package available from + http://ucd-snmp.ucdavis.edu + The snmpget binary is all that is required. + +check_ldap: + - Requires the LDAP libraries available from + http://www.openldap.org + Lib: libldap, liblber + Redhat Source: openldap-1.2.9-6.i386.rpm, openldap-devel-1.2.9-6.i386.rpm + +check_mysql: + - Requires the MySQL libraries available from + http://www.mysql.org + Lib: libmysql, libmysqlclient + Redhat Powertools Source: mysql-3.20.32a-3.i386.rpm, mysql-devel-3.20.32a-3.i386.rpm (these seem to be broken, however) + RPMS from www.mysql.org work better + +check_pqsql: + - Requires the PostgreSQL libraries available from + http://www.postgresql.org + +check_radius: + - Requires the radiusclient library available from + http://www.cityline.net/~lf/radius/ + RPM (rpmfind): radiusclient-0.3.1-1, radiusclient-devel-0.3.1-1 + +check_snmp: + - Requires the UCD-SNMP package available from + http://ucd-snmp.ucdavis.edu diff --git a/ROADMAP b/ROADMAP new file mode 100644 index 0000000..10fcd12 --- /dev/null +++ b/ROADMAP @@ -0,0 +1,117 @@ + +Releases in the 1.3 series will be for development. Version 1.4.0 will +be the next full production release. I am not planning on dates right now, +but you can expect maintennence releases for 1.2.9 as well. + +With that done, it's time to figure out what we are doing for release +1.3 development. I have a few ideas. Maybe others do as well. + +DOCUMENTATION: + We pretty much have decieded that we will doing something along + the lines of a literate programming model. So far, we have site + documentation in DocBook. I have some ideas here, which I will + discuss in a separate thread. + + + +OPTION PROCESSING: + I believe we can remove reverse compatibility for non-Getopt + option specifications. For example, 'check_ping 1 2 3 4 -p 2' + would not be supported anymore. Support for this is a hack, + and making it portable is bug-prone. We should also review + standardization of our options -- the current list is a little + ad hoc, it should be nailed down. Details in a separate thread. + +Also, + + check_http -p 443 --ssl www.infoplease.com + +should be fine, but if the getopt in use does not natively support it, +things like + + check_http www.infoplease.com -p 443 --ssl + +should be trapped and result in a call to one of the usage macros +(which print a message and then exit STATE_UNKNOWN). + +This means that the call_getopt() function can go away. It's an +inconsistent mess and I'd love to ditch it. I only created it to +satisfy people that wanted reverse compatibility and did not have +GNU getopt. + +Bu I would like to urge that all standard plugins contain +validate_arguments(). I think this will help convey the idea that +validations hould be done, even if we don't insist on the specific +extent that each plugin must do that validation. + +This is the set of standard options I envision: + +Reserved: + +-h, --help (REQUIRED!!!!!) +-V, --version (REQUIRED!!!!!) +-v, --verbose +-q, --quiet +-t, --timeout = INTEGER (senonds) +-c, --critical = (INT|FLOAT|RANGE|LIST) +-w, --warning = (INT|FLOAT|RANGE|LIST) +-H, --hostname = STRING +-F, --file = STRING (usually input) +-O, --output = STRING (output file) + +Recommended, but not reserverd: + +-I, --ipaddress = STRING +-C, --community = STRING +-a, --auth(info) = STRING (authentication or password) +-l, --logname = STRING +-p, --password = STRING +-P, --port = INT +-u, --url = STRING (also --username if --url is not needed) + +I am suggesting that port alway be '-P' (uppercase) -- we are +currently inconsistent in that regard. + +I am also adding '-q' for silent running. This is totally self +centered--I am planning to use a plugin in a cron script, and I +don't want nightly emails. + +As has been the case, ranges are specified with colons, like 'i:j' +and list are specified with commas like 'i,k' and may contain ranges +if it makes sense to do so. Perhaps it would be good to build a +standard list/range processing function for this task. + + +Programming: + I would like to follow the GNU guidelines and remove all fixed + length character assignments, at least to the extent possible, + from the C-based plugins. To that end, I have made strscpy and + friends in utils.c -- I'd like to deploy them. I have comments + that there is alot of duplicated code, and techniques used that + should be cleaned up. Details in a separate thread. + +Remote checks: + I have a proposal in hand to incorporate ssh check into spopen() + so that remote machine checks can be seemless. A nice idea, but + complex enough to require discussion. Another thread. + +I also have a wish list, and I'm sure I've forgot some items. I'll +list mine, please respond with other items that can be put into the +sourceforge task manager: + + Indent all code in a GNU-compatible manner (indent -ts 2 -br) + Add RAND_seed to check_http for --ssl on systems without /dev/random + Add regex filtering to check_procs --args option + Add working procs syntax for AIX check_procs + Allow check_disk to exclude non-local disks + Add md5 checksumming to check_http + Complete unification of check_tcp and friends + Add SSL in a general way to check_tcp and friends + Patches to check_log from Joonas + Add calculator engine and snmpwalk to check_snmp + Is there a bug in check_oracle + Are there outstanding bugs in check_snmp + Change check_http --onredirect to default as STATE_UNKNOWN + Create plugin to check tftp servers + Create plugin wrapper to invert error status + diff --git a/Requirements b/Requirements new file mode 100644 index 0000000..79e9990 --- /dev/null +++ b/Requirements @@ -0,0 +1,11 @@ +This file is NOT authoritative. It is simply a guide to users who need to locate a given dependency + + + +check_ldap + Lib: libldap, liblber + Redhat Source: openldap-1.2.9-6.i386.rpm, openldap-devel-1.2.9-6.i386.rpm + +check_mysql + Lib: libmysql, libmysqlclient + Redhat Powertools Source: mysql-3.20.32a-3.i386.rpm, mysql-devel-3.20.32a-3.i386.rpm diff --git a/acconfig.h b/acconfig.h new file mode 100644 index 0000000..c9786c1 --- /dev/null +++ b/acconfig.h @@ -0,0 +1,37 @@ +#undef CGIURL +#undef DF_COMMAND +#undef HAVE_GETOPT_H +#undef HAVE_GETOPT_LONG +#undef HAVE_PROC_LOADAVG +#undef HAVE_PROC_MEMINFO +#undef HAVE_SSL +#undef HAVE_SWAP +#undef NSLOOKUP_COMMAND +#undef PACKAGE_VERSION +#undef PATH_TO_DIG +#undef PATH_TO_FPING +#undef PATH_TO_QSTAT +#undef PATH_TO_SNMPGET +#undef PATH_TO_SNMPGETNEXT +#undef PATH_TO_UPTIME +#undef PING_COMMAND +#undef PING_PACKETS_FIRST +#undef POSIX_STATE_DEFS +#undef PROC_LOADAVG +#undef PROC_MEMINFO +#undef PS_COMMAND +#undef PS_FORMAT +#undef PS_RAW_COMMAND +#undef PS_VARLIST +#undef RSS_COMMAND +#undef RSS_FORMAT +#undef SOCKET_SIZE_TYPE +#undef SSH_COMMAND +#undef SWAP_COMMAND +#undef SWAP_FORMAT +#undef USE_PS_VARS +#undef VSZ_COMMAND +#undef VSZ_FORMAT +#undef WHO_COMMAND +#undef PACKAGE +#undef VERSION diff --git a/aclocal.m4 b/aclocal.m4 new file mode 100644 index 0000000..b75859d --- /dev/null +++ b/aclocal.m4 @@ -0,0 +1,35 @@ +dnl aclocal.m4 generated automatically by aclocal 1.4-p5 + +dnl Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl This program is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without +dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A +dnl PARTICULAR PURPOSE. + +# Like AC_CONFIG_HEADER, but automatically create stamp file. + +AC_DEFUN([AM_CONFIG_HEADER], +[AC_PREREQ([2.12]) +AC_CONFIG_HEADER([$1]) +dnl When config.status generates a header, we must update the stamp-h file. +dnl This file resides in the same directory as the config header +dnl that is generated. We must strip everything past the first ":", +dnl and everything past the last "/". +AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl +ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>, +<>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>, +<>; do + case " <<$>>CONFIG_HEADERS " in + *" <<$>>am_file "*<<)>> + echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx + ;; + esac + am_indx=`expr "<<$>>am_indx" + 1` +done<<>>dnl>>) +changequote([,]))]) + diff --git a/command.cfg.in b/command.cfg.in new file mode 100644 index 0000000..4ccb26c --- /dev/null +++ b/command.cfg.in @@ -0,0 +1,184 @@ +############################################################################### +# COMMAND CONFIGURATION +# +# $Id$ +# +# SYNTAX: +# command[]= +# +# = A short name used to identify the command +# = The actual command line. The command line doesn't have to +# be surrounded in quotes, but may contain quotes as needed within +# the command line. Take care to use single quotes at the +# outer edges of commands or you will have command line +# expansion problems when the command is executed by the shell. +# Any valid shell command can be used. Multiple commands can +# be separated with semicolons, piping is allowed. The +# command line can contain macros, but not are macros are valid +# at all time (notifications, service checks, etc). See the +# HTML documentaion for more informationon on using macros in +# commands. +# +# Note: Service check, service notification, host check, host notification, +# service event handler, and host event handler functions are all defined +# here. +############################################################################### + +# Service notification command - send email with problem summary + +command[notify-by-email]=/bin/printf "$OUTPUT$" | /bin/mail -s '$SERVICESTATE$ alert for $HOSTALIAS$/$SERVICEDESC$' $CONTACTEMAIL$ + +# Service notification command - send email to alphanumeric pager +# gateway The notify-by-epager command assumes that each contact has a +# pager email gateway, and that the address has been entered into the +# appropriate contact field instead of an actual pager number. +# (i.e. 'pagejoe@nowhere.com' routes mail to Joe's alphanumeric pager) + +command[notify-by-epager]=/bin/echo "$OUTPUT$" | /bin/mail -s '$HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$' $CONTACTPAGER$ + +# Host notification commands (one for email, one for alphanumeric +# pager with email gateway) + +command[host-notify-by-email]=/bin/echo -e "***** Nagios *****\n\nHost "$HOSTALIAS$" is $HOSTSTATE$!\n\nDate/Time: $DATETIME$\n" | /bin/mail -s 'Host $HOSTNAME$ is $HOSTSTATE$!' $CONTACTEMAIL$ + +command[host-notify-by-epager]=/bin/echo '$HOSTALIAS$ is $HOSTSTATE$!' | /bin/mail -s 'Host $HOSTNAME$ is $HOSTSTATE$!' $CONTACTPAGER$ + +# These are some example service check commands. See the HTML +# documentation on the plugins for examples of how to configure +# command definitions. + +command[check_tcp]=@libexecdir@/check_tcp -H $HOSTADDRESS$ -p $ARG1$ +command[check_udp]=@libexecdir@/check_udp -H $HOSTADDRESS$ -p $ARG1$ +command[check_ftp]=@libexecdir@/check_ftp -H $HOSTADDRESS$ +command[check_pop]=@libexecdir@/check_pop $HOSTADDRESS$ +command[check_smtp]=@libexecdir@/check_smtp $HOSTADDRESS$ +command[check_nntp]=@libexecdir@/check_nntp $HOSTADDRESS$ +command[check_telnet]=@libexecdir@/check_tcp -H $HOSTADDRESS$ -p 23 +command[check_users]=@libexecdir@/check_users $ARG1$ $ARG2$ +command[check_hpjd]=@libexecdir@/check_hpjd $HOSTADDRESS$ public +command[check_mrtg]=@libexecdir@/check_mrtg $ARG1$ 10 AVG $ARG2$ $ARG3$ $ARG4$ $ARG5$ $ARG6$ +command[traffic_average]=@libexecdir@/check_mrtgtraf $ARG1$ 10 AVG $ARG2$ $ARG3$ $ARG4$ $ARG5$ +command[check_load]=@libexecdir@/check_load $ARG1$ $ARG2$ $ARG3$ $ARG4$ $ARG5$ $ARG6$ + +command[check_disk]=@libexecdir@/check_disk -w 85% -c 95% -p $ARG1$ +command[check_dns]=@libexecdir@/check_dns -H www.yahoo.com -s $HOSTADDRESS$ +command[check_http]=@libexecdir@/check_http -H $HOSTADDRESS$ -I $HOSTADDRESS$ +command[check_http2]=@libexecdir@/check_http -H $ARG1$ -I $HOSTADDRESS$ -w $ARG2$ -c $ARG3$ +command[check_pgsql]=@libexecdir@/check_pgsql -H $HOSTADDRESS$ +command[check_ping]=@libexecdir@/check_ping -H $HOSTADDRESS$ -w 10:20% -c 60:100% +command[check_procs]=@libexecdir@/check_procs -w $ARG1$ -c $ARG2$ +command[check_procs_zombie]=@libexecdir@/check_procs -w $ARG1$ -c $ARG2$ -s Z +command[check_procs_httpd]=@libexecdir@/check_procs -w 5:$ARG1$ -c 1:$ARG2$ -C httpd +command[check_vsz]=@libexecdir@/check_vsz -w 8096 -c 16182 -C httpd + +# An example of using check_by_ssh as an active service check +command[ssh_disk]=@libexecdir@/check_by_ssh -H $HOSTADDRESS$ -C '@libexecdir@/check_disk -w 85% -c 95% -p $ARG1$' + +# +# UCD_SNMP equivalents for some of the commands above +# + +command[snmp_load]=@libexecdir@/check_snmp -H $HOSTADDRESS$ -C $ARG1$ -o .1.3.6.1.4.1.2021.10.1.5.1,.1.3.6.1.4.1.2021.10.1.5.2,.1.3.6.1.4.1.2021.10.1.5.3 -w :$ARG2$,:$ARG3$,:$ARG4$ -w :$ARG5$,:$ARG6$,:$ARG7$ -l load + +command[snmp_cpustats]=@libexecdir@/check_snmp -H $HOSTADDRESS$ -C $ARG1$ -o .1.3.6.1.4.1.2021.11.9.0,.1.3.6.1.4.1.2021.11.10.0,.1.3.6.1.4.1.2021.11.11.0 -l 'CPU usage (user system idle)' -u '%' + +command[snmp_procname]=@libexecdir@/check_snmp -H $HOSTADDRESS$ -C $ARG1$ -o 1.3.6.1.4.1.2021.2.1.5.$ARG2$ -w $ARG3$:$ARG4$ -c $ARG5$:$ARG6$ + +command[snmp_disk]=@libexecdir@/check_snmp -H $HOSTADDRESS$ -C $ARG1$ -o 1.3.6.1.4.1.2021.9.1.7.$ARG1$,1.3.6.1.4.1.2021.9.1.9.$ARG1$ -w $ARG2$:,:$ARG3$ -c $ARG4$:,:$ARG5$ -u 'kB free (','% used)' -l 'disk space' + +command[snmp_mem]=@libexecdir@/check_snmp -H $HOSTADDRESS$ -C $ARG1$ -o .1.3.6.1.4.1.2021.4.6.0,.1.3.6.1.4.1.2021.4.5.0 -w $ARG2$: -c $ARG3$: + +command[snmp_swap]=@libexecdir@/check_snmp -H $HOSTADDRESS$ -C $ARG1$ -o .1.3.6.1.4.1.2021.4.4.0,.1.3.6.1.4.1.2021.4.3.0 -w $ARG2$: -c $ARG3$: + +# +# Slightly more generic SNMP OIDs +# + +command[snmp_procs]=@libexecdir@/check_snmp -H $HOSTADDRESS$ -C $ARG1$ -o host.hrSystem.hrSystemProcesses -w :$ARG2$ -c :$ARG3$ -l processes + +command[snmp_users]=@libexecdir@/check_snmp -H $HOSTADDRESS$ -C $ARG1$ -o host.hrSystem.hrSystemNumUsers -w :$ARG2$ -c :$ARG3$ -l users + +command[snmp_mem2]=@libexecdir@/check_snmp -H $HOSTADDRESS$ -C $ARG1$ -o host.hrStorage.hrStorageTable.hrStorageEntry.hrStorageUsed.101,host.hrStorage.hrStorageTable.hrStorageEntry.hrStorageSize.101 -w $ARG2$ -c $ARG3$ + +command[snmp_swap2]=@libexecdir@/check_snmp -H $HOSTADDRESS$ -C $ARG1$ -o host.hrStorage.hrStorageTable.hrStorageEntry.hrStorageUsed.102,host.hrStorage.hrStorageTable.hrStorageEntry.hrStorageSize.102 -w $ARG2$ -c $ARG3$ + +command[snmp_mem]=@libexecdir@/check_snmp -H $HOSTADDRESS$ -C $ARG1$ -o host.hrStorage.hrStorageTable.hrStorageEntry.hrStorageUsed.101,host.hrStorage.hrStorageTable.hrStorageEntry.hrStorageSize.101 -w $ARG2$ -c $ARG3$ + +command[snmp_swap]=@libexecdir@/check_snmp -H $HOSTADDRESS$ -C $ARG1$ -o host.hrStorage.hrStorageTable.hrStorageEntry.hrStorageUsed.102,host.hrStorage.hrStorageTable.hrStorageEntry.hrStorageSize.102 -w $ARG2$ -c $ARG3$ + +command[snmp_disk2]=@libexecdir@/check_snmp -H $HOSTADDRESS$ -C $ARG1$ -o host.hrStorage.hrStorageTable.hrStorageEntry.hrStorageUsed.$ARG2$ -w $ARG3$ -c $ARG4$ + +command[snmp_tcpopen]=@libexecdir@/check_snmp -H $HOSTADDRESS$ -C $ARG1$ -o tcp.tcpCurrEstab.0 -w $ARG2$ -c $ARG3$ + +command[snmp_tcpstats]=@libexecdir@/check_snmp -H $HOSTADDRESS$ -C $ARG1$ -o tcp.tcpActiveOpens.0,tcp.tcpPassiveOpens.0,tcp.tcpInSegs.0,tcp.tcpOutSegs.0,tcp.tcpRetransSegs.0 -l 'TCP stats' + +# This command checks to see if a host is "alive" by pinging it. The +# check must result in a 100% packet loss or 5 second (5000ms) round +# trip average to produce an error. + +# This command checks to see if a host is "alive" by pinging it. +command[check-host-alive]=@libexecdir@/check_ping -H $HOSTADDRESS$ -w 5000,100% -c 5000,100% -p 1 + +# This command checks to see if a printer is "alive" by pinging it. +command[check-printer-alive]=@libexecdir@/check_ping -H $HOSTADDRESS$ -w 5000,100% -c 5000,100% -p 1 + +# This command checks to see if a switch is "alive" by pinging it. +command[check-switch-alive]=@libexecdir@/check_ping $HOSTADDRESS$ -w 5000,100% -c 5000,100% -p 1 + +# This command checks to see if a router is "alive" by pinging it. +command[check-router-alive]=@libexecdir@/check_ping -H $HOSTADDRESS$ -w 5000,100% -c 5000,100% -p 1 + +# Check if a host is alive by doing a fast ping instead of a regular ping +command[check-fast-alive]=@libexecdir@/check_fping -H $HOSTADDRESS$ + +# Check if the IMAP service is alive (default port=143) +command[check-imap]=@libexecdir@/check_imap $HOSTADDRESS$ + +# Check RPC services +command[check-rpc]=@libexecdir@/check_rpc -H $HOSTADDRESS$ $ARG1$ + +# Check if the NFS server is running +command[check-nfs]=@libexecdir@/check_rpc -H $HOSTADDRESS$ nfs + +# Check game servers +command[check_quake]=@libexecdir@/check_game qs $HOSTADDRESS$ +command[check_unreal]=@libexecdir@/check_game uns $HOSTADDRESS$ -p $ARG1$ -pf 8 + +# Check a port that should be open +command[check_nmap]=@libexecdir@/check_nmap -H $HOSTADDRESS$ -t 30 -p $ARG1$ + +# Check a port that should be open and another that *could* be open, +# but no warning is given if optional port is closed. + +command[check_nmap_optional]=@libexecdir@/check_nmap -H $HOSTADDRESS$ -t 60 -p $ARG1$ -o $ARG2$ + +# Specify range to nmap +command[check_nmap_range]=@libexecdir@/check_nmap -H $HOSTADDRESS$ -t 60 -p $ARG1$ -r $ARG2$ + +# Specify both optional and range +command[check_nmap_opt_range]=@libexecdir@/check_nmap -H $HOSTADDRESS$ -t 60 -p $ARG1$ -o $ARG2$ -r$ARG3$ + +# Check Radius +command[check_radius]=@libexecdir@/check_radius $ARG1$ $ARG2$ $HOSTADDRESS$ 1812 $ARG3$ + + +# Check Reply +# This is a command for checking squid proxy servers which uses check +# reply to ensure an HTTP 200 comes back ..... i.e. squid actually +# serves the page and not an error message. + +command[check_squid]=@libexecdir@/check_reply $HOSTADDRESS$ -p $ARG1$ -s 'GET $ARG2$ HTTP/1.0\n\n' -e 'HTTP/1.0 200 OK' + + +## Check RealAudio url +command[check_real_url]=@libexecdir@/check_real $HOSTADDRESS$ -p $ARG1$ -wt $ARG2$ -ct $ARG3$ -to 5 -u $ARG4$ + +## Check RealAudio server response +command[check_real]=@libexecdir@/check_real $HOSTADDRESS$ -p $ARG1$ -wt $ARG2$ -ct $ARG3$ -to 5 + + +# Still have to write sample entries for the following: +# +# check_ldap +# check_nwstat +# check_overcr diff --git a/configure.in b/configure.in new file mode 100644 index 0000000..b2df783 --- /dev/null +++ b/configure.in @@ -0,0 +1,748 @@ +dnl Process this file with autoconf to produce a configure script. +include(`aclocal.m4') +AC_REVISION ($Revision$) +AC_INIT(package.def) +VERSION=`cat $srcdir/package.def|sed -e 's/PACKAGE_RELEASE= *"//;s/"//'` +PACKAGE=nagios-plugins +dnl AM_INIT_AUTOMAKE(nagios-plugins,$VERSION) +AM_CONFIG_HEADER(plugins/config.h plugins/common.h plugins/version.h plugins/netutils.h plugins/utils.h plugins/popen.h) + +AC_PREFIX_DEFAULT(/usr/local/nagios) + +dnl Figure out how to invoke "install" and what install options to use. + +AC_PROG_INSTALL +AC_SUBST(INSTALL) + +AC_PROG_RANLIB + +AC_PATH_PROG(ACLOCAL,aclocal) +AC_PATH_PROG(AUTOMAKE,automake) +AC_PATH_PROG(AUTOCONF,autoconf) +AC_PATH_PROG(AUTOHEADER,autoheader) + +PLUGIN_TEST=`echo $srcdir/plugins/t/*.t|sed -e 's,\.*/plugins/,,g'` +AC_SUBST(PLUGIN_TEST)dnl + +SCRIPT_TEST=`echo $srcdir/plugins-scripts/t/*.t|sed -e 's,\.*/plugins-scripts/,,g'` +AC_SUBST(SCRIPT_TEST)dnl + +WARRANTY="The nagios plugins come with ABSOLUTELY NO WARRANTY. You may redistribute\ncopies of the plugins under the terms of the GNU General Public License.\nFor more information about these matters, see the file named COPYING.\n" +AC_SUBST(WARRANTY) + +SUPPORT="Send email to nagios-users@lists.sourceforge.net if you have questions\nregarding use of this software. To submit patches or suggest improvements,\nsend email to nagiosplug-devel@lists.sourceforge.net\n" +AC_SUBST(SUPPORT) + +AC_ARG_PROGRAM + +dnl AC_ARG_WITH(nonposix_state_defs,--with-nonposix-state-defs uses POSIXLY incorrect states for netsaint < 0.0.7b2,,AC_DEFINE(POSIX_STATE_DEFS)) + +AC_ARG_WITH(cgiurl,--with-cgiurl= sets URL for cgi programs,cgiurl=$withval,cgiurl=/cgi-bin/nagios) +CGIURL="$cgiurl" +AC_DEFINE_UNQUOTED(CGIURL,"$CGIURL") + +AC_ARG_WITH(nagios_user,--with-nagios-user= sets user name to run nagios,nagios_usr=$withval,nagios_usr=nagios) +AC_ARG_WITH(nagios_group,--with-nagios-group= sets group name to run nagios,nagios_grp=$withval,nagios_grp=nagios) +AC_SUBST(nagios_usr) +AC_SUBST(nagios_grp) +INSTALL_OPTS="-o $nagios_usr -g $nagios_grp" +AC_SUBST(INSTALL_OPTS) + +AC_ARG_WITH(trusted_path,--with-trusted-path=/bin:/sbin:/usr/bin:/usr/sbin sets trusted path for executables called by scripts,trusted_path=$withval,trusted_path=/bin:/sbin:/usr/bin:/usr/sbin) +AC_SUBST(trusted_path) + +EXTRAS= +PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/etc:/usr/local/bin:/usr/local/sbin:$PATH + +LDFLAGS="$LDFLAGS -L." + +dnl Checks for programs. +AC_PROG_CC +AC_PROG_MAKE_SET +AC_PROG_AWK + +AC_PATH_PROG(PYTHON,python) +AC_PATH_PROG(PERL,perl) +AC_PATH_PROG(SH,sh) + +AC_PATH_PROG(HOSTNAME,hostname) +AC_PATH_PROG(BASENAME,basename) + + +dnl +dnl Checks for libraries. +dnl + +AC_FUNC_GETLOADAVG + +AC_CHECK_LIB(dce,main,SOCKETLIBS="$SOCKETLIBS -ldce") +AC_CHECK_LIB(nsl,main,SOCKETLIBS="$SOCKETLIBS -lnsl") +AC_CHECK_LIB(socket,socket,SOCKETLIBS="$SOCKETLIBS -lsocket") +AC_CHECK_LIB(resolv,main,SOCKETLIBS="$SOCKETLIBS -lresolv") +AC_SUBST(SOCKETLIBS) + +dnl Check for PostgreSQL libraries +_SAVEDLIBS="$LIBS" +_SAVEDCPPFLAGS="$CPPFLAGS" +AC_ARG_WITH(pgsql,--with-pgsql= sets path to pgsql installation,[PGSQL=$withval]) +AC_CHECK_LIB(crypt,main) +if test "$ac_cv_lib_crypt_main" = "yes"; then + if test -n "$PGSQL"; then + LIBS="$LIBS -L$PGSQL/lib" + CPPFLAGS="$CPPFLAGS -I$PGSQL/include" + fi + AC_CHECK_LIB(pq,PQsetdbLogin,,,-lcrypt) + if test "$ac_cv_lib_pq_PQsetdbLogin" = "yes"; then + AC_CHECK_HEADERS(pgsql/libpq-fe.h) + AC_CHECK_HEADERS(postgresql/libpq-fe.h) + AC_CHECK_HEADERS(libpq-fe.h) + if test "$ac_cv_header_pgsql_libpq_fe_h" = "yes"; then + PGLIBS="-lpq -lcrypt" + PGINCLUDE="-I/usr/include/pgsql" + elif test "$ac_cv_header_postgresql_libpq_fe_h" = "yes"; then + PGLIBS="-L$PGSQL/lib -lpq -lcrypt" + PGINCLUDE="-I/usr/include/postgresql" + elif test "$ac_cv_header_libpq_fe_h" = "yes"; then + PGLIBS="-L$PGSQL/lib -lpq -lcrypt" + PGINCLUDE="-I$PGSQL/include" + fi + if test -z "$PGINCLUDE"; then + AC_MSG_WARN([Skipping PostgreSQL plugin (check_pgsql)]) + AC_MSG_WARN([install PostgreSQL headers to compile this plugin (see Requirements).]) + else + AC_SUBST(PGLIBS) + AC_SUBST(PGINCLUDE) + EXTRAS="$EXTRAS check_pgsql" + fi + else + AC_MSG_WARN([Skipping PostgreSQL plugin (check_pgsql)]) + AC_MSG_WARN([LIBS="$LIBS" CPPFLAGS="$CPPFLAGS"]) + AC_MSG_WARN([install PostgreSQL libs to compile this plugin (see Requirements).]) + fi +else + AC_MSG_WARN([Skipping PostgreSQL plugin (check_pgsql)]) + AC_MSG_WARN([install lib crypt and PostgreSQL libs to compile this plugin (see Requirements).]) +fi +LIBS="$_SAVEDLIBS" +CPPFLAGS="$_SAVEDCPPFLAGS" + +dnl Check for radius libraries +_SAVEDLIBS="$LIBS" +AC_CHECK_LIB(radiusclient,rc_read_config) +if test "$ac_cv_lib_radiusclient_rc_read_config" = "yes"; then + EXTRAS="$EXTRAS check_radius" + RADIUSLIBS="-lradiusclient" + AC_SUBST(RADIUSLIBS) +else + AC_MSG_WARN([Skipping radius plugin]) + AC_MSG_WARN([install radius libs to compile this plugin (see Requirements).]) +fi +LIBS="$_SAVEDLIBS" + +dnl Check for LDAP libraries +_SAVEDLIBS="$LIBS" +AC_CHECK_LIB(ldap,main,,,-llber) +if test "$ac_cv_lib_ldap_main" = "yes"; then + LDAPLIBS="-lldap -llber"\ + LDAPINCLUDE="-I/usr/include/ldap" + AC_SUBST(LDAPLIBS) + AC_SUBST(LDAPINCLUDE) + EXTRAS="$EXTRAS check_ldap" +else + AC_MSG_WARN([Skipping LDAP plugin]) + AC_MSG_WARN([install LDAP libs to compile this plugin (see Requirements).]) +fi +LIBS="$_SAVEDLIBS" + +dnl Check for mysql libraries +_SAVEDLIBS="$LIBS" +_SAVEDCPPFLAGS="$CPPFLAGS" +CPPFLAGS="-I/usr/include" +AC_ARG_WITH(mysqllibdir,--with-mysqllibdir= sets path to mysql libraries,[MYSQLLIBDIR=$withval]) +if test -n "$MYSQLLIBS"; then + AC_CHECK_LIB(mysqlclient,mysql_init,MYSQLLIBS="-lmysqlclient -lz" check_mysql_LDFLAGS="-L$MYSQLLIBDIR",,-L$MYSQLLIBDIR -lz) +elif test -f /usr/lib/libmysqlclient.so; then + AC_CHECK_LIB(mysqlclient,mysql_init,MYSQLLIBS="-lmysqlclient -lz",,-lz) + AC_CHECK_LIB(mysqlclient,mysql_close,MYSQLLIBS="-lmysqlclient") +elif test -f /usr/lib/libmysqlclient.a; then + AC_CHECK_LIB(mysqlclient,mysql_init,MYSQLLIBS="-lmysqlclient -lz",,-lz) + AC_CHECK_LIB(mysqlclient,mysql_close,MYSQLLIBS="-lmysqlclient") +elif test -f /usr/lib/mysql/libmysqlclient.so; then + AC_CHECK_LIB(mysqlclient,mysql_init,MYSQLLIBS="-lmysqlclient -lz" check_mysql_LDFLAGS="-L/usr/lib/mysql",,-L/usr/lib/mysql -lz) + AC_CHECK_LIB(mysqlclient,mysql_close,MYSQLLIBS="-lmysqlclient" check_mysql_LDFLAGS="-L/usr/lib/mysql",,-L/usr/lib/mysql) +elif test -f /usr/lib/mysql/libmysqlclient.a; then + AC_CHECK_LIB(mysqlclient,mysql_init,MYSQLLIBS="-lmysqlclient -lz" check_mysql_LDFLAGS="-L/usr/lib/mysql",,-L/usr/lib/mysql -lz) + AC_CHECK_LIB(mysqlclient,mysql_close,MYSQLLIBS="-lmysqlclient" check_mysql_LDFLAGS="-L/usr/lib/mysql",,-L/usr/lib/mysql) +fi +if test "$ac_cv_lib_mysqlclient_mysql_init" = "yes" -o "$ac_cv_lib_mysqlclient_mysql_close" = "yes"; then + AC_CHECK_HEADERS(mysql/mysql.h mysql/errmsg.h) + if test "$ac_cv_header_mysql_mysql_h" = "yes" -a "$ac_cv_header_mysql_errmsg_h" = "yes"; then + EXTRAS="$EXTRAS check_mysql" + AC_SUBST(MYSQLLIBS) + AC_SUBST(check_mysql_LDFLAGS) + else + AC_MSG_WARN([Skipping mysql plugin]) + AC_MSG_WARN([install mysql client headers to compile this plugin (see Requirements).]) + fi +else + AC_MSG_WARN([Skipping mysql plugin]) + AC_MSG_WARN([install mysql client libs to compile this plugin (see Requirements).]) +fi +LIBS="$_SAVEDLIBS" +CPPFLAGS="$_SAVEDCPPFLAGS" + +dnl Check for OpenSSL location +AC_PATH_PROG(OPENSSL,openssl) +if test "$OPENSSL" = "/usr/bin/openssl"; then + OPENSSL=/usr +elif test "$OPENSSL" = "/usr/sbin/openssl"; then + OPENSSL=/usr +elif test "$OPENSSL" = "/opt/bin/openssl"; then + OPENSSL=/opt +elif test "$OPENSSL" = "/opt/openssl/bin/openssl"; then + OPENSSL=/opt/openssl +elif test "$OPENSSL" = "/usr/slocal/bin/openssl"; then + OPENSSL=/usr/slocal +elif test "$OPENSSL" = "/usr/local/bin/openssl"; then + OPENSSL=/usr/local +elif test "$OPENSSL" = "/usr/local/ssl/bin/openssl"; then + OPENSSL=/usr/local/ssl +fi +AC_ARG_WITH(openssl,--with-openssl= sets path to openssl installation,[OPENSSL=$withval]) + +dnl Check for OpenSSL header files +_SAVEDCPPFLAGS="$CPPFLAGS" +FOUNDINCLUDE=yes +CPPFLAGS="-I$OPENSSL/include" +AC_CHECK_HEADERS(openssl/x509.h openssl/ssl.h openssl/rsa.h openssl/pem.h openssl/crypto.h openssl/err.h,SSLINCLUDE="-I$OPENSSL/include",FOUNDINCLUDE=no) +if test "$FOUNDINCLUDE" = "no"; then + FOUNDINCLUDE=yes + AC_CHECK_HEADERS(x509.h ssl.h rsa.h pem.h crypto.h err.h,SSLINCLUDE="-I$OPENSSL/include",FOUNDINCLUDE=no) +fi +AC_SUBST(SSLINCLUDE) +CPPFLAGS="$_SAVEDCPPFLAGS $SSLINCLUDE" + +dnl Check for crypto lib +_SAVEDLIBS="$LIBS" +AC_CHECK_LIB(crypto,CRYPTO_lock,,,-L$OPENSSL/lib) +if test "$ac_cv_lib_crypto_CRYPTO_lock" = "yes"; then + dnl Check for SSL lib + AC_CHECK_LIB(ssl,main,LDFLAGS="$LDFLAGS -L$OPENSSL/lib" SSLLIBS="-lssl -lcrypto",AC_CHECK_LIB(ssl,main,LDFLAGS="$LDFLAGS -L$OPENSSL/lib" SSLLIBS="-lssl -lcrypto"),-L$OPENSSL/lib -lcrypto) +fi +LIBS="$_SAVEDLIBS" + +dnl test headers and libs to decide whether check_http should use SSL +if test "$ac_cv_lib_crypto_CRYPTO_lock" = "yes"; then + if test "$ac_cv_lib_ssl_main" = "yes"; then + if test "$FOUNDINCLUDE" = "yes"; then + AC_SUBST(SSLLIBS) + AC_DEFINE(HAVE_SSL) + fi + fi +fi +CPPFLAGS="$_SAVEDCPPFLAGS" + +dnl +dnl Checks for header files. +dnl + +AC_HEADER_STDC +AC_HEADER_TIME +AC_HEADER_SYS_WAIT +AC_CHECK_HEADERS(signal.h strings.h string.h syslog.h unistd.h uio.h errno.h regex.h sys/types.h sys/time.h sys/socket.h sys/loadavg.h) + +dnl Checks for typedefs, structures, and compiler characteristics. +AC_C_CONST +AC_STRUCT_TM +AC_TYPE_PID_T +AC_TYPE_SIZE_T +AC_TYPE_SIGNAL + +dnl EXTRA_LIBRARIES="libgetopt.a libsnprintf.a" +dnl noinst_LIBRARIES="libgetopt.a libsnprintf.a" +dnl libgetopt_a_SOURCES="getopt.c getopt1.c" +dnl libgetopt_a_DEPENDENCIES=getopt.h +dnl libsnprintf_a_SOURCES=snprintf.c +dnl AC_SUBST(noinst_LIBRARIES) +dnl AC_SUBST(libgetopt_a_SOURCES) +dnl AC_SUBST(libgetopt_a_DEPENDENCIES) +dnl AC_SUBST(libsnprintf_a_SOURCES) + +AC_MSG_CHECKING(for getopt_long) +AC_TRY_COMPILE([#include +#include ], +[int option_index=0; +static struct option *long_options; +getopt_long(0,NULL,"+h",long_options,&option_index);], +[AC_DEFINE(HAVE_GETOPT_H) AC_DEFINE(HAVE_GETOPT_LONG) AC_MSG_RESULT(yes)], +[AC_DEFINE(HAVE_GETOPT_H) AC_DEFINE(HAVE_GETOPT_LONG) AC_MSG_RESULT(no) import_sources=getopt]) + +AC_CHECK_FUNCS(getopt_long_only,,LIBS="$LIBS -lgetopt" DEPLIBS="$DEPLIBS libgetopt.a") + +AC_CHECK_FUNC(vsnprintf,,LIBS="$LIBS -lsnprintf" DEPLIBS="$DEPLIBS libsnprintf.a") + +dnl Checks for library functions. +AC_CHECK_FUNCS(select socket strdup strstr strtod strtol strtoul) + +AC_MSG_CHECKING(for type of socket size) +AC_TRY_COMPILE([#include +#include +#include +], +[int a = send(1, (const void *) buffer, (size_t *) 0, (int *) 0);], +[AC_DEFINE(SOCKET_SIZE_TYPE, size_t) AC_MSG_RESULT(size_t)], +[AC_DEFINE(SOCKET_SIZE_TYPE, int) AC_MSG_RESULT(int)]) + +if test -f "/proc/loadavg" +then + AC_DEFINE(HAVE_PROC_LOADAVG) + AC_DEFINE_UNQUOTED(PROC_LOADAVG,"/proc/loadavg") +fi + +AC_PATH_PROG(PATH_TO_PS,ps) +dnl OpenBSD (needs to come early because -exo appears to work, but does not give all procs) +dnl STAT UCOMM VSZ RSS USER UID PPID COMMAND +if [ps -axo 'stat comm vsz rss user uid ppid args' 2>/dev/null | egrep -i "^ *S[TAUES]* +[UCOMDNA]+ +[VSIZE]+ +R[S]+ +U[SER]+ +U[ID]+ +P[PID]+ +[RGSCOMDNA]+" >/dev/null] +then + AC_DEFINE(USE_PS_VARS) + AC_DEFINE_UNQUOTED(PS_VARLIST,[procstat,&procuid,&procppid,procprog,&pos]) + AC_DEFINE_UNQUOTED(PS_RAW_COMMAND,"$PATH_TO_PS -axo 'stat user ppid args'") + EXTRAS="$EXTRAS check_nagios" + AC_DEFINE_UNQUOTED(PS_COMMAND,"$PATH_TO_PS -axo 'stat uid ppid comm args'") + AC_DEFINE_UNQUOTED(PS_FORMAT,"%s %d %d %s %n") + AC_DEFINE_UNQUOTED(VSZ_COMMAND,"$PATH_TO_PS -axo 'vsz comm'") + AC_DEFINE_UNQUOTED(VSZ_FORMAT,"%d %s") + AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS -axo 'rss comm'") + AC_DEFINE_UNQUOTED(RSS_FORMAT,"%d %s") + echo " ps syntax... $PATH_TO_PS -eo 'stat comm vsz rss user ppid args'" +elif [ps -eo 's comm vsz rss user uid ppid args' 2>/dev/null | egrep -i "^S[TAUES]* +C[OMDNA]+ +[VSIZE]+ +U[SER]+ +U[ID]+ +P[PID]+ +[RGSCOMDNA]+" >/dev/null] +then + AC_DEFINE(USE_PS_VARS) + AC_DEFINE_UNQUOTED(PS_VARLIST,[procstat,&procuid,&procppid,procprog,&pos]) + AC_DEFINE_UNQUOTED(PS_RAW_COMMAND,"$PATH_TO_PS -eo 's user ppid args'") + EXTRAS="$EXTRAS check_nagios" + AC_DEFINE_UNQUOTED(PS_COMMAND,"$PATH_TO_PS -eo 's uid ppid comm args'") + AC_DEFINE_UNQUOTED(PS_FORMAT,"%s %d %d %s %n") + AC_DEFINE_UNQUOTED(VSZ_COMMAND,"$PATH_TO_PS -eo 'vsz comm'") + AC_DEFINE_UNQUOTED(VSZ_FORMAT,"%d %s") + AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS -eo 'rss comm'") + AC_DEFINE_UNQUOTED(RSS_FORMAT,"%d %s") + echo " ps syntax... $PATH_TO_PS -eo 's comm vsz rss user ppid args'" +elif [ps -Ao 's comm vsz rss uid user ppid args' 2>/dev/null | egrep -i "^S[TAUES]* +C[OMDNA]+ +V[SIZE]+ +RSS +UID +USER +PPID +[RGSCOMDNA]+" >/dev/null] +then + AC_DEFINE(USE_PS_VARS) + AC_DEFINE_UNQUOTED(PS_VARLIST,[procstat,&procuid,&procppid,procprog,&pos]) + AC_DEFINE_UNQUOTED(PS_RAW_COMMAND,"$PATH_TO_PS -Ao 's user ppid args'") + EXTRAS="$EXTRAS check_nagios" + AC_DEFINE_UNQUOTED(PS_COMMAND,"$PATH_TO_PS -Ao 's uid ppid comm args'") + AC_DEFINE_UNQUOTED(PS_FORMAT,"%s %d %d %s %n") + AC_DEFINE_UNQUOTED(VSZ_COMMAND,"$PATH_TO_PS -Ao 'vsz comm'") + AC_DEFINE_UNQUOTED(VSZ_FORMAT,"%d %s") + AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS -Ao 'rss comm'") + AC_DEFINE_UNQUOTED(RSS_FORMAT,"%d %s") + echo " ps syntax... $PATH_TO_PS -Ao 's comm vsz rss'" +elif [ps -Ao 'status comm vsz rss uid user ppid args' 2>/dev/null | egrep -i "^S[TAUES]* +C[OMDNA]+ +V[SIZE]+ +RSS +UID +USER +PPID +[RGSCOMDNA]+" >/dev/null] +then + AC_DEFINE(USE_PS_VARS) + AC_DEFINE_UNQUOTED(PS_VARLIST,[procstat,&procuid,&procppid,procprog,&pos]) + AC_DEFINE_UNQUOTED(PS_RAW_COMMAND,"$PATH_TO_PS -Ao 'status user ppid args'") + EXTRAS="$EXTRAS check_nagios" + AC_DEFINE_UNQUOTED(PS_COMMAND,"$PATH_TO_PS -Ao 'status uid ppid comm args'") + AC_DEFINE_UNQUOTED(PS_FORMAT,"%s %d %d %s %n") + AC_DEFINE_UNQUOTED(VSZ_COMMAND,"$PATH_TO_PS -Ao 'vsz comm'") + AC_DEFINE_UNQUOTED(VSZ_FORMAT,"%d %s") + AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS -Ao 'rss comm'") + AC_DEFINE_UNQUOTED(RSS_FORMAT,"%d %s") + echo " ps syntax... $PATH_TO_PS -Ao 'status comm vsz rss'" +elif [ps -Ao 'state comm vsz rss uid user ppid args' 2>/dev/null | egrep -i "^S[TAUES]* +C[OMDNA]+ +V[SIZE]+ +RSS +UID +USER +PPID +[RGSCOMDNA]+" >/dev/null] +then + AC_DEFINE(USE_PS_VARS) + AC_DEFINE_UNQUOTED(PS_VARLIST,[procstat,&procuid,&procppid,procprog,&pos]) + AC_DEFINE_UNQUOTED(PS_RAW_COMMAND,"$PATH_TO_PS -Ao 'state user ppid args'") + EXTRAS="$EXTRAS check_nagios" + AC_DEFINE_UNQUOTED(PS_COMMAND,"$PATH_TO_PS -Ao 'state uid ppid comm args'") + AC_DEFINE_UNQUOTED(PS_FORMAT,"%s %d %d %s %n") + AC_DEFINE_UNQUOTED(VSZ_COMMAND,"$PATH_TO_PS -Ao 'vsz comm'") + AC_DEFINE_UNQUOTED(VSZ_FORMAT,"%d %s") + AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS -Ao 'rss comm'") + AC_DEFINE_UNQUOTED(RSS_FORMAT,"%d %s") + echo " ps syntax... $PATH_TO_PS -Ao 'state comm vsz rss'" +elif [ps -ao 'state command vsz rss user ppid args' 2>/dev/null | egrep -i "^S[TAUES]* +C[OMDNA]+ +V[SIZE]+ +RSS +UID +USER +PPID +[RGSCOMDNA]+" >/dev/null] +then + AC_DEFINE(USE_PS_VARS) + AC_DEFINE_UNQUOTED(PS_VARLIST,[procstat,&procuid,&procppid,procprog,&pos]) + AC_DEFINE_UNQUOTED(PS_RAW_COMMAND,"$PATH_TO_PS -ao 'state user ppid args'") + EXTRAS="$EXTRAS check_nagios" + AC_DEFINE_UNQUOTED(PS_COMMAND,"$PATH_TO_PS -ao 'state uid ppid command args'") + AC_DEFINE_UNQUOTED(PS_FORMAT,"%s %d %d %s %n") + AC_DEFINE_UNQUOTED(VSZ_COMMAND,"$PATH_TO_PS -ao 'vsz command'") + AC_DEFINE_UNQUOTED(VSZ_FORMAT,"%d %s") + AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS -ao 'rss command'") + AC_DEFINE_UNQUOTED(RSS_FORMAT,"%d %s") + echo " ps syntax... $PATH_TO_PS -ao 'state command vsz rss'" +dnl FreeBSD +elif [ps waxco 'state command vsz rss uid user ppid' 2>/dev/null | egrep -i "^STAT +COMMAND +VSZ +RSS +UID +USER +PPID" >/dev/null] +then + AC_DEFINE(USE_PS_VARS) + AC_DEFINE_UNQUOTED(PS_VARLIST,[procstat,&procuid,&procppid,procprog,&pos]) + AC_DEFINE_UNQUOTED(PS_RAW_COMMAND,"$PATH_TO_PS waxo 'state uid ppid command'") + EXTRAS="$EXTRAS check_nagios" + AC_DEFINE_UNQUOTED(PS_COMMAND,"$PATH_TO_PS waxco 'state uid ppid command command'") + AC_DEFINE_UNQUOTED(PS_FORMAT,"%s %d %d %s %n") + AC_DEFINE_UNQUOTED(VSZ_COMMAND,"$PATH_TO_PS waxco 'vsz command'") + AC_DEFINE_UNQUOTED(VSZ_FORMAT,"%d %s") + AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS waxco 'rss command'") + AC_DEFINE_UNQUOTED(RSS_FORMAT,"%d %s") + echo " ps syntax... $PATH_TO_PS -Ao 'state command vsz rss'" +dnl BSD-like mode in RH 6.1 +elif [ps waxno 'state comm vsz rss uid user ppid args' 2>/dev/null | egrep -i "^S +COMMAND +VSZ +RSS +UID +USER +PPID +[RGSCOMDNA]+" >/dev/null] +then + AC_DEFINE(USE_PS_VARS) + AC_DEFINE_UNQUOTED(PS_VARLIST,[procstat,&procuid,&procppid,procprog,&pos]) + AC_DEFINE_UNQUOTED(PS_RAW_COMMAND,"$PATH_TO_PS waxno 'state user ppid comm'") + EXTRAS="$EXTRAS check_nagios" + AC_DEFINE_UNQUOTED(PS_COMMAND,"$PATH_TO_PS waxno 'state uid ppid comm args'") + AC_DEFINE_UNQUOTED(PS_FORMAT,"%s %d %d %s %n") + AC_DEFINE_UNQUOTED(VSZ_COMMAND,"$PATH_TO_PS waxno 'vsz comm'") + AC_DEFINE_UNQUOTED(VSZ_FORMAT,"%d %s") + AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS waxno 'rss comm'") + AC_DEFINE_UNQUOTED(RSS_FORMAT,"%d %s") + echo " ps syntax... $PATH_TO_PS -waxco 'state comm vsz rss'" +dnl IRIX 53 +elif [ps -el 2>/dev/null | egrep -i "^ *F +S +UID +PID +PPID +C +PRI +NI +P +SZ +RSS +WCHAN +TTY +TIME +[RGSCOMDNA]+" >/dev/null] +then + AC_DEFINE(USE_PS_VARS) + AC_DEFINE_UNQUOTED(PS_VARLIST,[procstat,&procuid,&procppid,&pos,procprog]) + AC_DEFINE_UNQUOTED(PS_COMMAND,"$PATH_TO_PS -el") + AC_DEFINE_UNQUOTED(PS_FORMAT,"%*s %s %d %*s %d %*s %*s %*s %*s %*s %*s %*s %*s %*s %n%s") + AC_DEFINE_UNQUOTED(VSZ_COMMAND,"$PATH_TO_PS -el") + AC_DEFINE_UNQUOTED(VSZ_FORMAT,"%*s %*s %*s %*s %d") + AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS -el") + AC_DEFINE_UNQUOTED(RSS_FORMAT,"%*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %d") + echo " ps syntax... $PATH_TO_PS -el" +dnl IRIX 63 +elif [ps -el 2>/dev/null | egrep -i "^ *F +S +UID +PID +PPID +C +PRI +NI +P +ADDR +SZ +RSS +WCHAN +TTY +TIME +[RGSCOMDNA]+" >/dev/null] +then + AC_DEFINE(USE_PS_VARS) + AC_DEFINE_UNQUOTED(PS_VARLIST,[procstat,&procuid,&procppid,&pos,procprog]) + AC_DEFINE_UNQUOTED(PS_COMMAND,"$PATH_TO_PS -el") + AC_DEFINE_UNQUOTED(PS_FORMAT,"%*s %s %d %*s %d %*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %n%s") + AC_DEFINE_UNQUOTED(VSZ_COMMAND,"$PATH_TO_PS -el") + AC_DEFINE_UNQUOTED(VSZ_FORMAT,"%*s %*s %*s %*s %d") + AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS -el") + AC_DEFINE_UNQUOTED(RSS_FORMAT,"%*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %d") + echo " ps syntax... $PATH_TO_PS -el" +dnl SunOS 4.1.3: +dnl F UID PID PPID CP PRI NI SZ RSS WCHAN STAT TT TIME COMMAND +dnl +elif [ps -laxnwww 2>/dev/null | egrep -i "^ *F(LAGS)? +UID +PID +PPID +CP +PRI +NI +(SZ)|(VSZ)|(SIZE) +RSS +WCHAN +STAT? +TTY? +TIME +COMMAND" >/dev/null] +then + AC_DEFINE(USE_PS_VARS) + AC_DEFINE_UNQUOTED(PS_RAW_COMMAND,"$PATH_TO_PS laxnwww") + EXTRAS="$EXTRAS check_nagios" + AC_DEFINE_UNQUOTED(PS_VARLIST,[&procuid,&procppid,procstat,&pos,procprog]) + AC_DEFINE_UNQUOTED(PS_COMMAND,"$PATH_TO_PS -laxnwww") + AC_DEFINE_UNQUOTED(PS_FORMAT,"%*s %d %*s %d %*s %*s %*s %*s %*s %*s %s %*s %*s %n%s") + AC_DEFINE_UNQUOTED(VSZ_COMMAND,"$PATH_TO_PS laxnwww") + AC_DEFINE_UNQUOTED(VSZ_FORMAT,"%*s %*s %*s %*s %*s %*s %*s %d") + AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS laxnwww") + AC_DEFINE_UNQUOTED(RSS_FORMAT,"%*s %*s %*s %*s %*s %*s %*s %*s %d") + echo " ps syntax... $PATH_TO_PS laxnwww" +dnl Debian Linux / procps v1.2.9: +dnl FLAGS UID PID PPID PRI NI SIZE RSS WCHAN STA TTY TIME COMMAND +dnl 100 0 1 0 0 0 776 76 c0131c8c S ffff 0:11 init [2] +dnl +elif [ps laxnwww 2>/dev/null | egrep -i "^ *F(LAGS)? +UID +PID +PPID +PRI +NI +(VSZ)|(SIZE) +RSS +WCHAN +STAT? TTY +TIME +COMMAND" >/dev/null] +then + AC_DEFINE(USE_PS_VARS) + AC_DEFINE_UNQUOTED(PS_RAW_COMMAND,"$PATH_TO_PS laxnwww") + EXTRAS="$EXTRAS check_nagios" + AC_DEFINE_UNQUOTED(PS_VARLIST,[&procuid,&procppid,procstat,&pos,procprog]) + AC_DEFINE_UNQUOTED(PS_COMMAND,"$PATH_TO_PS laxnwww") + AC_DEFINE_UNQUOTED(PS_FORMAT,"%*s %d %*s %d %*s %*s %*s %*s %*s %s %*s %*s %n%s") + AC_DEFINE_UNQUOTED(VSZ_COMMAND,"$PATH_TO_PS laxnwww") + AC_DEFINE_UNQUOTED(VSZ_FORMAT,"%*s %*s %*s %*s %*s %*s %d") + AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS laxnwww") + AC_DEFINE_UNQUOTED(RSS_FORMAT,"%*s %*s %*s %*s %*s %*s %*s %d") + echo " ps syntax... $PATH_TO_PS laxnwww" +dnl +dnl AIX 4.1: +dnl F S UID PID PPID C PRI NI ADDR SZ RSS WCHAN TTY TIME CMD +dnl 303 A 0 0 0 120 16 -- 1c07 20 24 - 0:45 swapper +elif [ps -el 2>/dev/null | egrep -i "^ *F +S +UID +PID +PPID +C +PRI +NI +ADDR +SZ +WCHAN +TTY +TIME +[RGSCOMDNA]+" >/dev/null] +then + AC_DEFINE(USE_PS_VARS) + AC_DEFINE_UNQUOTED(PS_VARLIST,[procstat,&procuid,&procppid,&pos,procprog]) + AC_DEFINE_UNQUOTED(PS_COMMAND,"$PATH_TO_PS -el") + AC_DEFINE_UNQUOTED(PS_FORMAT,"%*s %s %d %*s %d %*s %*s %*s %*s %*s %*s %*s %*s %n%s") + AC_DEFINE_UNQUOTED(VSZ_COMMAND,"$PATH_TO_PS -el") + AC_DEFINE_UNQUOTED(VSZ_FORMAT,"%*s %*s %*s %*s %*s %*s %*s %*s %*s %d") + AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS -el") + AC_DEFINE_UNQUOTED(RSS_FORMAT,"%*s %*s %*s %*s %*s %*s %*s %*s %*s %d") + echo " ps syntax... $PATH_TO_PS -el" +dnl AIX? +elif [ps glaxen 2>/dev/null | egrep -i "^ *F +UID +PID +PPID +PRI +NI +VSZ +RSS +WCHAN +STAT +TTY +TIME +COMMAND" >/dev/null] +then + AC_DEFINE(USE_PS_VARS) + AC_DEFINE_UNQUOTED(PS_VARLIST,[&procuid,&procppid,procstat,&pos,procprog]) + AC_DEFINE_UNQUOTED(PS_COMMAND,"$PATH_TO_PS glaxen") + AC_DEFINE_UNQUOTED(PS_FORMAT,"%*s %d %*s %d %*s %*s %*s %*s %*s %s %*s %*s %n%s") + AC_DEFINE_UNQUOTED(VSZ_COMMAND,"$PATH_TO_PS glaxen") + AC_DEFINE_UNQUOTED(VSZ_FORMAT,"%*s %*s %*s %*s %*s %*s %d") + AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS glaxen") + AC_DEFINE_UNQUOTED(RSS_FORMAT,"%*s %*s %*s %*s %*s %*s %*s %d") + echo " ps syntax... $PATH_TO_PS glaxen" +dnl ucb style? +dnl elif [ps axun 2>/dev/null | egrep -i "^USER +PID +%CPU +%MEM +SIZE +RSS +TTY +STAT +START +TIME +COMMAND *$" >/dev/null] +dnl then +dnl AC_DEFINE_UNQUOTED(PS_COMMAND,"$PATH_TO_PS axun") +dnl AC_DEFINE_UNQUOTED(PS_FORMAT,"%s %d %*s %*s %*s %*s %*s %s %*s %*s %s") +dnl AC_DEFINE_UNQUOTED(VSZ_COMMAND,"$PATH_TO_PS axun") +dnl AC_DEFINE_UNQUOTED(VSZ_FORMAT,"%*s %*s %*s %*s %d") +dnl AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS axun") +dnl AC_DEFINE_UNQUOTED(RSS_FORMAT,"%*s %*s %*s %*s %*s %d") +dnl echo " ps syntax... $PATH_TO_PS axun" +dnl ucb style? +dnl elif [ps axun 2>/dev/null | egrep -i "^USER +PID +%CPU +%MEM +SIZE +RSS +TTY +STAT +START +TIME +COMMAND" >/dev/null] +dnl then +dnl AC_DEFINE_UNQUOTED(PS_COMMAND,"$PATH_TO_PS axun") +dnl AC_DEFINE_UNQUOTED(PS_FORMAT,"%s %d %*s %*s %*s %*s %*s %s %*s %*s %s") +dnl AC_DEFINE_UNQUOTED(VSZ_COMMAND,"$PATH_TO_PS axun") +dnl AC_DEFINE_UNQUOTED(VSZ_FORMAT,"%*s %*s %*s %*s %d") +dnl AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS axun") +dnl AC_DEFINE_UNQUOTED(RSS_FORMAT,"%*s %*s %*s %*s %*s %d") +dnl echo " ps syntax... $PATH_TO_PS axun" +else + echo "** Unable to find usable ps syntax" +fi + +AC_ARG_WITH(df_command,--with-df-command= sets syntax for df,DF_COMMAND=$withval) +if test -n "$DF_COMMAND" +then + AC_DEFINE_UNQUOTED(DF_COMMAND,"$DF_COMMAND") +elif [df -Pk 2>/dev/null | egrep -i "^(/dev/|[a-zA-Z]:)[a-z0-9/\\]+ +[0-9]+ +[0-9]+ +[0-9]+ +[0-9]+% +/[a-z0-9/\\]*" >/dev/null] +then + AC_PATH_PROG(PATH_TO_DF,df) + AC_MSG_RESULT(" df syntax... $PATH_TO_DF -Pk") + AC_DEFINE_UNQUOTED(DF_COMMAND,"$PATH_TO_DF -Pk") +elif [df -k 2>/dev/null | egrep -i "^/dev/[a-z0-9/]+ +[0-9]+ +[0-9]+ +[0-9]+ +[0-9]+% +/[a-z0-9/]*" >/dev/null] +then + AC_PATH_PROG(PATH_TO_DF,df) + AC_MSG_RESULT(" df syntax... $PATH_TO_DF -k") + AC_DEFINE_UNQUOTED(DF_COMMAND,"$PATH_TO_DF -k") +elif [df 2>/dev/null | egrep -i "^/dev/[a-z0-9/]+ +[0-9]+ +[0-9]+ +[0-9]+ +[0-9]+% +/[a-z0-9/]*" >/dev/null] +then + AC_PATH_PROG(PATH_TO_DF,df) + AC_MSG_RESULT(" df syntax... $PATH_TO_DF") + AC_DEFINE_UNQUOTED(DF_COMMAND,"$PATH_TO_DF") +elif [bdf 2>/dev/null | egrep -i "^/dev/[a-z0-9/]+ +[0-9]+ +[0-9]+ +[0-9]+ +[0-9]+% +/[a-z0-9/]*" >/dev/null] +then + AC_PATH_PROG(PATH_TO_DF,bdf) + AC_MSG_RESULT(" df syntax... $PATH_TO_DF") + AC_DEFINE_UNQUOTED(DF_COMMAND,"$PATH_TO_DF") +else + AC_MSG_WARN("unable to find usable df syntax") +fi + +AC_PATH_PROG(PATH_TO_PING,ping) + +AC_ARG_WITH(ping_command,--with-ping-command= sets syntax for ping,PING_COMMAND=$withval) +if test -n "$PING_COMMAND" +then + echo " ping syntax... (command-line) $PING_COMMAND" + if test -n "$PING_PACKETS_FIRST" + then + AC_DEFINE_UNQUOTED(PING_PACKETS_FIRST,"$PING_COMMAND") + fi +elif [ping -n -U -c 1 127.0.0.1 2>/dev/null | egrep -i "^round-trip" >/dev/null] +then + PING_COMMAND="$PATH_TO_PING -n -U -c %d %s" + AC_DEFINE_UNQUOTED(PING_PACKETS_FIRST,"$PING_COMMAND") + echo " ping syntax... $PATH_TO_PING -n -U -c " +elif [ping -n -c 1 127.0.0.1 2>/dev/null | egrep -i "^round-trip" >/dev/null] +then + PING_COMMAND="$PATH_TO_PING -n -c %d %s" + AC_DEFINE_UNQUOTED(PING_PACKETS_FIRST,"$PING_COMMAND") + echo " ping syntax... $PATH_TO_PING -n -c " +elif [ping -n 127.0.0.1 -c 1 2>/dev/null | egrep -i "^round-trip" >/dev/null] +then + PING_COMMAND="$PATH_TO_PING -n %s -c %d" + echo " ping syntax... $PATH_TO_PING -n -c " +elif [ping 127.0.0.1 -n 1 2>/dev/null | egrep -i "^round-trip" >/dev/null] +then + PING_COMMAND="$PATH_TO_PING %s -n %d" + echo " ping syntax... $PATH_TO_PING -n " +elif [ping -n -s 127.0.0.1 56 1 2>/dev/null | egrep -i "^round-trip" >/dev/null] +then + PING_COMMAND="$PATH_TO_PING -n -s %s 56 %d" + echo " ping syntax... $PATH_TO_PING -n -s 56 " +elif [ping -n -h 127.0.0.1 -s 56 -c 1 2>/dev/null | egrep -i "^round-trip" >/dev/null] +then + PING_COMMAND="$PATH_TO_PING -n -h %s -s 56 -c %d" + echo " ping syntax... $PATH_TO_PING -n -h -s 56 -c " +elif [ping -n -s 56 -c 1 127.0.0.1 2>/dev/null | egrep -i "^round-trip" >/dev/null] +then + PING_COMMAND="$PATH_TO_PING -n -s 56 -c %d %s" + AC_DEFINE_UNQUOTED(PING_PACKETS_FIRST,"$PING_COMMAND") + echo " ping syntax... $PATH_TO_PING -n -s 56 -c " +elif [ping -n -c 1 127.0.0.1 2>/dev/null | egrep -i "^round-trip" >/dev/null] +then + PING_COMMAND="$PATH_TO_PING -n -c %d %s" + AC_DEFINE_UNQUOTED(PING_PACKETS_FIRST,"$PING_COMMAND") + echo " ping syntax... $PATH_TO_PING -n -c " +else + AC_MSG_WARN("unable to find usable ping syntax") +fi +AC_DEFINE_UNQUOTED(PING_COMMAND,"$PING_COMMAND") + +AC_PATH_PROG(PATH_TO_NSLOOKUP,nslookup) +if test -n "$ac_cv_path_PATH_TO_NSLOOKUP" +then + AC_MSG_CHECKING("nslookup syntax") + if [nslookup -sil 127.0.0.1 2>&1 | grep "*** Invalid option: sil" >/dev/null] + then + AC_MSG_RESULT("$PATH_TO_NSLOOKUP") + AC_DEFINE_UNQUOTED(NSLOOKUP_COMMAND,"$PATH_TO_NSLOOKUP") + else + AC_MSG_RESULT("$PATH_TO_NSLOOKUP -sil") + AC_DEFINE_UNQUOTED(NSLOOKUP_COMMAND,"$PATH_TO_NSLOOKUP -sil") + fi + EXTRAS="$EXTRAS check_dns" +else + AC_MSG_WARN("nslookup command not found") +fi + +AC_PATH_PROG(PATH_TO_UPTIME,uptime) +AC_DEFINE_UNQUOTED(PATH_TO_UPTIME,"$PATH_TO_UPTIME") + +AC_PATH_PROG(PATH_TO_WHO,who) +if [who -q 2>/dev/null | egrep -i "^# users=[0-9]+$" >/dev/null] +then + AC_DEFINE_UNQUOTED(WHO_COMMAND,"$PATH_TO_WHO -q") +else + AC_DEFINE_UNQUOTED(WHO_COMMAND,"$PATH_TO_WHO") +fi + +AC_PATH_PROG(PATH_TO_SNMPGET,snmpget) +if test -f "$PATH_TO_SNMPGET" +then + AC_DEFINE_UNQUOTED(PATH_TO_SNMPGET,"$PATH_TO_SNMPGET") + EXTRAS="$EXTRAS check_hpjd check_snmp" +else + echo "** Get snmpget from http://ucd-snmp.ucdavis.edu to make check_hpjd and check_snmp plugins" +fi + +AC_PATH_PROG(PATH_TO_SNMPGETNEXT,snmpgetnext) +if test -f "$PATH_TO_SNMPGETNEXT" +then + AC_DEFINE_UNQUOTED(PATH_TO_SNMPGETNEXT,"$PATH_TO_SNMPGETNEXT") +fi + +AC_PATH_PROG(PATH_TO_QUAKESTAT,quakestat) +AC_PATH_PROG(PATH_TO_QSTAT,qstat) +if test -n "$PATH_TO_QUAKESTAT" +then + AC_DEFINE_UNQUOTED(PATH_TO_QSTAT,"$PATH_TO_QUAKESTAT") + EXTRAS="$EXTRAS check_game" +elif test -n "$PATH_TO_QSTAT" +then + AC_DEFINE_UNQUOTED(PATH_TO_QSTAT,"$PATH_TO_QSTAT") + EXTRAS="$EXTRAS check_game" +else + echo "** Get qstat from http://www.activesw.com/people/steve/qstat.html in order to make check_game plugin" +fi + +AC_PATH_PROG(PATH_TO_FPING,fping) +if test -n "$PATH_TO_FPING" +then + AC_DEFINE_UNQUOTED(PATH_TO_FPING,"$PATH_TO_FPING") + EXTRAS="$EXTRAS check_fping" +else + echo "** Get fping from http://www.stanford.edu/~schemers/docs/fping/fping.html in order to make check_fping plugin" +fi + +AC_PATH_PROG(PATH_TO_SSH,ssh) +if test -f "$PATH_TO_SSH" +then + AC_DEFINE_UNQUOTED(SSH_COMMAND,"$PATH_TO_SSH") + EXTRAS="$EXTRAS check_by_ssh" +else + echo "** Get ssh in order to make check_by_ssh plugin" +fi + +dnl dunno why this does not work below - use hack (kbd) +dnl fine on linux, broken on solaris +dnl if /bin/test -e "/proc/meminfo" + +if [cat /proc/meminfo > /dev/null 2>&1] +then + echo "found /proc/meminfo" + AC_DEFINE(HAVE_PROC_MEMINFO) + AC_DEFINE_UNQUOTED(PROC_MEMINFO,"/proc/meminfo") + EXTRAS="$EXTRAS check_swap" +elif [swap -l 2>&1 | egrep -i "swapfile" >/dev/null] +then + echo "found swap command" + AC_DEFINE(HAVE_SWAP) + AC_PATH_PROG(PATH_TO_SWAP,swap) + AC_DEFINE_UNQUOTED(SWAP_COMMAND,"$PATH_TO_SWAP -l") + if [swap -l 2>/dev/null | egrep -i "^lswap +path +pri +swaplo +blocks +free +maxswap" >/dev/null] + then + AC_DEFINE_UNQUOTED(SWAP_FORMAT,[" %*d %*s %*d,%*d %*d %*d %d %d"]) + echo " using IRIX format" + elif [swap -l 2>/dev/null | egrep -i "^swapfile +dev +swaplo +blocks +free" >/dev/null] + then + AC_DEFINE_UNQUOTED(SWAP_FORMAT,["%*s %*[[0-9,-]] %*d %d %d"]) + echo " using Solaris format" + fi + EXTRAS="$EXTRAS check_swap" +elif [swapinfo -k 2>&1 | egrep -i "Device" >/dev/null] +then + echo "found swapinfo command" + AC_DEFINE(HAVE_SWAP) + AC_PATH_PROG(PATH_TO_SWAP,swapinfo) + AC_DEFINE_UNQUOTED(SWAP_COMMAND,"$PATH_TO_SWAP -k") + if [swapinfo -k 2>/dev/null | egrep -i "^Device +1K-blocks +Used +Avail" >/dev/null] + then + AC_DEFINE_UNQUOTED(SWAP_FORMAT,["%*s %d %*d %d"]) + echo " using FreeBSD format" + fi + EXTRAS="$EXTRAS check_swap" +fi + +AC_PATH_PROG(PATH_TO_DIG,dig) +AC_DEFINE_UNQUOTED(PATH_TO_DIG,"$PATH_TO_DIG") +if test -n "$PATH_TO_DIG"; then + EXTRAS="$EXTRAS check_dig" +fi + +if test -f plugins/check_nt.c ; then + EXTRAS="$EXTRAS check_nt" +elif test -f ../plugins/check_nt.c ; then + EXTRAS="$EXTRAS check_nt" +fi + +dnl AC_EGREP_HEADER (PATTERN, HEADER-FILE, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]) +AC_TRY_COMPILE([#ifdef __STDC__ +#include +#include +#include +#else +#include +#include +#include +#endif], +[va_list args;], +[AC_MSG_RESULT(yes)], +[NEED_VA_LIST=-DNEED_VA_LIST AC_SUBST(NEED_VA_LIST) AC_MSG_RESULT(no)]) + +AC_SUBST(EXTRAS) +AC_SUBST(DEPLIBS) + +AC_SUBST(PACKAGE) +AC_SUBST(VERSION) +AC_DEFINE_UNQUOTED(PACKAGE,"${PACKAGE}") +AC_DEFINE_UNQUOTED(VERSION,"${VERSION}") +AC_DEFINE_UNQUOTED(PACKAGE_VERSION,"${VERSION}") + +AC_OUTPUT(Makefile subst plugins/Makefile plugins-scripts/Makefile plugins-scripts/subst plugins-scripts/utils.pm plugins-scripts/utils.sh command.cfg test.pl,echo timestamp > plugins/stamp-h1;echo timestamp > plugins/stamp-h2;echo timestamp > plugins/stamp-h3;echo timestamp > plugins/stamp-h4;echo timestamp > plugins/stamp-h5;echo timestamp > plugins/stamp-h6;PATH=.:..:$PATH subst.sh command.cfg) diff --git a/contrib/aix/check_crit_dsk b/contrib/aix/check_crit_dsk new file mode 100644 index 0000000..566e07c --- /dev/null +++ b/contrib/aix/check_crit_dsk @@ -0,0 +1,66 @@ +#!/bin/sh + +#========================================================================= +# Critical Disk Checker utility +# +# This is the same as the disk checker utility but we use it as +# a seperate service in Nagios to report on partitions that +# have reached 100% capacity. +# +# We have excluded /dev/cd0 because the cdrom drive will always +# report 100% capacity if a CD is in the drive. +# +# Authors: TheRocker +# SpEnTBoY +# +# Email: therocker@pawprints.2y.net +# lonny@abyss.za.org +# +#======================================================================= + +NUMBER=`rsh $1 -l root df -kP | grep -vE ":|/dev/cd0" | grep -E "100%" | tr -s ' '| cut -d' ' -f5 | cut -c1-3 | line` +TMPFILE=/tmp/tmpcrit.hndl +TMPTOO=/tmp/twocrit.hndl + +if [ "$NUMBER" -eq 100 ] +then + + `rsh $1 -l root df -kP |grep -vE ":|/dev/cd0" | grep -E "100%" | tr -s ' '| cut -d' ' -f6,5 >> $TMPFILE` + + LINES=`wc -l /tmp/tmpcrit.hndl | cut -c8` + LINESCTL=`wc -l /tmp/tmpcrit.hndl | cut -c8 ` + echo "Filesystems over 99% --> \c" + +#=============================================================== +# Just a little bit to check for multiple occurances of the +# condition. +#=============================================================== + + while [ $LINESCTL != 0 ] + do + + cat $TMPFILE | tail -$LINESCTL > $TMPTOO + cat $TMPTOO > $TMPFILE + LINESCTL=$(( $LINESCTL -1 )) + LINES=$(( $LINES -1 )) + DATA=`head -1 /tmp/tmpcrit.hndl` + echo "( $DATA ) \c" + + + done + echo "\n" + +#=============================================================== +# File clean up. Always pick up after yourself. Disk space +# doesn't grow on trees you know. +#=============================================================== + + rm -f $TMPFILE + rm -f $TMPTOO + exit 2 + +else + + echo "No Filesystems over 99%... OK" + exit 0 +fi diff --git a/contrib/aix/check_dsk b/contrib/aix/check_dsk new file mode 100644 index 0000000..c8ddb3f --- /dev/null +++ b/contrib/aix/check_dsk @@ -0,0 +1,62 @@ +#! /bin/sh + +#====================================================================== +# Disk Checker utility +# +# Simple little script that checks the status of all partitions +# on a node's hard disks. It will produce a warning alert and list +# the offending filesystems in nagios. +# +# Authors: SpEnTBoY +# TheRocker +# +# Email: lonny@abyss.za.org +# therocker@pawprints.2y.net +#===================================================================== + +NUMBER=`rsh $1 -l root df -kP | grep -v ":" | grep -E "9[0-9]%" | tr -s ' '| cut -d' ' -f5 | cut -c1-2 | line` +TMPFILE=/tmp/tmp.hndl +TMPTOO=/tmp/two.hndl + +if [ "$NUMBER" -gt 90 ] +then + + `rsh $1 -l root df -kP |grep -v ":" | grep -E "9[0-9]%" | tr -s ' '| cut -d' ' -f6,5 >> $TMPFILE` + + LINES=`wc -l /tmp/tmp.hndl | cut -c8` + LINESCTL=`wc -l /tmp/tmp.hndl | cut -c8 ` + echo "Filesystems over 90% --> \c" + +#====================================================================== +# You'll see this one in a few our shell scripts. Just chcecking for +# multiple occurances of the warnign condition. We gotta list 'em all +#====================================================================== + + while [ $LINESCTL != 0 ] + do + + cat $TMPFILE | tail -$LINESCTL > $TMPTOO + cat $TMPTOO > $TMPFILE + LINESCTL=$(( $LINESCTL -1 )) + LINES=$(( $LINES -1 )) + DATA=`head -1 /tmp/tmp.hndl` + echo "( $DATA ) \c" + + + done + echo "\n" + +#=============================================================== +# Clean up all those nasty tmp files that suck up valuable +# disk realestate. +#=============================================================== + + rm -f $TMPFILE + rm -f $TMPTOO + exit 1 + +else + + echo "No Filesystems over 90%... OK" + exit 0 +fi diff --git a/contrib/aix/check_failed b/contrib/aix/check_failed new file mode 100644 index 0000000..50cdf7e --- /dev/null +++ b/contrib/aix/check_failed @@ -0,0 +1,48 @@ +#!/usr/bin/perl +#====================== +# Created May 25, 2000 +#====================== + +# This scripts is for checking for failed root login attempts on +# any machine running AIX which has a failedlogin file in /etc/security +# The purpose is to thwart (good word) any unauthorised people from +# even trying to log in as root. This plugin has been developed for Nagios +# running on AIX. +# Lonny Selinger SpEnTBoY lonny@abyss.za.org +# May + + +my $server = $ARGV[0]; + +if (!$ARGV[0]) { + print "You must specify a server to check\n"; + print "usage: ./check_failed \n"; + exit (-1); + } else { + open (DATE, "/bin/date '+%b %d' |"); + while () { + $dline = $_; + @dresults = $dline; + chop $dresults[0]; + } + open (SULOG, "rsh $server -l root who /etc/security/failedlogin | grep root |"); + while () { + $line = $_; + @results = split (/\s+/,$line); + if ($line =~ /^root/) { + if (join(' ', @results[2,3]) eq $dresults[0]) { + print "FAILED root login on $dresults[0], node: $ARGV[0] from $results[5]\n"; + exit(2); + } + } + } +} +if (join(' ', @results[2,3]) ne $dresults[0]) { + print "No Failed Root Logins on This Node\n"; + exit(0); +} +exit(0); +close(SULOG); +close(DATE); + + diff --git a/contrib/aix/check_io b/contrib/aix/check_io new file mode 100644 index 0000000..58b25f6 --- /dev/null +++ b/contrib/aix/check_io @@ -0,0 +1,69 @@ +#! /bin/sh + +#================================================================= +# +# I/O Checker (KBPS) +# This Script uses iostat to monitor disk io +# Useful for notifications of disk thrashing. +# +# Authors: TheRocker +# SpEnTBoY +# +# Email: therocker@pawprints.2y.net +# lonny@abyss.za.org +# +#================================================================ + +NUMBER1=`rsh $1 -l root iostat -d | grep -e "hdisk" | tr -s ' ' | cut -d' ' -f2 | sort -2 -r | cut -c1 | line` +NUMBER2=`rsh $1 -l root iostat -d | grep -e "hdisk" | tr -s ' ' | cut -d' ' -f2 | sort -2 -r | cut -c2 | line` +TMPFILE=/tmp/iotest.hndl +TMPTOO=/tmp/iotwo.hndl + +#=========================================================== +# +# We do an evaluation on $NUMBER1 and $NUMBER2 to see if +# disk io is exceeding 40%. +# +#=========================================================== + +if [ "$NUMBER1" -gt 4 ] && [ "$NUMBER2" -gt 0 ] +then + + `rsh $1 -l root iostat -d | grep -v cd0 | tr -s ' '| cut -d' ' -f1,2 | grep -e "4[0-9]." >> $TMPFILE` + +#==================================================================== +# +# Of course, there may be more than one hard disk on the node +# so we use this bit of code to report on more than one instance +# of excessive disk IO. +# +#==================================================================== + + LINES=`wc -l /tmp/iotest.hndl | cut -c8` + LINESCTL=`wc -l /tmp/iotest.hndl | cut -c8 ` + echo "WARNING!!! Disk I/O Exceeding 40% on --> \c" + + while [ $LINESCTL != 0 ] + do + + cat $TMPFILE | tail -$LINESCTL > $TMPTOO + cat $TMPTOO > $TMPFILE + LINESCTL=$(( $LINESCTL -1 )) + LINES=$(( $LINES -1 )) + DATA=`head -1 /tmp/iotest.hndl` + echo "( $DATA ) " + + + done + echo "\n" + + rm -f $TMPFILE + rm -f $TMPTOO + exit 1 + +else + + print "No Disk I/O Exceeding 40%...OK" + exit 0 + +fi diff --git a/contrib/aix/check_kerberos b/contrib/aix/check_kerberos new file mode 100644 index 0000000..443ab10 --- /dev/null +++ b/contrib/aix/check_kerberos @@ -0,0 +1,49 @@ +#! /bin/sh + +#========================================================================= +# Kerberos Ticket Checker +# +# This script is handy if you allow kerberos tickets to expire +# on your nodes. The script will simply warn you when a node has +# kerberos tickets expiring on the current date. This will allow to +# re-initialize the tickets if you wish to do so. +# +# Nothing fancy here, all Nagios will show is the number of tickets +# that are going to (or already have) expired. +# +# An item of note: +# +# We made no provisions for the weekend. If tickets expire on the +# weekend and nobody is around, you won't see a warning on the +# Nagios console because we look for expired on the current day +# only. It's a good idea to have this warning emailed to the +# appropriate admin and if there is something critical that relies +# on Kerberos, you might want to send a page. +# +# Authors: TheRocker +# SpEnTBoY +# +# Email: therocker@pawprints.2y.net +# lonny@abyss.za.org +#========================================================================= + +TMPFILE=/tmp/kerbtmp.hndl +DATE=`date +%b' '%d` + +rsh $1 -l root /usr/lpp/ssp/kerberos/bin/klist | tr -s ' ' | cut -d' ' -f4,5,6 | grep -e "$DATE" > $TMPFILE + + +if [ -s $TMPFILE ] +then + + LINES=`wc -l /tmp/kerbtmp.hndl | cut -c7-8` + echo "Kerberos Tickets set to expire --> \c" + echo "$LINES \c" + echo "\n" + + rm -f $TMPFILE + exit 1 + +fi + echo "Kerberos Tickets are valid" + exit 0 diff --git a/contrib/aix/check_ping b/contrib/aix/check_ping new file mode 100644 index 0000000..aaa8c84 --- /dev/null +++ b/contrib/aix/check_ping @@ -0,0 +1,117 @@ +#!/usr/bin/perl -w + +#================================================================ +# +# This perl script will accept an argument and simply pass it +# to ping. It works by sending 2 ping to the specified host +# and evaluating on the average delta time of those 2 pings. +# +# Author: SpEnTBoY +# Email: lonny@abyss.za.org +# April 5,2000 +# +#================================================================ + +#============================ +# State predefined stuff and +# requirements +#============================ + +require 5.004; +use POSIX; +use strict; + +sub usage; + +my $ipaddr = $ARGV[0]; + +my $TIMEOUT = 15; + +my %ERRORS = ('UNKNOWN' , '-1', + 'OK' , '0', + 'WARNING', '1', + 'CRITICAL', '2'); + +my $remote = shift || &usage(%ERRORS); +my $warning = shift || 750; +my $critical = shift || 1000; + +my $state = "OK"; +my $answer = undef; +my $offset = undef; +my $line = undef; + +#============================================================ +# If theres no response we can exit the bloody thing cleanly +# last thing I want to do is hang an AIX system ;-) +#============================================================ + +$SIG{'ALRM'} = sub { + print ("ERROR: No response from PING! (alarm)\n"); + exit $ERRORS{"UNKNOWN"}; +}; +alarm($TIMEOUT); + +#================================================ +# Pass stddn from $ARGV to the command and parse +# the info we need (namely the value for "max" +#================================================ + + + +open(PING,"/usr/sbin/ping -c 2 '$ipaddr' >&1|"); +while () { + $line = $_; + if (/round-trip min\/avg\/max = (.+)\/(.+)\/(.+) ms/) { + $offset = $3; + last; + } +} + +#================================================== +# Do some error checking on the output of the file +# and implement values for and +# deffinitions if they were specified by the user +# or sub in the predefined ones +#================================================== + +if (defined $offset) { + if (abs($offset) > $warning) { + if (abs($offset) > $critical) { + $state = "CRITICAL"; + $answer = ": Ping Time $offset MS greater than +/- $critical MS\n"; + } else { + $state = "WARNING"; + $answer = ": Ping Time $offset MS greater than +/- $warning MS\n"; + } + } else { + $state = "OK"; + $answer = ": Ping Time $offset MS\n"; + } +} else { + $state = "UNKNOWN"; + $answer = ": $line\n"; +} +print ("$state$answer"); +exit $ERRORS{$state}; + +sub usage { + print "\n"; + print "#=========================================\n"; + print "Check_Ping 0.02 script by Lonny Selinger\n"; + print "Made with AIX in mind ;-)\n"; + print "#=========================================\n"; + print "\n"; + print "#================================================\n"; + print " I'm going to need a few more arguments from you\n"; + print "#================================================\n"; + print "\n"; + print "#================================================\n"; + print "Usage: check_ping [ []\n"; + print "#================================================\n"; + print "\n"; + print " = Ping in MS at which a warning message will be generated.\n Defaults to 750.\n"; + print " = Ping in MS at which a critical message will be generated.\n Defaults to 1000.\n\n"; + exit $ERRORS{"UNKNOWN"}; +} + diff --git a/contrib/aix/check_queue b/contrib/aix/check_queue new file mode 100644 index 0000000..9f709c5 --- /dev/null +++ b/contrib/aix/check_queue @@ -0,0 +1,67 @@ +#! /bin/sh + +#=============================================================== +# Print Queue Checker +# +# The print queue checker simply looks for an occurance of a +# DOWN queue. A note of warning, if you use remote queues in +# AIX to redirect print jobs from the AIX queue to an NT print +# server that print through DLC rather than IP, it will be very +# s - l - o - w. But it will work. +# +# Author: TheRocker +# Email: therocker@pawprints.2y.net +#=============================================================== + +TMPFILE=/tmp/qtmp.hndl +TMPTOO=/tmp/qtwo.hndl + +#======================================================================= +# +# This script will also work on AIX 4.2.1 BUT you have to change +# the following line. AIX 4.2.1 does not support the -W option +# with lpstat. For AIX 4.2.1 just remove the -W option and it should +# work just fine. +# +#======================================================================= + +`rsh $1 -l root lpstat -W | grep -e "DOWN" | tr -s ' ' | cut -d' ' -f1,3 > /tmp/qtmp.hndl 2> /tmp/q_err` + +if [ -s $TMPFILE ] +then + +#======================================================= +# +# If you've seen the other AIX scripts I wrote you may +# notice that I use this bit of code a lot. Well it +# works and appears to be all purpose. +# +#======================================================= + + LINES=`wc -l /tmp/qtmp.hndl | cut -c8` + LINESCTL=`wc -l /tmp/qtmp.hndl | cut -c8` + + echo "Print Queue DOWN --> \c" + + while [ $LINESCTL != 0 ] + do + + cat $TMPFILE | tail -$LINESCTL > $TMPTOO + cat $TMPTOO > $TMPFILE + LINESCTL=$(( $LINESCTL -1 )) + LINES=$(( $LINES -1 )) + DATA=`head -1 /tmp/qtmp.hndl` + echo "( $DATA ) \c" + + + done + + echo "\n" + + rm -f $TMPFILE + rm -f $TMPTOO + exit 2 + +fi + echo "Print Queues Running... OK" + exit 0 diff --git a/contrib/aix/pg_stat b/contrib/aix/pg_stat new file mode 100644 index 0000000..e0603ec --- /dev/null +++ b/contrib/aix/pg_stat @@ -0,0 +1,45 @@ +#!/bin/ksh + +#============================================================================== +# Script was originally created to collect stats and dump then to a log file +# every five minutes. But we like this better (the log file thing is still +# good if you want to track availability). +# +# Authors: SpEnTBoY +# TheRocker +# +# Email: lonny@abyss.za.org +# therocker@pawprints.2y.net +#============================================================================== + +#========================================================================================= +# +# The best way to do this is to use Kerberos but we use rsh here because our monitoring +# workstation doesn't have Kerberos installed. In order for this to work, the remote +# host ($1) must have a .rhosts file that contains a line like: +# +# monitorhost nagiosuser +# +#========================================================================================= + +PAGING2=`rsh $1 -l root lsps -a -s | grep -v Paging | tr -s ' '| cut -d' ' -f3 | cut -d'%' -f1` + + +if [ "$PAGING2" -gt "35" ] && [ "$PAGING2" -lt "50" ] +then + echo "Paging Space is over 35% ("$PAGING2")%" +exit 1 +fi + +if [ "$PAGING2" -gt "49" ] +then + echo "WARNING! Paging Space is over 50% ("$PAGING2")%" +exit 2 +fi + +if [ "$PAGING2" -lt "34" ] +then + echo "Paging Space is less than 34% ("$PAGING2")%" +exit 0 +fi + diff --git a/contrib/check_apache.pl b/contrib/check_apache.pl new file mode 100644 index 0000000..b9e69a0 --- /dev/null +++ b/contrib/check_apache.pl @@ -0,0 +1,283 @@ +#!/usr/bin/perl +# +# (c)2001 Sebastian Hetze, Linux Information Systems AG +# send bug reports to +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# 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 (or with Nagios); if not, write to the +# Free Software Foundation, Inc., 59 Temple Place - Suite 330, +# Boston, MA 02111-1307, USA +# +# +# Check apache status information provided by mod_status to find +# out about the load (number of servers working) and the +# performance (average response time for recent requests). +# +# Usage: +# check_apache -H [-lhV] [-w ] [-c ] [-u ] +# +# check_apache (if you cannot avoid it) +# + +use LWP::UserAgent; +use URI::URL; +use Getopt::Long; +Getopt::Long::Configure('bundling'); + +$version=0.01; + +my %ERRORS = ('UNKNOWN' , '-1', + 'OK' , '0', + 'WARNING', '1', + 'CRITICAL', '2'); + + +# +# some default values +# +$perf_w=500; +$perf_c=1000; +$load_w=20; +$load_c=30; +$TIMEOUT=15; + +# +# get command line options the regular way +# +GetOptions + ("V" => \$opt_V, "version" => \$opt_V, + "h" => \$opt_h, "help" => \$opt_h, + "l" => \$opt_l, "load" => \$opt_l, + "v" => \$verbose, "verbose" => \$verbose, + "w=s" => \$opt_w, "warning=s" => \$opt_w, + "c=s" => \$opt_c, "critical=s" => \$opt_c, + "H=s" => \$opt_H, "hostname=s" => \$opt_H, + "u=s" => \$opt_u, "url=s" => \$opt_u); + +# +# handle the verbose stuff first +# +if ($opt_V) { + print "\n"; + print "check_apache nagios plugin version $version\n"; + print "\n"; + print "The nagios plugins come with ABSOLUTELY NO WARRANTY. You may redistribute\n"; + print "copies of the plugins under the terms of the GNU General Public License.\n"; + print "For more information about these matters, see the file named COPYING.\n"; + print "\n"; + print "Copyright (c) 2001 Sebastian Hetze Linux Information Systems AG\n"; + print "\n"; + print "\n"; + exit $ERRORS{'UNKNOWN'}; +} + +if ($opt_h) { + print_help(); + exit $ERRORS{'UNKNOWN'}; +} + +# +# now get options the weired way and set the defaults +# if nothing else is provided +# +$opt_H = shift unless ($opt_H); +print_usage() unless ($opt_H); + +if($opt_l) { + $autostring="?auto"; + ($opt_w) || ($opt_w = shift) || ($opt_w = $load_w); + $warn = $1 if ($opt_w =~ /([0-9]+)/); + ($opt_c) || ($opt_c = shift) || ($opt_c = $load_c); + $alert = $1 if ($opt_c =~ /([0-9]+)/); +} else { + $autostring=""; + ($opt_w) || ($opt_w = shift) || ($opt_w = $perf_w); + $warn = $1 if ($opt_w =~ /([0-9]+)/); + ($opt_c) || ($opt_c = shift) || ($opt_c = $perf_c); + $alert = $1 if ($opt_c =~ /([0-9]+)/); +} + +($opt_u) || ($opt_u = shift) || ($opt_u = "/server-status"); + + +# +# dont let us wait forever... +# +$SIG{'ALRM'} = sub { + print ("ERROR: No response from HTTP server (alarm)\n"); + exit $ERRORS{"UNKNOWN"}; +}; +alarm($TIMEOUT); + + +# +# now we set things up for the real work +# and fire up the request +# +$ua = new LWP::UserAgent; +$ua->agent("Nagios/0.1 " . $ua->agent); + + +$urlstring = "http://" . $opt_H . $opt_u . $autostring; +$url = url($urlstring); + +my $req = new HTTP::Request 'GET', $url; +my $res = $ua->request($req); + +# +# hopefully we´ve got something usefull +# +if ($res->is_success) { + if($opt_l) { + foreach $_ (split /^/m, $res->content) { + next if /^\s*$/; +# +# this is the load checking section +# we parse the whole content, just in case someone +# wants to use this some day in the future +# + if (/^Total Accesses:\s+([0-9.]+)/) { $accesses = $1; next; } + if (/^Total kBytes:\s+([0-9.]+)/) { $kbytes = $1; next; } + if (/^CPULoad:\s+([0-9.]+)\s+/) { $load = $1; next; } + if (/^Uptime:\s+([0-9.]+)\s+/) { $uptime = $1; next; } + if (/^ReqPerSec:\s+([0-9.]+)\s+/) { $rps = $1; next; } + if (/^BytesPerSec:\s+([0-9.]+)\s+/) { $bps = $1; next; } + if (/^BytesPerReq:\s+([0-9.]+)\s+/) { $bpr = $1; next; } + if (/^BusyServers:\s+([0-9.]+)\s+/) { $busy = $1; next; } + if (/^IdleServers:\s+([0-9.]+)\s+/) { $idle = $1; next; } + if (/^Scoreboard:\s+([SRWKDLG_.]+)\s+/) { $score = $1; next; } + print "Unknown Status\n"; + exit $ERRORS{"UNKNOWN"}; + } +# +# now we even parse the whole scoreboard, just for fun +# + foreach $scorepoint (split //m, $score) { + if($scorepoint eq '.') { $scores{'.'}+=1; next; } # Unused + if($scorepoint eq '_') { $scores{'_'}+=1; next; } # Waiting + if($scorepoint eq 'S') { $scores{'S'}+=1; next; } # Starting + if($scorepoint eq 'R') { $scores{'R'}+=1; next; } # Reading + if($scorepoint eq 'W') { $scores{'W'}+=1; next; } # Writing + if($scorepoint eq 'K') { $scores{'K'}+=1; next; } # Keepalive + if($scorepoint eq 'D') { $scores{'D'}+=1; next; } # DNS Lookup + if($scorepoint eq 'L') { $scores{'L'}+=1; next; } # Logging + if($scorepoint eq 'G') { $scores{'G'}+=1; next; } # Going + } + + if($busy>$alert) { + printf "HTTPD CRITICAL: %.0f servers running\n", $busy; + exit $ERRORS{"CRITICAL"}; + } + if($busy>$warn) { + printf "HTTPD WARNING: %.0f servers running\n", $busy; + exit $ERRORS{"WARNING"}; + } + printf "HTTPD ok: %.0f servers running, %d idle\n", $busy, $idle; + exit $ERRORS{"OK"}; + + } else { +# +# this is the performance check section +# We are a bit lazy here, no parsing of the initial data +# block and the scoreboard. +# However, you have the whole set of per server +# information to play with ;-) +# The actual performance is measured by adding up the +# milliseconds required to process the most recent +# requests of all instances and then taking the average. +# + foreach $tablerow (split //m, $res->content) { + ($empty,$Srv,$PID,$Acc,$M,$CPU,$SS,$Req,$Conn,$Child,$Slot,$Client,$VHost,$Request) + = split //, $tablerow; + if($Req) { + $lines+=1; + $req_sum+=$Req; + } + undef $Req; + } + $average=$req_sum/$lines; + if($average>$alert) { + printf "HTTPD CRITICAL: average response time %.0f + milliseconds\n", $average; + exit $ERRORS{"CRITICAL"}; + } + if($average>$warn) { + printf "HTTPD WARNING: average response time %.0f + milliseconds\n", $average; + exit $ERRORS{"WARNING"}; + } + if($average>0) { + printf "HTTPD ok: average response time %.0f milliseconds\n", + $average; + exit $ERRORS{"OK"}; + } + print "Unknown Status\n"; + exit $ERRORS{"UNKNOWN"}; + } +} else { + print "HTTP request failed\n"; + exit $ERRORS{"CRITICAL"}; +} + + +# +# ok, now we are almost through +# These last subroutines do the things for those that do not +# read source code. +# +sub print_usage () { + print "Usage: $0 -H [-lhV] [-w ] [-c ] [-u ]\n"; } + +sub print_help () { + print "\n"; + print "\n"; + print "check_apache nagios plugin version $version\n"; + print "\n"; + print "The nagios plugins come with ABSOLUTELY NO WARRANTY. You may redistribute\n"; + print "copies of the plugins under the terms of the GNU General Public License.\n"; + print "For more information about these matters, see the file named COPYING.\n"; + print "\n"; + print "Copyright (c) 2001 Sebastian Hetze Linux Information Systems AG\n"; + print "\n"; + print "\n"; + print "This plugin checks the apache HTTP service on the specified host.\n"; + print "It uses the mod_status facilities provided by the apache server.\n"; + print "The monitoring server must be authorized in httpd.conf.\n"; + print "\n"; + print "\n"; + print_usage(); + print "\n"; + print "Options:\n"; + print " -H, --hostname=ADDRESS\n"; + print " host name argument for server.\n"; + print " -l, --load\n"; + print " check load instead of performance.\n"; + print " -h, --help\n"; + print " print detailed help screen.\n"; + print " -V, --version\n"; + print " print version information.\n"; + print " -w, --warning=INTEGER\n"; + print " load / performance level at which a warning message will be gererated.\n"; + print " -c, --critical=INTEGER\n"; + print " load / performance level at which a critical message will be gererated.\n"; + print " -u, --url=PATH\n"; + print " location to call mod_status.\n"; + print "\n"; + print " Defaults for performance checking are $perf_w/$perf_c msec.\n"; + print " Defaults for load checking are $load_w/$load_c servers running.\n"; + print "\n"; + print "\n"; +} +# +# the end +# diff --git a/contrib/check_apc_ups.pl b/contrib/check_apc_ups.pl new file mode 100644 index 0000000..dd979f5 --- /dev/null +++ b/contrib/check_apc_ups.pl @@ -0,0 +1,314 @@ +#! /usr/bin/perl -wT +# +# Check_apc_ups - Check APC UPS status via SNMP +# Shamelessly copied from check_breeze.pl +# +# To do: +# - Send SNMP queries directly, instead of forking `snmpget`. +# - Make the status less verbose. Maybe we can send an "onLine, time +# remaining: hh:mm:ss" if all is well, and a list of specific problems +# if something is broken. + +BEGIN { + if ($0 =~ m/^(.*?)[\/\\]([^\/\\]+)$/) { + $runtimedir = $1; + $PROGNAME = $2; + } +} + +use strict; +use Getopt::Long; +use vars qw($opt_V $opt_h $opt_H $opt_T $opt_t $opt_R $opt_r + $opt_L $opt_l $PROGNAME); +use lib $main::runtimedir; +use utils qw(%ERRORS &print_revision &support &usage); + +sub print_help (); +sub print_usage (); +sub get_snmp_int_val ($); +sub escalate_exitval ($); + +$ENV{'PATH'}=''; +$ENV{'BASH_ENV'}=''; +$ENV{'ENV'}=''; + +Getopt::Long::Configure('bundling'); +GetOptions + ("V" => \$opt_V, "version" => \$opt_V, + "h" => \$opt_h, "help" => \$opt_h, + "T=s" => \$opt_T, "temp-critical" => \$opt_T, + "t=s" => \$opt_t, "temp-warning" => \$opt_t, + "R=s" => \$opt_R, "runtime-critical" => \$opt_R, + "r=s" => \$opt_r, "runtime-warning" => \$opt_r, + "L=s" => \$opt_L, "load-critical" => \$opt_L, + "l=s" => \$opt_l, "load-warning" => \$opt_l, + "H=s" => \$opt_H, "hostname=s" => \$opt_H); + +if ($opt_V) { + print_revision($PROGNAME,'$Revision$'); + exit $ERRORS{'OK'}; +} + +if ($opt_h) {print_help(); exit $ERRORS{'OK'};} + +($opt_H) || ($opt_H = shift) || usage("Host name/address not specified\n"); +my $host = $1 if ($opt_H =~ /([-.A-Za-z0-9]+)/); +($host) || usage("Invalid host: $opt_H\n"); + +# Defaults + +$opt_R *= 60 * 100 if (defined $opt_R); # Convert minutes to secs/100 +$opt_r *= 60 * 100 if (defined $opt_R); + +my $tempcrit = $opt_T || 60; +my $tempwarn = $opt_t || 40; +my $runtimecrit = $opt_R || 30 * 60 * 100; # Secs / 100 +my $runtimewarn = $opt_r || 60 * 60 * 100; +my $loadcrit = $opt_L || 85; +my $loadwarn = $opt_l || 50; + +if ($tempcrit !~ /\d+/) { usage ("Invalid critical temperature threshold.\n"); } +if ($tempwarn !~ /\d+/) { usage ("Invalid critical temperature threshold.\n"); } + +if ($runtimecrit !~ /\d+/) { + usage ("Invalid critical run time threshold.\n"); +} +if ($runtimewarn !~ /\d+/) { + usage ("Invalid warning run time threshold.\n"); +} + +if ($loadcrit !~ /\d+/ || $loadcrit < 0 || $loadcrit > 100) { + usage ("Invalid critical load threshold.\n"); +} +if ($loadwarn !~ /\d+/ || $loadwarn < 0 || $loadwarn > 100) { + usage ("Invalid warning load threshold.\n"); +} + + +# APC UPS OIDs +# APC MIBs are available at ftp://ftp.apcftp.com/software/pnetmib/mib +my $upsBasicOutputStatus = ".1.3.6.1.4.1.318.1.1.1.4.1.1.0"; +my $upsBasicBatteryStatus = ".1.3.6.1.4.1.318.1.1.1.2.1.1.0"; +my $upsAdvInputLineFailCause = ".1.3.6.1.4.1.318.1.1.1.3.2.5.0"; +my $upsAdvBatteryTemperature = ".1.3.6.1.4.1.318.1.1.1.2.2.2.0"; +my $upsAdvBatteryRunTimeRemaining = ".1.3.6.1.4.1.318.1.1.1.2.2.3.0"; +my $upsAdvBatteryReplaceIndicator = ".1.3.6.1.4.1.318.1.1.1.2.2.4.0"; +my $upsAdvOutputLoad = ".1.3.6.1.4.1.318.1.1.1.4.2.3.0"; +my $upsAdvTestDiagnosticsResults = ".1.3.6.1.4.1.318.1.1.1.7.2.3.0"; + +my @outputStatVals = ( + [ undef, undef ], # pad 0 + [ undef, undef ], # pad 1 + [ "onLine", $ERRORS{'OK'} ], # 2 + [ "onBattery", $ERRORS{'WARNING'} ], # 3 + [ "onSmartBoost", $ERRORS{'WARNING'} ], # 4 + [ "timedSleeping", $ERRORS{'WARNING'} ], # 5 + [ "softwareBypass", $ERRORS{'WARNING'} ], # 6 + [ "off", $ERRORS{'CRITICAL'} ], # 7 + [ "rebooting", $ERRORS{'WARNING'} ], # 8 + [ "switchedBypass", $ERRORS{'WARNING'} ], # 9 + [ "hardwareFailureBypass", $ERRORS{'CRITICAL'} ], # 10 + [ "sleepingUntilPowerReturn", $ERRORS{'CRITICAL'} ], # 11 + [ "onSmartTrim", $ERRORS{'WARNING'} ], # 12 +); + +my @failCauseVals = ( + undef, + "noTransfer", + "highLineVoltage", + "brownout", + "blackout", + "smallMomentarySag", + "deepMomentarySag", + "smallMomentarySpike", + "largeMomentarySpike", + "selfTest", + "rateOfVoltageChnage", +); + +my @battStatVals = ( + [ undef, undef ], # pad 0 + [ undef, undef ], # pad 1 + [ "batteryNormal", $ERRORS{'OK'} ], # 2 + [ "batteryLow", $ERRORS{'CRITICAL'} ], # 3 +); + +my @battReplVals = ( + [ undef, undef ], # pad 0 + [ "noBatteryNeedsReplacing", $ERRORS{'OK'} ], # 1 + [ "batteryNeedsReplacing", $ERRORS{'CRITICAL'} ], # 2 +); + +my @diagnosticsResultsVals = ( + [ undef, undef ], # pad 0 + [ "OK", $ERRORS{'OK'} ], # 1 + [ "failed", $ERRORS{'CRITICAL'} ], # 2 + [ "invalidTest", $ERRORS{'CRITICAL'} ], # 3 + [ "testInProgress", $ERRORS{'OK'} ], # 4 +); + +my $exitval = $ERRORS{'UNKNOWN'}; +my $data; +my $onbattery = 3; + +$data = get_snmp_int_val( $upsBasicOutputStatus ); + +print "Output status: "; +if (defined ($data) && defined ($outputStatVals[$data][0])) { + print "$outputStatVals[$data][0] | "; + escalate_exitval($outputStatVals[$data][1]); +} else { + print "unknown | "; +} + +$data = get_snmp_int_val( $upsAdvBatteryRunTimeRemaining ); + +print "Rem time: "; +if (defined ($data)) { + my $hrs = int($data / (60 * 60 * 100)); # Data is hundredths of a second + my $mins = int($data / (60 * 100)) % 60; + my $secs = ($data % 100) / 100; + printf "%d:%02d:%05.2f | ", $hrs, $mins, $secs; + if ($data <= $runtimecrit) { + escalate_exitval($ERRORS{'CRITICAL'}); + } elsif ($data <= $runtimewarn) { + escalate_exitval($ERRORS{'WARNING'}); + } else { + escalate_exitval($ERRORS{'OK'}); + } +} else { + print "unknown | "; +} + +$data = get_snmp_int_val( $upsBasicBatteryStatus ); + +print "Battery status: "; +if (defined ($data) && defined ($battStatVals[$data][0])) { + my $failcause = "unknown"; + my $fc = get_snmp_int_val( $upsAdvInputLineFailCause ); + if ($data == $onbattery) { + if (defined ($failCauseVals[$fc])) { $failcause = $failCauseVals[$fc]; } + print "$battStatVals[$data][0] ($failcause) | "; + } else { + print "$battStatVals[$data][0] | "; + } + escalate_exitval($battStatVals[$data][1]); +} else { + print "unknown | "; +} + +$data = get_snmp_int_val( $upsAdvBatteryTemperature ); + +print "Battery temp(C): "; +if (defined ($data)) { + print "$data | "; + if ($data >= $tempcrit) { + escalate_exitval($ERRORS{'CRITICAL'}); + } elsif ($data >= $tempwarn) { + escalate_exitval($ERRORS{'WARNING'}); + } else { + escalate_exitval($ERRORS{'OK'}); + } +} else { + print "unknown | "; +} + +$data = get_snmp_int_val( $upsAdvBatteryReplaceIndicator ); + +print "Battery repl: "; +if (defined ($data) && defined ($battReplVals[$data][0])) { + print "$battReplVals[$data][0] | "; + escalate_exitval($battReplVals[$data][1]); +} else { + print "unknown | "; +} + +$data = get_snmp_int_val( $upsAdvOutputLoad ); + +print "Output load (%): "; +if (defined ($data)) { + print "$data | "; + if ($data >= $loadcrit) { + escalate_exitval($ERRORS{'CRITICAL'}); + } elsif ($data >= $loadwarn) { + escalate_exitval($ERRORS{'WARNING'}); + } else { + escalate_exitval($ERRORS{'OK'}); + } +} else { + print "unknown | "; +} + +$data = get_snmp_int_val( $upsAdvTestDiagnosticsResults ); + +print "Diag result: "; +if (defined ($data) && defined ($diagnosticsResultsVals[$data][0])) { + print "$diagnosticsResultsVals[$data][0]\n"; + escalate_exitval($diagnosticsResultsVals[$data][1]); +} else { + print "unknown\n"; +} + + +exit $exitval; + + +sub print_usage () { + print "Usage: $PROGNAME -H -T temp -t temp -R minutes -r minutes\n"; + print " -L percent -l percent\n"; +} + +sub print_help () { + print_revision($PROGNAME,'$Revision$'); + print "Copyright (c) 2001 Gerald Combs/Jeffrey Blank/Karl DeBisschop + +This plugin reports the status of an APC UPS equipped with an SNMP management +module. + +"; + print_usage(); + print " +-H, --hostname=HOST + Name or IP address of host to check +-T --temp-critical + Battery degrees C above which a CRITICAL status will result (default: 60) +-t --temp-warning + Battery degrees C above which a WARNING status will result (default: 40) +-R --runtime-critical + Minutes remaining below which a CRITICAL status will result (default: 30) +-r --runtime-warning + Minutes remaining below which a WARNING status will result (default: 60) +-L --load-critical + Output load pct above which a CRITICAL status will result (default: 85 +-l --load-warning + Output load pct above which a WARNING status will result (default: 50 + +"; + support(); +} + +sub get_snmp_int_val ($) { + my $val=0; + my $oid = shift(@_); + + $val = `/usr/bin/snmpget $host public $oid 2> /dev/null`; + my @test = split(/ /,$val,3); + + return undef unless (defined ($test[2])); + + if ($test[2] =~ /\(\d+\)/) { # Later versions of UCD SNMP + ($val) = ($test[2] =~ /\((\d+)\)/); + } elsif ($test[2] =~ /: \d+/) { + ($val) = ($test[2] =~ /: (\d+)/); + } else { + $val = $test[2]; + } + + return $val; +} + +sub escalate_exitval ($) { + my $newval = shift(@_); + + if ($newval > $exitval) { $exitval = $newval; } +} diff --git a/contrib/check_bgpstate.pl b/contrib/check_bgpstate.pl new file mode 100644 index 0000000..6658a0b --- /dev/null +++ b/contrib/check_bgpstate.pl @@ -0,0 +1,215 @@ +#!/usr/bin/perl -w +# +# check_bgpstate.pl - nagios plugin +# +# Copyright (C) 2000 Christoph Kron +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +# +# Report bugs to: ck@zet.net +# +# 11.01.2000 Version 1.0 + + + +use strict; + +use Net::SNMP; +use Getopt::Long; +&Getopt::Long::config('auto_abbrev'); + + +# whois programm for RIPE database queries +my $whois = '/usr/bin/whois'; +my $status; +my $TIMEOUT = 30; + +# critical bgp sessions +my %uplinks = ( 1273, 'Uplink ECRC', + 1755, 'Uplink EBONE', + 3300, 'Uplink AUCS' + ); + +my %ERRORS = ('UNKNOWN' , '-1', + 'OK' , '0', + 'WARNING', '1', + 'CRITICAL', '2'); + + +my %bgpPeerState = ( + '1',"idle", + '2',"connect", + '3',"active", + '4',"opensent", + '5',"openconfirm", + '6',"established" + ); +my $state = "UNKNOWN"; +my $answer = ""; +my $snmpkey; +my $snmpoid; +my $key; +my $community = "public"; +my $port = 161; +my @snmpoids; +my $snmpbgpPeerState = '1.3.6.1.2.1.15.3.1.2'; +my $snmpbgpPeerLocalAddr = '1.3.6.1.2.1.15.3.1.5'; +my $snmpbgpPeerRemoteAddr = '1.3.6.1.2.1.15.3.1.7'; +my $snmpbgpPeerRemoteAs = '1.3.6.1.2.1.15.3.1.9'; +my $hostname; +my $session; +my $error; +my $response; +my %bgpStatus; +my $bgpestablished =0 ; +my $bgpcritical =0; +my $bgpdown =0; +my $bgpidle =0; +my $bgpmessage; +my $asname; +my $remoteas; +my @output; + +sub usage { + printf "\nMissing arguments!\n"; + printf "\n"; + printf "Perl bgpstate plugin for Nagios\n"; + printf "monitors all BGP sessions\n"; + printf "usage: \n"; + printf "check_bgpstate.pl -c -p \n"; + printf "Copyright (C) 2000 Christoph Kron\n"; + printf "check_bgpstate.pl comes with ABSOLUTELY NO WARRANTY\n"; + printf "This programm is licensed under the terms of the "; + printf "GNU General Public License\n(check source code for details)\n"; + printf "\n\n"; + exit $ERRORS{"UNKNOWN"}; +} + +# Just in case of problems, let's not hang Nagios +$SIG{'ALRM'} = sub { + print ("ERROR: No snmp response from $hostname (alarm)\n"); + exit $ERRORS{"UNKNOWN"}; +}; +alarm($TIMEOUT); + + +$status = GetOptions("community=s",\$community, + "port=i",\$port); +if ($status == 0) +{ + &usage; +} + + #shift; + $hostname = shift || &usage; + + +push(@snmpoids, $snmpbgpPeerState); +push(@snmpoids, $snmpbgpPeerLocalAddr); +push(@snmpoids, $snmpbgpPeerRemoteAddr); +push(@snmpoids, $snmpbgpPeerRemoteAs); + +foreach $snmpoid (@snmpoids) { + + ($session, $error) = Net::SNMP->session( + -hostname => $hostname, + -community => $community, + -port => $port + ); + + if (!defined($session)) { + $state='UNKNOWN'; + $answer=$error; + print ("$state: $answer"); + exit $ERRORS{$state}; + } + + if (!defined($response = $session->get_table($snmpoid))) { + $answer=$session->error; + $session->close; + $state = 'CRITICAL'; + print ("$state: $answer,$community,$snmpkey"); + exit $ERRORS{$state}; + } + + foreach $snmpkey (keys %{$response}) { + $snmpkey =~ m/.*\.(\d+\.\d+\.\d+\.\d+$)/; + $key = $1; +# printf "debug: $snmpkey: $key -> $response->{$snmpkey}\n"; + $bgpStatus{$key}{$snmpoid} = $response->{$snmpkey}; + } + $session->close; +} + +foreach $key (keys %bgpStatus) { + if ($bgpStatus{$key}{$snmpbgpPeerState} == 6 ) { + $bgpestablished++; + } + elsif ($bgpStatus{$key}{$snmpbgpPeerState} == 1 ) { + $bgpidle++; + } + else { + $bgpdown++ ; + if (exists($uplinks{$bgpStatus{$key}{$snmpbgpPeerRemoteAs}}) ) { + $bgpcritical++; + } + @output = `$whois -T aut-num AS$bgpStatus{$key}{$snmpbgpPeerRemoteAs}`; + + $asname = ""; + foreach (@output) { + if (m/as-name/) { + $asname = $_; + $asname =~ s/as-name://; + last; + } + if ( $asname =~ "" && m/descr/ ) { + $asname = $_; + $asname =~ s/descr://; + } + } + $asname =~ s/^\s*//; + $asname =~ s/\s*$//; + $bgpmessage .= sprintf("Peering with AS%s not established -> %s
", + $bgpStatus{$key}{$snmpbgpPeerRemoteAs}, + $asname); + } +} + + + if ($bgpdown > 0) { + if ($bgpcritical > 0) { + $state = 'CRITICAL'; + } + else { + $state = 'WARNING'; + } + $answer = sprintf("host '%s', sessions up: %d, down: %d, shutdown: %d
", + $hostname, + $bgpestablished, + $bgpdown, $bgpidle); + $answer = $answer . $bgpmessage . "\n"; + } + else { + $state = 'OK'; + $answer = sprintf("host '%s', sessions up: %d, down: %d, shutdown: %d\n", + $hostname, + $bgpestablished, + $bgpdown,$bgpidle); + } + +print ("$state: $answer"); +exit $ERRORS{$state}; + diff --git a/contrib/check_dhcp.c b/contrib/check_dhcp.c new file mode 100644 index 0000000..8168b94 --- /dev/null +++ b/contrib/check_dhcp.c @@ -0,0 +1,992 @@ +/****************************************************************************** +* +* CHECK_DHCP.C +* +* Program: DHCP plugin for Nagios +* License: GPL +* Copyright (c) 2001 Ethan Galstad (nagios@nagios.org) +* +* License Information: +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation; either version 2 of the License, or +* (at your option) any later version. +* +* 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., 675 Mass Ave, Cambridge, MA 02139, USA. +* +*****************************************************************************/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define PROGNAME "check_dhcp" + +/*#define DEBUG*/ +#define HAVE_GETOPT_H + + +/**** Common definitions ****/ + +#define STATE_OK 0 +#define STATE_WARNING 1 +#define STATE_CRITICAL 2 +#define STATE_UNKNOWN -1 + +#define OK 0 +#define ERROR -1 + +#define FALSE 0 +#define TRUE 1 + + +/**** DHCP definitions ****/ + +#define MAX_DHCP_CHADDR_LENGTH 16 +#define MAX_DHCP_SNAME_LENGTH 64 +#define MAX_DHCP_FILE_LENGTH 128 +#define MAX_DHCP_OPTIONS_LENGTH 312 + + +typedef struct dhcp_packet_struct{ + u_int8_t op; /* packet type */ + u_int8_t htype; /* type of hardware address for this machine (Ethernet, etc) */ + u_int8_t hlen; /* length of hardware address (of this machine) */ + u_int8_t hops; /* hops */ + u_int32_t xid; /* random transaction id number - chosen by this machine */ + u_int16_t secs; /* seconds used in timing */ + u_int16_t flags; /* flags */ + struct in_addr ciaddr; /* IP address of this machine (if we already have one) */ + struct in_addr yiaddr; /* IP address of this machine (offered by the DHCP server) */ + struct in_addr siaddr; /* IP address of DHCP server */ + struct in_addr giaddr; /* IP address of DHCP relay */ + unsigned char chaddr [MAX_DHCP_CHADDR_LENGTH]; /* hardware address of this machine */ + char sname [MAX_DHCP_SNAME_LENGTH]; /* name of DHCP server */ + char file [MAX_DHCP_FILE_LENGTH]; /* boot file name (used for diskless booting?) */ + char options[MAX_DHCP_OPTIONS_LENGTH]; /* options */ + }dhcp_packet; + + +typedef struct dhcp_offer_struct{ + struct in_addr server_address; /* address of DHCP server that sent this offer */ + struct in_addr offered_address; /* the IP address that was offered to us */ + u_int32_t lease_time; /* lease time in seconds */ + u_int32_t renewal_time; /* renewal time in seconds */ + u_int32_t rebinding_time; /* rebinding time in seconds */ + struct dhcp_offer_struct *next; + }dhcp_offer; + + +typedef struct requested_server_struct{ + struct in_addr server_address; + struct requested_server_struct *next; + }requested_server; + + +#define BOOTREQUEST 1 +#define BOOTREPLY 2 + +#define DHCPDISCOVER 1 +#define DHCPOFFER 2 +#define DHCPREQUEST 3 +#define DHCPDECLINE 4 +#define DHCPACK 5 +#define DHCPNACK 6 +#define DHCPRELEASE 7 + +#define DHCP_OPTION_MESSAGE_TYPE 53 +#define DHCP_OPTION_HOST_NAME 12 +#define DHCP_OPTION_BROADCAST_ADDRESS 28 +#define DHCP_OPTION_REQUESTED_ADDRESS 50 +#define DHCP_OPTION_LEASE_TIME 51 +#define DHCP_OPTION_RENEWAL_TIME 58 +#define DHCP_OPTION_REBINDING_TIME 59 + +#define DHCP_INFINITE_TIME 0xFFFFFFFF + +#define DHCP_BROADCAST_FLAG 32768 + +#define DHCP_SERVER_PORT 67 +#define DHCP_CLIENT_PORT 68 + +#define ETHERNET_HARDWARE_ADDRESS 1 /* used in htype field of dhcp packet */ +#define ETHERNET_HARDWARE_ADDRESS_LENGTH 6 /* length of Ethernet hardware addresses */ + +unsigned char client_hardware_address[MAX_DHCP_CHADDR_LENGTH]=""; + +char network_interface_name[8]="eth0"; + +u_int32_t packet_xid=0; + +u_int32_t dhcp_lease_time=0; +u_int32_t dhcp_renewal_time=0; +u_int32_t dhcp_rebinding_time=0; + +int dhcpoffer_timeout=2; + +dhcp_offer *dhcp_offer_list=NULL; +requested_server *requested_server_list=NULL; + +int valid_responses=0; /* number of valid DHCPOFFERs we received */ +int requested_servers=0; +int requested_responses=0; + +int request_specific_address=FALSE; +int received_requested_address=FALSE; +struct in_addr requested_address; + + +int process_arguments(int, char **); +int call_getopt(int, char **); +int validate_arguments(void); +void print_usage(void); +void print_help(void); + +int get_hardware_address(int,char *); + +int send_dhcp_discover(int); +int get_dhcp_offer(int); + +int get_results(void); + +int add_dhcp_offer(struct in_addr,dhcp_packet *); +int free_dhcp_offer_list(void); +int free_requested_server_list(void); + +int create_dhcp_socket(void); +int close_dhcp_socket(int); +int send_dhcp_packet(void *,int,int,struct sockaddr_in *); +int receive_dhcp_packet(void *,int,int,int,struct sockaddr_in *); + + + +int main(int argc, char **argv){ + int dhcp_socket; + int result; + + if(process_arguments(argc,argv)!=OK){ + /*usage("Invalid command arguments supplied\n");*/ + printf("Invalid command arguments supplied\n"); + exit(STATE_UNKNOWN); + } + + + /* create socket for DHCP communications */ + dhcp_socket=create_dhcp_socket(); + + /* get hardware address of client machine */ + get_hardware_address(dhcp_socket,network_interface_name); + + /* send DHCPDISCOVER packet */ + send_dhcp_discover(dhcp_socket); + + /* wait for a DHCPOFFER packet */ + get_dhcp_offer(dhcp_socket); + + /* close socket we created */ + close_dhcp_socket(dhcp_socket); + + /* determine state/plugin output to return */ + result=get_results(); + + /* free allocated memory */ + free_dhcp_offer_list(); + free_requested_server_list(); + + return result; + } + + + +/* determines hardware address on client machine */ +int get_hardware_address(int sock,char *interface_name){ + struct ifreq ifr; + + strncpy((char *)&ifr.ifr_name,interface_name,sizeof(ifr.ifr_name)); + + /* try and grab hardware address of requested interface */ + if(ioctl(sock,SIOCGIFHWADDR,&ifr)<0){ + printf("Error: Could not get hardware address of interface '%s'\n",interface_name); + exit(STATE_UNKNOWN); + } + + memcpy(&client_hardware_address[0],&ifr.ifr_hwaddr.sa_data,6); + +#ifdef DEBUG + printf("Hardware address: %02x:%02x:%02x:",client_hardware_address[0],client_hardware_address[1],client_hardware_address[2]); + printf("%02x:",client_hardware_address[3]); + printf("%02x:%02x\n",client_hardware_address[4],client_hardware_address[5]); + printf("\n"); +#endif + + return OK; + } + + +/* sends a DHCPDISCOVER broadcast message in an attempt to find DHCP servers */ +int send_dhcp_discover(int sock){ + dhcp_packet discover_packet; + struct sockaddr_in sockaddr_broadcast; + + + /* clear the packet data structure */ + bzero(&discover_packet,sizeof(discover_packet)); + + + /* boot request flag (backward compatible with BOOTP servers) */ + discover_packet.op=BOOTREQUEST; + + /* hardware address type */ + discover_packet.htype=ETHERNET_HARDWARE_ADDRESS; + + /* length of our hardware address */ + discover_packet.hlen=ETHERNET_HARDWARE_ADDRESS_LENGTH; + + discover_packet.hops=0; + + /* transaction id is supposed to be random */ + srand(time(NULL)); + packet_xid=random(); + discover_packet.xid=htonl(packet_xid); + + /**** WHAT THE HECK IS UP WITH THIS?!? IF I DON'T MAKE THIS CALL, ONLY ONE SERVER RESPONSE IS PROCESSED!!!! ****/ + /* downright bizzarre... */ + ntohl(discover_packet.xid); + + /*discover_packet.secs=htons(65535);*/ + discover_packet.secs=0xFF; + + /* tell server it should broadcast its response */ + discover_packet.flags=htons(DHCP_BROADCAST_FLAG); + + /* our hardware address */ + memcpy(discover_packet.chaddr,client_hardware_address,ETHERNET_HARDWARE_ADDRESS_LENGTH); + + /* first four bytes of options field is magic cookie (as per RFC 2132) */ + discover_packet.options[0]='\x63'; + discover_packet.options[1]='\x82'; + discover_packet.options[2]='\x53'; + discover_packet.options[3]='\x63'; + + /* DHCP message type is embedded in options field */ + discover_packet.options[4]=DHCP_OPTION_MESSAGE_TYPE; /* DHCP message type option identifier */ + discover_packet.options[5]='\x01'; /* DHCP message option length in bytes */ + discover_packet.options[6]=DHCPDISCOVER; + + /* the IP address we're requesting */ + if(request_specific_address==TRUE){ + discover_packet.options[7]=DHCP_OPTION_REQUESTED_ADDRESS; + discover_packet.options[8]='\x04'; + memcpy(&discover_packet.options[9],&requested_address,sizeof(requested_address)); + } + + /* send the DHCPDISCOVER packet to broadcast address */ + sockaddr_broadcast.sin_family=AF_INET; + sockaddr_broadcast.sin_port=htons(DHCP_SERVER_PORT); + sockaddr_broadcast.sin_addr.s_addr=INADDR_BROADCAST; + bzero(&sockaddr_broadcast.sin_zero,sizeof(sockaddr_broadcast.sin_zero)); + + +#ifdef DEBUG + printf("DHCPDISCOVER to %s port %d\n",inet_ntoa(sockaddr_broadcast.sin_addr),ntohs(sockaddr_broadcast.sin_port)); + printf("DHCPDISCOVER XID: %lu (0x%X)\n",ntohl(discover_packet.xid),ntohl(discover_packet.xid)); + printf("DHCDISCOVER ciaddr: %s\n",inet_ntoa(discover_packet.ciaddr)); + printf("DHCDISCOVER yiaddr: %s\n",inet_ntoa(discover_packet.yiaddr)); + printf("DHCDISCOVER siaddr: %s\n",inet_ntoa(discover_packet.siaddr)); + printf("DHCDISCOVER giaddr: %s\n",inet_ntoa(discover_packet.giaddr)); +#endif + + /* send the DHCPDISCOVER packet out */ + send_dhcp_packet(&discover_packet,sizeof(discover_packet),sock,&sockaddr_broadcast); + +#ifdef DEBUG + printf("\n\n"); +#endif + + return OK; + } + + + + +/* waits for a DHCPOFFER message from one or more DHCP servers */ +int get_dhcp_offer(int sock){ + dhcp_packet offer_packet; + struct sockaddr_in source; + int result=OK; + int timeout=1; + int responses=0; + int x; + time_t start_time; + time_t current_time; + + time(&start_time); + + /* receive as many responses as we can */ + for(responses=0,valid_responses=0;;){ + + time(¤t_time); + if((current_time-start_time)>=dhcpoffer_timeout) + break; + +#ifdef DEBUG + printf("\n\n"); +#endif + + bzero(&source,sizeof(source)); + bzero(&offer_packet,sizeof(offer_packet)); + + result=OK; + result=receive_dhcp_packet(&offer_packet,sizeof(offer_packet),sock,dhcpoffer_timeout,&source); + + if(result!=OK){ +#ifdef DEBUG + printf("Result=ERROR\n"); +#endif + continue; + } + else{ +#ifdef DEBUG + printf("Result=OK\n"); +#endif + responses++; + } + +#ifdef DEBUG + printf("DHCPOFFER from IP address %s\n",inet_ntoa(source.sin_addr)); + printf("DHCPOFFER XID: %lu (0x%X)\n",ntohl(offer_packet.xid),ntohl(offer_packet.xid)); +#endif + + /* check packet xid to see if its the same as the one we used in the discover packet */ + if(ntohl(offer_packet.xid)!=packet_xid){ +#ifdef DEBUG + printf("DHCPOFFER XID (%lu) did not match DHCPDISCOVER XID (%lu) - ignoring packet\n",ntohl(offer_packet.xid),packet_xid); +#endif + continue; + } + + /* check hardware address */ + result=OK; +#ifdef DEBUG + printf("DHCPOFFER chaddr: "); +#endif + for(x=0;x %s\n",errno,strerror(errno)); +#endif + return ERROR; + } + else{ +#ifdef DEBUG + printf("receive_dhcp_packet() result: %d\n",recv_result); + printf("receive_dhcp_packet() source: %s\n",inet_ntoa(source_address.sin_addr)); +#endif + + memcpy(address,&source_address,sizeof(source_address)); + return OK; + } + } + + return OK; + } + + + +/* creates a socket for DHCP communication */ +int create_dhcp_socket(void){ + struct sockaddr_in myname; + int sock; + int flag=1; + + /* Set up the address we're going to bind to. */ + bzero(&myname,sizeof(myname)); + myname.sin_family=AF_INET; + myname.sin_port=htons(DHCP_CLIENT_PORT); + myname.sin_addr.s_addr=INADDR_ANY; /* listen on any address */ + bzero(&myname.sin_zero,sizeof(myname.sin_zero)); + + /* create a socket for DHCP communications */ + sock=socket(AF_INET,SOCK_DGRAM,IPPROTO_UDP); + if(sock<0){ + printf("Error: Could not create socket!\n"); + exit(STATE_UNKNOWN); + } + +#ifdef DEBUG + printf("DHCP socket: %d\n",sock); +#endif + + /* set the reuse address flag so we don't get errors when restarting */ + flag=1; + if(setsockopt(sock,SOL_SOCKET,SO_REUSEADDR,(char *)&flag,sizeof(flag))<0){ + printf("Error: Could not set reuse address option on DHCP socket!\n"); + exit(STATE_UNKNOWN); + } + + /* set the broadcast option - we need this to listen to DHCP broadcast messages */ + if(setsockopt(sock,SOL_SOCKET,SO_BROADCAST,(char *)&flag,sizeof flag)<0){ + printf("Error: Could not set broadcast option on DHCP socket!\n"); + exit(STATE_UNKNOWN); + } + + /* bind the socket */ + if(bind(sock,(struct sockaddr *)&myname,sizeof(myname))<0){ + printf("Error: Could not bind to DHCP socket (port %d)! Check your privileges...\n",DHCP_CLIENT_PORT); + exit(STATE_UNKNOWN); + } + + return sock; + } + + + + + +/* closes DHCP socket */ +int close_dhcp_socket(int sock){ + + close(sock); + + return OK; + } + + + + +/* adds a requested server address to list in memory */ +int add_requested_server(struct in_addr server_address){ + requested_server *new_server; + + new_server=(requested_server *)malloc(sizeof(requested_server)); + if(new_server==NULL) + return ERROR; + + new_server->server_address=server_address; + + new_server->next=requested_server_list; + requested_server_list=new_server; + + requested_servers++; + +#ifdef DEBUG + printf("Requested server address: %s\n",inet_ntoa(new_server->server_address)); +#endif + + return OK; + } + + + + +/* adds a DHCP OFFER to list in memory */ +int add_dhcp_offer(struct in_addr source,dhcp_packet *offer_packet){ + dhcp_offer *new_offer; + int x; + int y; + unsigned option_type; + unsigned option_length; + + if(offer_packet==NULL) + return ERROR; + + /* process all DHCP options present in the packet */ + for(x=4;xoptions[x]==-1 || (int)offer_packet->options[x]==0) + break; + + /* get option type */ + option_type=offer_packet->options[x++]; + + /* get option length */ + option_length=offer_packet->options[x++]; + +#ifdef DEBUG + printf("Option: %d (0x%02X)\n",option_type,option_length); +#endif + + /* get option data */ + if(option_type==DHCP_OPTION_LEASE_TIME) + dhcp_lease_time=ntohl(*((u_int32_t *)&offer_packet->options[x])); + if(option_type==DHCP_OPTION_RENEWAL_TIME) + dhcp_renewal_time=ntohl(*((u_int32_t *)&offer_packet->options[x])); + if(option_type==DHCP_OPTION_REBINDING_TIME) + dhcp_rebinding_time=ntohl(*((u_int32_t *)&offer_packet->options[x])); + + /* skip option data we're ignoring */ + else + for(y=0;yserver_address=source; + new_offer->offered_address=offer_packet->yiaddr; + new_offer->lease_time=dhcp_lease_time; + new_offer->renewal_time=dhcp_renewal_time; + new_offer->rebinding_time=dhcp_rebinding_time; + + +#ifdef DEBUG + printf("Added offer from server @ %s",inet_ntoa(new_offer->server_address)); + printf(" of IP address %s\n",inet_ntoa(new_offer->offered_address)); +#endif + + /* add new offer to head of list */ + new_offer->next=dhcp_offer_list; + dhcp_offer_list=new_offer; + + return OK; + } + + + + +/* frees memory allocated to DHCP OFFER list */ +int free_dhcp_offer_list(void){ + dhcp_offer *this_offer; + dhcp_offer *next_offer; + + for(this_offer=dhcp_offer_list;this_offer!=NULL;this_offer=next_offer){ + next_offer=this_offer->next; + free(this_offer); + } + + return OK; + } + + + + +/* frees memory allocated to requested server list */ +int free_requested_server_list(void){ + requested_server *this_server; + requested_server *next_server; + + for(this_server=requested_server_list;this_server!=NULL;this_server=next_server){ + next_server=this_server->next; + free(this_server); + } + + return OK; + } + + +/* gets state and plugin output to return */ +int get_results(void){ + dhcp_offer *temp_offer; + requested_server *temp_server; + int result; + u_int32_t max_lease_time=0; + + received_requested_address=FALSE; + + /* checks responses from requested servers */ + requested_responses=0; + if(requested_servers>0){ + + for(temp_server=requested_server_list;temp_server!=NULL;temp_server=temp_server->next){ + + for(temp_offer=dhcp_offer_list;temp_offer!=NULL;temp_offer=temp_offer->next){ + + /* get max lease time we were offered */ + if(temp_offer->lease_time>max_lease_time || temp_offer->lease_time==DHCP_INFINITE_TIME) + max_lease_time=temp_offer->lease_time; + + /* see if we got the address we requested */ + if(!memcmp(&requested_address,&temp_offer->offered_address,sizeof(requested_address))) + received_requested_address=TRUE; + + /* see if the servers we wanted a response from talked to us or not */ + if(!memcmp(&temp_offer->server_address,&temp_server->server_address,sizeof(temp_server->server_address))){ +#ifdef DEBUG + printf("DHCP Server Match: Offerer=%s",inet_ntoa(temp_offer->server_address)); + printf(" Requested=%s\n",inet_ntoa(temp_server->server_address)); +#endif + requested_responses++; + } + } + } + + } + + /* else check and see if we got our requested address from any server */ + else{ + + for(temp_offer=dhcp_offer_list;temp_offer!=NULL;temp_offer=temp_offer->next){ + + /* get max lease time we were offered */ + if(temp_offer->lease_time>max_lease_time || temp_offer->lease_time==DHCP_INFINITE_TIME) + max_lease_time=temp_offer->lease_time; + + /* see if we got the address we requested */ + if(!memcmp(&requested_address,&temp_offer->offered_address,sizeof(requested_address))) + received_requested_address=TRUE; + } + } + + result=STATE_OK; + if(valid_responses==0) + result=STATE_CRITICAL; + else if(requested_servers>0 && requested_responses==0) + result=STATE_CRITICAL; + else if(requested_responses0) + printf(", %s%d of %d requested servers responded",((requested_responses0)?"only ":"",requested_responses,requested_servers); + + if(request_specific_address==TRUE) + printf(", requested address (%s) was %soffered",inet_ntoa(requested_address),(received_requested_address==TRUE)?"":"not "); + + printf(", max lease time = "); + if(max_lease_time==DHCP_INFINITE_TIME) + printf("Infinity"); + else + printf("%lu sec",(unsigned long)max_lease_time); + + printf(".\n"); + + return result; + } + + + + + + +/* print usage help */ +void print_help(void){ + + /*print_revision(PROGNAME,"$Revision$");*/ + + printf("Copyright (c) 2001 Ethan Galstad (nagios@nagios.org)\n\n"); + printf("This plugin tests the availability of DHCP servers on a network.\n\n"); + + print_usage(); + + printf + ("\nOptions:\n" + " -s, --serverip=IPADDRESS\n" + " IP address of DHCP server that we must hear from\n" + " -r, --requestedip=IPADDRESS\n" + " IP address that should be offered by at least one DHCP server\n" + " -t, --timeout=INTEGER\n" + " Seconds to wait for DHCPOFFER before timeout occurs\n" + " -i, --interface=STRING\n" + " Interface to to use for listening (i.e. eth0)\n" + " -v, --verbose\n" + " Print extra information (command-line use only)\n" + " -h, --help\n" + " Print detailed help screen\n" + " -V, --version\n" + " Print version information\n\n" + ); + + /*support();*/ + + return; + } + + +/* prints usage information */ +void print_usage(void){ + + printf("Usage: %s [-s serverip] [-r requestedip] [-t timeout] [-i interface]\n",PROGNAME); + printf(" %s --help\n",PROGNAME); + printf(" %s --version\n",PROGNAME); + + return; + } + + + + +/* process command-line arguments */ +int process_arguments(int argc, char **argv){ + int c; + + if(argc<1) + return ERROR; + + c=0; + while((c+=(call_getopt(argc-c,&argv[c])))0) + dhcpoffer_timeout=atoi(optarg); + /* + else + usage("Time interval must be a nonnegative integer\n"); + */ + break; + + case 'i': /* interface name */ + + strncpy(network_interface_name,optarg,sizeof(network_interface_name)-1); + network_interface_name[sizeof(network_interface_name)-1]='\x0'; + + break; + + case 'V': /* version */ + + /*print_revision(PROGNAME,"$Revision$");*/ + exit(STATE_OK); + + case 'h': /* help */ + + print_help(); + exit(STATE_OK); + + case '?': /* help */ + + /*usage("Invalid argument\n");*/ + break; + + default: + break; + } + } + + return i; + } + + + +int validate_arguments(void){ + + return OK; + } + diff --git a/contrib/check_dlswcircuit.pl b/contrib/check_dlswcircuit.pl new file mode 100755 index 0000000..f6ef931 --- /dev/null +++ b/contrib/check_dlswcircuit.pl @@ -0,0 +1,221 @@ +#!/usr/bin/perl -w +# +# check_dlswcircuit.pl - nagios plugin +# +# Checks if a Cisco Dlsw circuit is connected. +# +# +# Copyright (C) 2000 Carsten Foss & Christoph Kron +# +# Basically this is an adapted version of Christoph Kron's (ck@zet.net) check_ifoperstatus.pl plugin. +# most of the thanks should go to him. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +# Arguments : -s -d -c -p +# - +# Source & Dest Mac/Sap arguments must be given in Hex as this example : 40.00.01.37.45.01.ss (Where ss is the sap) +# +# Sample command line : check_dlswcircuit.pl -s 40.00.01.37.45.01.04 -d 40.00.02.37.45.02.04 -c secret 1.2.3.4 +# +# Sample host.cfg entry : +#service[Dlsw-xx]=NCP1-NCP2;0;24x7;3;5;1;router-admins;240;24x7;1;1;0;;check_dlswcircuit!-s 40.00.01.37.45.01.04!-d 40.00..01.37.45.02.04!-c secret!1.2.3.4 +# remember to add the service to commands.cfg , something like this: +# command[check_dlswcircuit]=$USER1$/check_dlswcircuit.pl $ARG1$ $ARG2$ $ARG3$ $ARG4$ $ARG5$ +# +# Report bugs to: cfo@dmdata.dk +# +# 11.03.2000 Version 1.0 + +use strict; + +use Net::SNMP; +use Getopt::Long; +&Getopt::Long::config('auto_abbrev'); + + +my $status; +my $TIMEOUT = 15; + +my %ERRORS = ('UNKNOWN' , '-1', + 'OK' , '0', + 'WARNING', '1', + 'CRITICAL', '2'); + +my %dlswCircuitStatus = ( + '1','disconnected', + '2','circuitStart', + '3','resolvePending', + '4','circuitPending', + '5','circuitEstablished', + '6','connectPending', + '7','contactPending', + '8','connected', + '9','disconnectPending', + '10','haltPending', + '11','haltPendingNoack', + '13','circuitRestart', + '14','restartPending'); + +my $state = "UNKNOWN"; +my $answer = ""; +my $smac = ""; +my $dmac = ""; +my $community = "public"; +my $port = 161; +#Dlsw Circuit Oid enterprises.9.10.9.1.5.2.1.17.6.0.96.148.47.230.166.4.6.64.0.1.55.69.2.4 = 8 +my $enterpriseOid = "1.3.6.1.4.1"; +my $ciscoDlswCircuitOid = ".9.10.9.1.5.2.1.17."; +my $unknownOid = "6."; +my $smacOid = ""; +my $dmacOid = ""; +my $tmpOid = ""; +my @tmparg; +my $snmpoid; +my @snmpoids; +my $hostname; +my $session; +my $error; +my $response; +my $p = ""; +my $q = ""; + +sub usage { + printf "\nMissing arguments!\n"; + printf "\n"; + printf "Perl Check Cisco Dlsw Circuit State plugin for Nagios\n"; + printf "checks operational status of specified DLSW Circuit\n"; + printf "usage: \n"; + printf "check_dlswcircuit.pl -s -d -c -p "; + printf "\nCopyright (C) 2000 Carsten Foss\n"; + printf "check_dlswcircuit.pl comes with ABSOLUTELY NO WARRANTY\n"; + printf "This programm is licensed under the terms of the "; + printf "GNU General Public License\n(check source code for details)\n"; + printf "\n\n"; + exit $ERRORS{"UNKNOWN"}; +} + +# Just in case of problems, let's not hang Nagios +$SIG{'ALRM'} = sub { + print ("ERROR: No snmp response from $hostname (alarm)\n"); + exit $ERRORS{"UNKNOWN"}; +}; +alarm($TIMEOUT); + + +$status = GetOptions("sourcemac=s",\$smac,"destmac=s",\$dmac, + "community=s",\$community, + "port=i",\$port); +if ($status == 0) +{ + &usage; +} + +# +#Convert Source Mac & Sap +# + @tmparg = split(/\./,$smac); + #print "-$smac-\n"; + #print "@tmparg\n"; + #print "$#tmparg\n"; + if($#tmparg != 6) + { + print "SourceMac/Sap format $smac not valid\n"; + &usage; + } + while($p = shift @tmparg) + { + $q = hex($p); + $smacOid = $smacOid.$q; + $smacOid = $smacOid.'.'; + } + + #print "@tmparg1\n"; + #print "$smacOid\n"; + +# +#Convert Dest Mac & Sap +# + @tmparg = split(/\./,$dmac); + #print "-$dmac-\n"; + #print "@tmparg\n"; + #print "$#tmparg\n"; + if($#tmparg != 6) + { + print "DestMac/Sap format $dmac not valid\n"; + &usage; + } + + while($p = shift @tmparg) + { + $q = hex($p); + $dmacOid = $dmacOid.$q; + $dmacOid = $dmacOid.'.'; + } +# Remove Trailing Dot + $dmacOid = substr($dmacOid,0,length($dmacOid)-1); + + + #print "@tmparg1\n"; + #print "$dmacOid\n"; +#Build the Dlsw Oic to use + $snmpoid = $enterpriseOid.$ciscoDlswCircuitOid.$unknownOid.$smacOid.$unknownOid.$dmacOid ; + #print "$snmpoid\n"; + + #shift; + $hostname = shift || &usage; + + ($session, $error) = Net::SNMP->session( + -hostname => $hostname, + -community => $community, + -port => $port + ); + + if (!defined($session)) { + $state='UNKNOWN'; + $answer=$error; + print ("$state: $answer"); + exit $ERRORS{$state}; + } + + push(@snmpoids,$snmpoid); + #push(@snmpoids,$snmpLocIfDescr); + + if (!defined($response = $session->get_request(@snmpoids))) { + $answer=$session->error; + $session->close; + $state = 'CRITICAL'; + print ("$state: $answer,$community,$smac - $dmac"); + exit $ERRORS{$state}; + } + + $answer = sprintf("dlsw circuit %s - %s at host '%s',is %s\n", + $smac, + $dmac, + $hostname, + $dlswCircuitStatus{$response->{$snmpoid}} + ); + + $session->close; + + if ( $response->{$snmpoid} == 8 ) { + $state = 'OK'; + } + else { + $state = 'CRITICAL'; + } + +print ("$state: $answer"); +exit $ERRORS{$state}; diff --git a/contrib/check_dns_random.pl b/contrib/check_dns_random.pl new file mode 100644 index 0000000..787d464 --- /dev/null +++ b/contrib/check_dns_random.pl @@ -0,0 +1,75 @@ +#!/usr/bin/perl +# ------------------------------------------------------------------------------ +# File Name: check_dns_random.pl +# Author: Richard Mayhew - South Africa +# Date: 2000/01/26 +# Version: 1.0 +# Description: This script will check to see if dns resolves hosts +# randomly from a list using the check_dns plugin. +# Email: netsaint@splash.co.za +# ------------------------------------------------------------------------------ +# Copyright 1999 (c) Richard Mayhew +# Credits go to Ethan Galstad for coding Nagios +# If any changes are made to this script, please mail me a copy of the +# changes :) +# License GPL +# ------------------------------------------------------------------------------ +# Date Author Reason +# ---- ------ ------ +# 1999/09/26 RM Creation +# ------------------------------------------------------------------------------ + +# -----------------------------------------------------------------[ Require ]-- +require 5.004; + +# --------------------------------------------------------------------[ Uses ]-- +use Socket; +use strict; + +# --------------------------------------------------------------[ Enviroment ]-- +$ENV{PATH} = "/bin"; +$ENV{BASH_ENV} = ""; +$|=1; + +my $host = shift || &usage; + +my $domainfile = "/usr/local/nagios/etc/domains.list"; +my $wc = `/usr/bin/wc -l $domainfile`; +my $check = "/usr/local/nagios/libexec/check_dns"; +my $x = 0; +my $srv_file = ""; +my $z = ""; +my $y = ""; + +open(DOMAIN,"<$domainfile") or die "Error Opening $domainfile File!\n"; + while () { + $srv_file .= $_; +} + close(DOMAIN); + my @data = split(/\n/,$srv_file); + +chomp $wc; +$wc =~ s/ //g; +$wc =~ s/domains//g; + +$x = rand $wc; +($z,$y) = split(/\./,$x); + +print `$check $data[$z] $host`; + + + +sub usage +{ + print "Minimum arguments not supplied!\n"; + print "\n"; + print "Perl Check Random DNS plugin for Nagios\n"; + print "Copyright (c) 2000 Richard Mayhew\n"; + print "\n"; + print "Usage: check_dns_random.pl \n"; + print "\n"; + print " = DNS server you would like to query.\n"; + exit -1; + +} + diff --git a/contrib/check_email_loop.pl b/contrib/check_email_loop.pl new file mode 100644 index 0000000..733406d --- /dev/null +++ b/contrib/check_email_loop.pl @@ -0,0 +1,268 @@ +#!/usr/bin/perl +# +# (c)2000 Benjamin Schmid, blueshift@gmx.net (emergency use only ;-) +# Copyleft by GNU GPL +# +# +# check_email_loop Nagios Plugin +# +# This script sends a mail with a specific id in the subject via +# an given smtp-server to a given email-adress. When the script +# is run again, it checks for this Email (with its unique id) on +# a given pop3 account and send another mail. +# +# +# Example: check_email_loop.pl -poph=mypop -popu=user -pa=password +# -smtph=mailer -from=returnadress@yoursite.com +# -to=remaileradress@friend.com -pendc=2 -lostc=0 +# +# This example will send eacht time this check is executed a new +# mail to remaileradress@friend.com using the SMTP-Host mailer. +# Then it looks for any back-forwarded mails in the POP3 host +# mypop. In this Configuration CRITICAL state will be reached if +# more than 2 Mails are pending (meaning that they did not came +# back till now) or if a mails got lost (meaning a mail, that was +# send later came back prior to another mail). +# + +use Net::POP3; +use Net::SMTP; +use strict; +use Getopt::Long; +&Getopt::Long::config('auto_abbrev'); + +# ---------------------------------------- + +my $TIMEOUT = 120; +my %ERRORS = ('UNKNOWN' , '-1', + 'OK' , '0', + 'WARNING', '1', + 'CRITICAL', '2'); + +my $state = "UNKNOWN"; +my ($sender,$receiver, $pophost, $popuser, $poppasswd, $smtphost); +my ($poptimeout,$smtptimeout,$pinginterval)=(60,60,5); +my ($lostwarn, $lostcrit,$pendwarn, $pendcrit); + +# Internal Vars +my ($pop,$msgcount,@msglines,$statinfo,@messageids,$newestid); +my ($matchcount,$statfile) = (0,"check_email_loop.stat"); + +# Subs declaration +sub usage; +sub messagematchs; +sub nsexit; + +# Just in case of problems, let's not hang Nagios +$SIG{'ALRM'} = sub { + print ("ERROR: $0 Time-Out $TIMEOUT s \n"); + exit $ERRORS{"UNKNOWN"}; +}; +alarm($TIMEOUT); + + +# Evaluate Command Line Parameters +my $status = GetOptions( + "from=s",\$sender, + "to=s",\$receiver, + "pophost=s",\$pophost, + "popuser=s",\$popuser, + "passwd=s",\$poppasswd, + "poptimeout=i",\$poptimeout, + "smtphost=s",\$smtphost, + "smtptimeout=i",\$smtptimeout, + "statfile=s",\$statfile, + "interval=i",\$pinginterval, + "lostwarr=i",\$lostwarn, + "lostcrit=i",\$lostcrit, + "pendwarn=i",\$pendwarn, + "pendcrit=i",\$pendcrit, + ); +usage() if ($status == 0 || ! ($pophost && $popuser && $poppasswd && + $smtphost && $receiver && $sender )); + +# Try to read the ids of the last send emails out of statfile +if (open STATF, "$statfile") { + @messageids = ; + chomp @messageids; + close STATF; +} + +# Try to open statfile for writing +if (!open STATF, ">$statfile") { + nsexit("Failed to open mail-ID database $statfile for writing",'CRITICAL'); +} + +# Ok - check if it's time to release another mail + +# ... + +# creating new serial id +my $serial = time(); +$serial = "ID#" . $serial . "#$$"; + +# sending new ping email +my $smtp = Net::SMTP->new($smtphost,Timeout=>$smtptimeout) + || nsexit("SMTP connect timeout ($smtptimeout s)",'CRITICAL'); +($smtp->mail($sender) && + $smtp->to($receiver) && + $smtp->data() && + $smtp->datasend("To: $receiver\nSubject: E-Mail Ping [$serial]\n\n". + "This is a automatically sended E-Mail.\n". + "It ist not intended for human reader.\n\n". + "Serial No: $serial\n") && + $smtp->dataend() && + $smtp->quit + ) || nsexit("Error delivering message",'CRITICAL'); + +# no the interessting part: let's if they are receiving ;-) + +$pop = Net::POP3->new( $pophost, + Timeout=>$poptimeout) + || nsexit("POP3 connect timeout (>$poptimeout s, host: $pophost)",'CRITICAL'); + +$msgcount=$pop->login($popuser,$poppasswd); + +$statinfo="$msgcount mails on POP3"; + +nsexit("POP3 login failed (user:$popuser)",'CRITICAL') if (!defined($msgcount)); + +# Count messages, that we are looking 4: +while ($msgcount > 0) { + @msglines = @{$pop->get($msgcount)}; + + for (my $i=0; $i < scalar @messageids; $i++) { + if (messagematchsid(\@msglines,$messageids[$i])) { + $matchcount++; + # newest received mail than the others, ok remeber id. + $newestid = $messageids[$i] if ($messageids[$i] > $newestid || !defined $newestid); + $pop->delete($msgcount); # remove E-Mail from POP3 server + splice @messageids, $i, 1;# remove id from List + last; # stop looking in list + } + } + + $msgcount--; +} + +$pop->quit(); # necessary for pop3 deletion! + +# traverse through the message list and mark the lost mails +# that mean mails that are older than the last received mail. +if (defined $newestid) { + $newestid =~ /\#(\d+)\#/; + $newestid = $1; + for (my $i=0; $i < scalar @messageids; $i++) { + $messageids[$i] =~ /\#(\d+)\#/; + my $akid = $1; + if ($akid < $newestid) { + $messageids[$i] =~ s/^ID/LI/; # mark lost + } + } +} + +# Write list to id-Database +foreach my $id (@messageids) { + print STATF "$id\n"; +} +print STATF "$serial\n"; # remember send mail of this session +close STATF; + +# ok - count lost and pending mails; +my @tmp = grep /^ID/, @messageids; +my $pendingm = scalar @tmp; +@tmp = grep /^LI/, @messageids; +my $lostm = scalar @tmp; + +# Evaluate the Warnin/Crit-Levels +if (defined $pendwarn && $pendingm > $pendwarn) { $state = 'WARNING'; } +if (defined $lostwarn && $lostm > $lostwarn) { $state = 'WARNING'; } +if (defined $pendcrit && $pendingm > $pendcrit) { $state = 'CRITICAL'; } +if (defined $lostcrit && $lostm > $lostcrit) { $state = 'CRITICAL'; } + +if ((defined $pendwarn || defined $pendcrit || defined $lostwarn + || defined $lostcrit) && ($state eq 'UNKNOWN')) {$state='OK';} + + +# Append Status info +$statinfo = $statinfo . ", $matchcount mail(s) came back,". + " $pendingm pending, $lostm lost."; + +# Exit in a Nagios-compliant way +nsexit($statinfo); + +# ---------------------------------------------------------------------- + +sub usage { + print "check_email_loop 1.0 Nagios Plugin - Real check of a E-Mail system\n"; + print "=" x 75,"\nERROR: Missing or wrong arguments!\n","=" x 75,"\n"; + print "This script sends a mail with a specific id in the subject via an given\n"; + print "smtp-server to a given email-adress. When the script is run again, it checks\n"; + print "for this Email (with its unique id) on a given pop3 account and sends \n"; + print "another mail.\n"; + print "\nThe following options are available:\n"; + print " -from=text email adress of send (for mail returnr on errors)\n"; + print " -to=text email adress to which the mails should send to\n"; + print " -pophost=text IP or name of the POP3-host to be checked\n"; + print " -popuser=text Username of the POP3-account\n"; + print " -passwd=text Password for the POP3-user\n"; + print " -poptimeout=num Timeout in seconds for the POP3-server\n"; + print " -smtphost=text IP oder name of the SMTP host\n"; + print " -smtptimeout=num Timeout in seconds for the SMTP-server\n"; + print " -statfile=text File to save ids of messages ($statfile)\n"; +# print " -interval=num Time (in minutes) that must pass by before sending\n" +# print " another Ping-mail (gibe a new try);\n"; + print " -lostwarn=num WARNING-state if more than num lost emails\n"; + print " -lostcrit=num CRITICAL \n"; + print " -pendwarn=num WARNING-state if more than num pending emails\n"; + print " -pendcrit=num CRITICAL \n"; + print " Options may abbreviated!\n"; + print " LOST mails are mails, being sent before the last mail arrived back.\n"; + print " PENDING mails are those, which are not. (supposed to be on the way)\n"; + print "\nExample: \n"; + print " $0 -poph=host -pa=pw -popu=popts -smtph=host -from=root\@me.com\n "; + print " -to=remailer\@testxy.com -lostc=0 -pendc=2\n"; + print "\nCopyleft 19.10.2000, Benjamin Schmid\n"; + print "This script comes with ABSOLUTELY NO WARRANTY\n"; + print "This programm is licensed under the terms of the "; + print "GNU General Public License\n\n"; + exit $ERRORS{"UNKNOWN"}; +} + +# --------------------------------------------------------------------- + +sub nsexit { + my ($msg,$code) = @_; + $code=$state if (!defined $code); + print "$code: $msg\n" if (defined $msg); + exit $ERRORS{$code}; +} + +# --------------------------------------------------------------------- + +sub messagematchsid { + my ($mailref,$id) = (@_); + my (@tmp); + my $match = 0; + + # ID + $id =~ s/^LI/ID/; # evtl. remove lost mail mark + @tmp = grep /Subject: E-Mail Ping \[/, @$mailref; + chomp @tmp; + if (($tmp[0] =~ /$id/)) + { $match = 1; } + + # Sender: +# @tmp = grep /^From:\s+/, @$mailref; +# if (@tmp && $sender ne "") +# { $match = $match && ($tmp[0]=~/$sender/); } + + # Receiver: +# @tmp = grep /^To: /, @$mailref; +# if (@tmp && $receiver ne "") +# { $match = $match && ($tmp[0]=~/$receiver/); } + + return $match; +} + +# --------------------------------------------------------------------- diff --git a/contrib/check_fping_in.c b/contrib/check_fping_in.c new file mode 100644 index 0000000..50fd5ee --- /dev/null +++ b/contrib/check_fping_in.c @@ -0,0 +1,430 @@ +/****************************************************************************** +* +* CHECK_INET_FPING.C +* +* Program: Fping plugin for Nagios +* License: GPL +* Copyright (c) 1999 Didi Rieder (adrieder@sbox.tu-graz.ac.at) +* $Id$ +* +* Modifications: +* +* 08-24-1999 Didi Rieder (adrieder@sbox.tu-graz.ac.at) +* Intial Coding +* 09-11-1999 Karl DeBisschop (kdebiss@alum.mit.edu) +* Change to spopen +* Fix so that state unknown is returned by default +* (formerly would give state ok if no fping specified) +* Add server_name to output +* Reformat to 80-character standard screen +* 11-18-1999 Karl DeBisschop (kdebiss@alum.mit.edu) +* set STATE_WARNING of stderr written or nonzero status returned +* 09-29-2000 Matthew Grant (matthewg@plain.co.nz) +* changes for monitoring multiple hosts for checking Internet +* reachibility +* +* Description: +* +* This plugin will use the /bin/fping command (from nagios) to ping +* the specified host for a fast check if the host is alive. Note that +* it is necessary to set the suid flag on fping. +******************************************************************************/ + +#include "config.h" +#include "common.h" +#include "popen.h" +#include "utils.h" + +#define PROGNAME "check_fping" +#define PACKET_COUNT 15 +#define PACKET_SIZE 56 +#define CRITICAL_COUNT 2 +#define WARNING_COUNT 1 +#define UNKNOWN_PACKET_LOSS 200 /* 200% */ +#define UNKNOWN_TRIP_TIME -1.0 /* -1 seconds */ + +#define STRSZ 100 + +int textscan(char *buf); +int process_arguments(int, char **); +int get_threshold (char *arg, char *rv[2]); +void print_usage(void); +void print_help(void); + +char *server_names=NULL; +char *name="INTERNET"; +int cthresh=CRITICAL_COUNT; +int wthresh=WARNING_COUNT; +int nnames=0; +int tpl=UNKNOWN_PACKET_LOSS; +double trta=UNKNOWN_TRIP_TIME; +int packet_size=PACKET_SIZE; +int packet_count=PACKET_COUNT; +int verbose=FALSE; +int fail = 0; +int not_found = 0; +int rta_fail = 0; +int pl_fail = 0; +int unreachable = 0; + +int main(int argc, char **argv){ + int result; + int status=STATE_UNKNOWN; + char *servers=NULL; + char *command_line=NULL; + char *input_buffer=NULL; + char *pl_buffer=NULL; + char *rta_buffer=NULL; + input_buffer=malloc(MAX_INPUT_BUFFER); + rta_buffer = malloc(80); + pl_buffer = malloc(80); + memset(rta_buffer, 0, 80); + memset(pl_buffer, 0, 80); + + if(process_arguments(argc,argv)==ERROR) + usage("Could not parse arguments\n"); + + servers=strscpy(servers,server_names); + + /* compose the command */ + command_line=ssprintf + (command_line,"%s -b %d -c %d %s", + PATH_TO_FPING, + packet_size, + packet_count, + servers); + + if (verbose) printf("%s\n",command_line); + + /* run the command */ + child_process=spopen(command_line); + if(child_process==NULL){ + printf("Unable to open pipe: %s\n",command_line); + return STATE_UNKNOWN; + } + + child_stderr=fdopen(child_stderr_array[fileno(child_process)],"r"); + if(child_stderr==NULL){ + printf("Could not open stderr for %s\n",command_line); + } + + while (fgets(input_buffer,MAX_INPUT_BUFFER-1,child_process)) { + if (verbose) printf("%s",input_buffer); + result = textscan(input_buffer); + status = max(status,result); + } + + while(fgets(input_buffer,MAX_INPUT_BUFFER-1,child_stderr)) { + if (verbose) printf("%s",input_buffer); + result = textscan(input_buffer); + status = max(status,result); + } + + (void)fclose(child_stderr); + + /* close the pipe */ + if(spclose(child_process)) + status=max(status,STATE_WARNING); + + /* Analyse fail count and produce results */ + if (fail >= wthresh) { + status = max(status, STATE_WARNING); + } + + if (fail >= cthresh) { + status = max(status, STATE_CRITICAL); + } + + if( tpl != UNKNOWN_PACKET_LOSS ) { + snprintf(pl_buffer, 80, ", %d PL", pl_fail); + } + + if( trta != UNKNOWN_TRIP_TIME ) { + snprintf(rta_buffer, 80, ", %d RTA", rta_fail); + + } + + printf("FPING %s - %s, %d of %d fail, %d NF, %d UR%s%s\n", + state_text(status), + (name != NULL ? name : server_names), + fail, + nnames, + not_found, + unreachable, + pl_buffer, + rta_buffer); + + return status; +} + + + +/* analyse fping output - each event resulting in an increment of fail + * must be mutually exclusive. packet loss and round trip time analysed + * together, both at once just results in one increment of fail + */ +int textscan(char *buf) +{ + char *rtastr=NULL; + char *losstr=NULL; + double loss; + double rta; + int status=STATE_OK; + + if (strstr(buf,"not found")) { + fail++; + not_found++; + } else if(strstr(buf,"xmt/rcv/%loss") + && strstr(buf,"min/avg/max")) { + losstr = strstr(buf,"="); + losstr = 1+strstr(losstr,"/"); + losstr = 1+strstr(losstr,"/"); + rtastr = strstr(buf,"min/avg/max"); + rtastr = strstr(rtastr,"="); + rtastr = 1+index(rtastr,'/'); + loss = strtod(losstr,NULL); + rta = strtod(rtastr,NULL); + /* Increment fail counter + */ + if (tpl!=UNKNOWN_PACKET_LOSS && loss>tpl) { + fail++; + } + else if (trta!=UNKNOWN_TRIP_TIME && rta>trta) { + fail++; + } + else if (loss >= 100) { + fail++; + } + /* Increment other counters + */ + if (trta!=UNKNOWN_TRIP_TIME && rta>trta) + rta_fail++; + if (tpl!=UNKNOWN_PACKET_LOSS && loss>tpl) + pl_fail++; + if (loss >= 100) + unreachable++; + } else if(strstr(buf,"xmt/rcv/%loss") ) { + losstr = strstr(buf,"="); + losstr = 1+strstr(losstr,"/"); + losstr = 1+strstr(losstr,"/"); + loss = strtod(losstr,NULL); + /* Increment fail counter + */ + if (tpl!=UNKNOWN_PACKET_LOSS && loss>tpl) { + fail++; + } + else if (loss >= 100) { + fail++; + } + /* Increment other counters + */ + if (tpl!=UNKNOWN_PACKET_LOSS && loss>tpl) + pl_fail++; + if (loss >= 100) + unreachable++; + } + + return status; +} + + + + +/* process command-line arguments */ +int process_arguments(int argc, char **argv) +{ + int c; + +#ifdef HAVE_GETOPT_H + int option_index = 0; + static struct option long_options[] = + { + {"hostname" ,required_argument,0,'H'}, + {"critical" ,required_argument,0,'c'}, + {"warning" ,required_argument,0,'w'}, + {"bytes" ,required_argument,0,'b'}, + {"number" ,required_argument,0,'n'}, + {"pl-threshold" ,required_argument,0,'p'}, + {"rta-threshold" ,required_argument,0,'r'}, + {"name" ,required_argument,0,'N'}, + {"verbose" ,no_argument, 0,'v'}, + {"version" ,no_argument, 0,'V'}, + {"help" ,no_argument, 0,'h'}, + {0,0,0,0} + }; +#else + + if(argc<2) return ERROR; + + if (!is_option(argv[1])){ + server_names=argv[1]; + argv[1]=argv[0]; + argv=&argv[1]; + argc--; + } +#endif + + while (1){ +#ifdef HAVE_GETOPT_H + c = getopt_long(argc,argv,"+hVvH:c:w:b:n:N:p:r:",long_options,&option_index); +#else + c = getopt(argc,argv,"+hVvH:c:w:b:n:N:p:r:"); +#endif + + if (c==-1||c==EOF||c==1) + break; + + switch (c) + { + case '?': /* print short usage statement if args not parsable */ + printf("%s: Unknown argument: %s\n\n",my_basename(argv[0]),optarg); + print_usage(); + exit(STATE_UNKNOWN); + case 'h': /* help */ + print_help(); + exit(STATE_OK); + case 'V': /* version */ + print_revision(my_basename(argv[0]),"$Revision$"); + exit(STATE_OK); + case 'v': /* verbose mode */ + verbose=TRUE; + break; + case 'H': /* hostname */ + if(is_host(optarg)==FALSE){ + printf("Invalid host name/address\n\n"); + print_usage(); + exit(STATE_UNKNOWN); + } + if (server_names != NULL) + server_names=strscat(server_names," "); + server_names=strscat(server_names,optarg); + nnames++; + break; + case 'c': + if (is_intpos(optarg)) + cthresh = atoi(optarg); + else + usage("Critical threshold must be a positive integer"); + break; + case 'w': + if (is_intpos(optarg)) + wthresh = atoi(optarg); + else + usage("Warning threshold must be a postive integer"); + break; + case 'r': + if (is_intpos(optarg)) { + trta=strtod(optarg,NULL); + } + else { + usage("RTA threshold must be a positive integer"); + } + break; + case 'p': + if (is_intpos(optarg)) { + tpl=strtod(optarg,NULL); + } + else { + usage("RTA threshold must be a positive integer"); + } + break; + case 'b': /* bytes per packet */ + if (is_intpos(optarg)) + packet_size=atoi(optarg); + else + usage("Packet size must be a positive integer"); + break; + case 'N': /* Name of service */ + name = optarg; + break; + case 'n': /* number of packets */ + if (is_intpos(optarg)) + packet_count=atoi(optarg); + else + usage("Packet count must be a positive integer"); + break; + } + } + + while (optind < argc) { + if(is_host(argv[optind])==FALSE) { + printf("Invalid host name/address\n\n"); + print_usage(); + exit(STATE_UNKNOWN); + } + if (server_names != NULL) + server_names=strscat(server_names," "); + server_names=strscat(server_names,argv[optind]); + nnames++; + optind++; + } + + if (server_names==NULL || nnames < 2) + usage("At least 2 hostnames must be supplied\n\n"); + + if (cthresh < 2) + usage("Critical threshold must be at least 2"); + if (cthresh > nnames) + usage("Critical threshold cannot be greater than number of hosts tested"); + if (wthresh < 1) + usage("Warning threshold must be at least 1"); + if (wthresh > nnames) + usage("Warning threshold cannot be greater than number of hosts tested"); + if(wthresh >= cthresh) + usage("Warning threshold must be less than the critical threshold"); + + return OK; +} + + +void print_usage(void) +{ + printf("Usage: %s [] ...\n",PROGNAME); +} + + + + + +void print_help(void) +{ + + print_revision(PROGNAME,"$Revision$"); + + printf + ("Copyright (c) 1999 Didi Rieder (adrieder@sbox.tu-graz.ac.at)\n" + " (c) 2000 Matthew Grant (matthewg@plain.co.nz)\n" + "This plugin will use the /bin/fping command (from saint) to ping the\n" + "specified hosts for a fast check to see if the Internet is still \n" + "reachable, and the results of the testing aggregated. Note that it\n" + "is necessary to set the suid flag on fping.\n\n"); + + print_usage(); + + printf + ("\nOptions:\n" + "-b, --bytes=INTEGER\n" + " Size of ICMP packet (default: %d)\n" + "-c, --critical=INTEGER (default: %d)\n" + " critical threshold failure count\n" + "-n, --number=INTEGER\n" + " Number of ICMP packets to send (default: %d)\n" + "-H, --hostname=HOST\n" + " Name or IP Address of host to ping (IP Address bypasses name lookup,\n" + " reducing system load)\n" + "-h, --help\n" + " Print this help screen\n" + "-N, --name\n" + " Service name to print in results, defaults to INTERNET\n" + "-p, --pl-threshold\n" + " Packet loss threshold - specify to turn on packet loss testing\n" + "-r, --rta-threshold\n" + " Round trip average threshold - specify to turn on RTA testing\n" + "-V, --version\n" + " Print version information\n" + "-v, --verbose\n" + " Show details for command-line debugging (do not use with nagios server)\n" + "-w, --warning=INTEGER (default: %d)\n" + " warning threshold failure count\n", + PACKET_SIZE, CRITICAL_COUNT, PACKET_COUNT, WARNING_COUNT); +} diff --git a/contrib/check_ftpget.pl b/contrib/check_ftpget.pl new file mode 100755 index 0000000..de7e824 --- /dev/null +++ b/contrib/check_ftpget.pl @@ -0,0 +1,48 @@ +#!/usr/bin/perl -w +## Written 12/5/00 Jeremy Hanmer +# $Id$ + +use strict; +use Net::FTP; +use Getopt::Std; + +use vars qw($opt_H $opt_u $opt_p $opt_f); +getopts("H:u:p:f:"); + +my $host = $opt_H || + die "usage: check_ftp.pl -h host [<-u user> <-p pass> <-f file>]\n"; + +my $username = $opt_u || 'anonymous'; +my $pass = $opt_p || "$ENV{'LOGNAME'}\@$ENV{'HOSTNAME'}" ; + +my $file = $opt_f; + +my $status = 0; +my $problem; +my $output = "ftp ok"; + +my $ftp = Net::FTP->new("$host") || + &crit("connect"); + +$ftp->login("$username", "$pass") || + &crit("login"); + +$ftp->get($file) || + &crit("get") if $file; + +sub crit() +{ + $problem = $_[0]; + $status = 2; + if ( $problem eq 'connect' ) { + $output = "can't connect"; + } elsif ( $problem eq 'login' ) { + $output = "can't log in"; + } elsif ( $problem eq 'get' ) { + $output = "cant get $file"; + } +} + +print "$output\n"; +exit $status; + diff --git a/contrib/check_ifoperstatus.pl b/contrib/check_ifoperstatus.pl new file mode 100644 index 0000000..3f21cdd --- /dev/null +++ b/contrib/check_ifoperstatus.pl @@ -0,0 +1,145 @@ +#!/usr/bin/perl -w +# +# check_ifoperstatus.pl - nagios plugin +# +# +# +# +# Copyright (C) 2000 Christoph Kron +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +# +# Report bugs to: ck@zet.net +# +# 11.01.2000 Version 1.0 + +use strict; + +use Net::SNMP; +use Getopt::Long; +&Getopt::Long::config('auto_abbrev'); + + +my $status; +my $TIMEOUT = 15; + +my %ERRORS = ('UNKNOWN' , '-1', + 'OK' , '0', + 'WARNING', '1', + 'CRITICAL', '2'); + +my %ifOperStatus = ('1','up', + '2','down', + '3','testing', + '4','unknown', + '5','dormant', + '6','notPresent'); + +my $state = "UNKNOWN"; +my $answer = ""; +my $snmpkey = 1; +my $community = "public"; +my $port = 161; +my @snmpoids; +my $snmpIfOperStatus; +my $snmpLocIfDescr; +my $hostname; +my $session; +my $error; +my $response; + + +sub usage { + printf "\nMissing arguments!\n"; + printf "\n"; + printf "Perl Check IfOperStatus plugin for Nagios\n"; + printf "checks operational status of specified interface\n"; + printf "usage: \n"; + printf "ifoperstatus.pl -k -c -p "; + printf "\nCopyright (C) 2000 Christoph Kron\n"; + printf "check_ifoperstatus.pl comes with ABSOLUTELY NO WARRANTY\n"; + printf "This programm is licensed under the terms of the "; + printf "GNU General Public License\n(check source code for details)\n"; + printf "\n\n"; + exit $ERRORS{"UNKNOWN"}; +} + +# Just in case of problems, let's not hang Nagios +$SIG{'ALRM'} = sub { + print ("ERROR: No snmp response from $hostname (alarm)\n"); + exit $ERRORS{"UNKNOWN"}; +}; +alarm($TIMEOUT); + + +$status = GetOptions("key=i",\$snmpkey, + "community=s",\$community, + "port=i",\$port); +if ($status == 0) +{ + &usage; +} + + #shift; + $hostname = shift || &usage; + + ($session, $error) = Net::SNMP->session( + -hostname => $hostname, + -community => $community, + -port => $port + ); + + if (!defined($session)) { + $state='UNKNOWN'; + $answer=$error; + print ("$state: $answer"); + exit $ERRORS{$state}; + } + + $snmpIfOperStatus = '1.3.6.1.2.1.2.2.1.8' . "." . $snmpkey; + $snmpLocIfDescr = '1.3.6.1.4.1.9.2.2.1.1.28' . "." . $snmpkey; + + + push(@snmpoids,$snmpIfOperStatus); + push(@snmpoids,$snmpLocIfDescr); + + if (!defined($response = $session->get_request(@snmpoids))) { + $answer=$session->error; + $session->close; + $state = 'CRITICAL'; + print ("$state: $answer,$community,$snmpkey"); + exit $ERRORS{$state}; + } + + $answer = sprintf("host '%s',%s(%s) is %s\n", + $hostname, + $response->{$snmpLocIfDescr}, + $snmpkey, + $ifOperStatus{$response->{$snmpIfOperStatus}} + ); + + $session->close; + + if ( $response->{$snmpIfOperStatus} == 1 ) { + $state = 'OK'; + } + else { + $state = 'CRITICAL'; + } + +print ("$state: $answer"); +exit $ERRORS{$state}; + diff --git a/contrib/check_ifstatus.pl b/contrib/check_ifstatus.pl new file mode 100644 index 0000000..a7ab39e --- /dev/null +++ b/contrib/check_ifstatus.pl @@ -0,0 +1,178 @@ +#!/usr/bin/perl -w +# +# check_ifstatus.pl - nagios plugin +# +# +# Copyright (C) 2000 Christoph Kron +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +# +# Report bugs to: ck@zet.net +# +# 11.01.2000 Version 1.0 + +use strict; + +use Net::SNMP; +use Getopt::Long; +&Getopt::Long::config('auto_abbrev'); + + +my $status; +my $TIMEOUT = 1500; + +my %ERRORS = ('UNKNOWN' , '-1', + 'OK' , '0', + 'WARNING', '1', + 'CRITICAL', '2'); + +my %ifOperStatus = ('1','up', + '2','down', + '3','testing', + '4','unknown', + '5','dormant', + '6','notPresent'); + +my $state = "UNKNOWN"; +my $answer = ""; +my $snmpkey; +my $snmpoid; +my $key; +my $community = "public"; +my $port = 161; +my @snmpoids; +my $snmpIfAdminStatus = '1.3.6.1.2.1.2.2.1.7'; +my $snmpIfDescr = '1.3.6.1.2.1.2.2.1.2'; +my $snmpIfOperStatus = '1.3.6.1.2.1.2.2.1.8'; +my $snmpLocIfDescr = '1.3.6.1.4.1.9.2.2.1.1.28'; +my $hostname; +my $session; +my $error; +my $response; +my %ifStatus; +my $ifup =0 ; +my $ifdown =0; +my $ifdormant = 0; +my $ifmessage; + +sub usage { + printf "\nMissing arguments!\n"; + printf "\n"; + printf "Perl Check IfStatus plugin for Nagios\n"; + printf "monitors operational status of each interface\n"; + printf "usage: \n"; + printf "check_ifstatus.pl -c -p \n"; + printf "Copyright (C) 2000 Christoph Kron\n"; + printf "check_ifstatus.pl comes with ABSOLUTELY NO WARRANTY\n"; + printf "This programm is licensed under the terms of the "; + printf "GNU General Public License\n(check source code for details)\n"; + printf "\n\n"; + exit $ERRORS{"UNKNOWN"}; +} + +# Just in case of problems, let's not hang Nagios +$SIG{'ALRM'} = sub { + print ("ERROR: No snmp response from $hostname (alarm)\n"); + exit $ERRORS{"UNKNOWN"}; +}; +alarm($TIMEOUT); + + +$status = GetOptions("community=s",\$community, + "port=i",\$port); +if ($status == 0) +{ + &usage; +} + + #shift; + $hostname = shift || &usage; + + + + push(@snmpoids,$snmpIfOperStatus); + push(@snmpoids,$snmpLocIfDescr); + push(@snmpoids,$snmpIfAdminStatus); + push(@snmpoids,$snmpIfDescr); + +foreach $snmpoid (@snmpoids) { + + ($session, $error) = Net::SNMP->session( + -hostname => $hostname, + -community => $community, + -port => $port + ); + + if (!defined($session)) { + $state='UNKNOWN'; + $answer=$error; + print ("$state: $answer"); + exit $ERRORS{$state}; + } + + if (!defined($response = $session->get_table($snmpoid))) { + $answer=$session->error; + $session->close; + $state = 'CRITICAL'; + print ("$state: $answer,$community,$snmpkey"); + exit $ERRORS{$state}; + } + + foreach $snmpkey (keys %{$response}) { + $snmpkey =~ /.*\.(\d+)$/; + $key = $1; + $ifStatus{$key}{$snmpoid} = $response->{$snmpkey}; + } + $session->close; +} + + foreach $key (keys %ifStatus) { + # check only if interface is administratively up + if ($ifStatus{$key}{$snmpIfAdminStatus} == 1 ) { + if ($ifStatus{$key}{$snmpIfOperStatus} == 1 ) { $ifup++ ;} + if ($ifStatus{$key}{$snmpIfOperStatus} == 2 ) { + $ifdown++ ; + $ifmessage .= sprintf("%s: down -> %s
", + $ifStatus{$key}{$snmpIfDescr}, + $ifStatus{$key}{$snmpLocIfDescr}); + + } + if ($ifStatus{$key}{$snmpIfOperStatus} == 5 ) { $ifdormant++ ;} + } + } + + + if ($ifdown > 0) { + $state = 'CRITICAL'; + $answer = sprintf("host '%s', interfaces up: %d, down: %d, dormant: %d
", + $hostname, + $ifup, + $ifdown, + $ifdormant); + $answer = $answer . $ifmessage . "\n"; + } + else { + $state = 'OK'; + $answer = sprintf("host '%s', interfaces up: %d, down: %d, dormant: %d\n", + $hostname, + $ifup, + $ifdown, + $ifdormant); + } + +print ("$state: $answer"); +exit $ERRORS{$state}; + diff --git a/contrib/check_ipxping.c b/contrib/check_ipxping.c new file mode 100644 index 0000000..1ba10fe --- /dev/null +++ b/contrib/check_ipxping.c @@ -0,0 +1,200 @@ +/****************************************************************************************** + * + * CHECK_IPXPING.C + * + * Program: IPX ping plugin for Nagios + * License: GPL + * Copyright (c) 1999 Ethan Galstad (nagios@nagios.org) + * + * Last Modified: 09-24-1999 + * + * Command line: CHECK_IPXPING + * + * Description: + * + * This plugin will use the /usr/bin/ipxping command to ping the specified host using the + * IPX protocol. Note: Linux users must have IPX support compiled into the kernerl and + * must have IPX configured correctly in order for this plugin to work. + * If the round trip time value is above the level, a STATE_WARNING is + * returned. If it exceeds the level, a STATE_CRITICAL is returned. + * + * + * + * IMPORTANT!! + * + * This plugin will only work with the ipxping command that has been ported to Linux. + * The version for Sun takes different command line arguments and differs in its output. + * + *****************************************************************************************/ + +#include "../common/config.h" +#include "../common/common.h" +#include "netutils.h" + +/* this should be moved out to the configure script! */ +#define IPXPING_COMMAND "/tmp/ipxping/ipxping" + +/* these should be moved to the common header file */ +#define MAX_IPXNET_ADDRESS_LENGTH 12 +#define MAX_IPXHOST_ADDRESS_LENGTH 18 + +int socket_timeout=DEFAULT_SOCKET_TIMEOUT; +char dest_network[MAX_IPXNET_ADDRESS_LENGTH]; +char dest_address[MAX_IPXHOST_ADDRESS_LENGTH]; +int wrtt; +int crtt; + +int process_arguments(int,char **); + +FILE * spopen(const char *); +int spclose(FILE *); + +int main(int argc, char **argv){ + char command_line[MAX_INPUT_BUFFER]; + int rtt; + int bytes_returned; + int result=STATE_OK; + FILE *fp; + char input_buffer[MAX_INPUT_BUFFER]; + char *substr; + int current_line; + + if(process_arguments(argc,argv)!=OK){ + printf("Incorrect arguments supplied\n"); + printf("\n"); + printf("IPX ping plugin for Nagios\n"); + printf("Copyright (c) 1999 Ethan Galstad (nagios@nagios.org)\n"); + printf("Last Modified: 09-24-1999\n"); + printf("License: GPL\n"); + printf("\n"); + printf("Usage: %s [-to to_sec]\n",argv[0]); + printf("\n"); + printf("Options:\n"); + printf(" = IPX network that the remote host lies on. (Hex Format - 00:00:00:00)\n"); + printf(" = MAC address of the remote host. (Hex Format - 00:00:00:00:00:00)\n"); + printf(" = Round trip time in milliseconds necessary to result in a WARNING state\n"); + printf(" = Round trip time in milliseconds necessary to result in a CRITICAL state\n"); + printf(" [to_sec] = Seconds before we should timeout waiting for ping result. Default = %d sec\n",DEFAULT_SOCKET_TIMEOUT); + printf("\n"); + printf("Notes:\n"); + printf("This plugin will use the /usr/bin/ipxping command to ping the specified host using\n"); + printf("the IPX protocol. IPX support must be compiled into the kernel and your host must\n"); + printf("be correctly configured to use IPX before this plugin will work! An RPM package of\n"); + printf("the ipxping binary can be found at...\n"); + printf("http://www.rpmfind.net/linux/RPM/contrib/libc5/i386/ipxping-0.0-2.i386.shtml\n"); + printf("\n"); + return STATE_UNKNOWN; + } + + /* create the command line to use... */ + sprintf(command_line,"%s %s %s",IPXPING_COMMAND,dest_network,dest_address); + + /* initialize alarm signal handling */ + signal(SIGALRM,socket_timeout_alarm_handler); + + /* set socket timeout */ + alarm(socket_timeout); + + /* run the command */ + fp = spopen(command_line); + if(fp==NULL){ + printf("Unable to open pipe: %s",command_line); + return STATE_UNKNOWN; + } + + current_line=0; + while(fgets(input_buffer,MAX_INPUT_BUFFER-1,fp)){ + + current_line++; + + /* skip the first line of the output */ + if(current_line==1) + continue; + + /* we didn't get the "is alive" */ + if(current_line==2 && !strstr(input_buffer,"is alive")) + result=STATE_CRITICAL; + + /* get the round trip time */ + if(current_line==3){ + substr=strtok(input_buffer,":"); + substr=strtok(NULL,"\n"); + rtt=atoi(substr); + } + + /* get the number of bytes returned */ + if(current_line==4 && strstr(input_buffer,"bytes returned")){ + bytes_returned=atoi(input_buffer); + } + } + + /* close the pipe */ + spclose(fp); + + /* reset the alarm */ + alarm(0); + + if(current_line==1 || result==STATE_CRITICAL) + printf("IPX Ping problem - No response from host\n"); + else{ + + if(rtt>crtt) + result=STATE_CRITICAL; + else if(rtt>wrtt) + result=STATE_WARNING; + + printf("IPX Ping %s - RTT = %d ms, %d bytes returned from %s %s\n",(result==STATE_OK)?"ok":"problem",rtt,bytes_returned,dest_network,dest_address); + } + + + return result; + } + + + +/* process all arguments passed on the command line */ +int process_arguments(int argc, char **argv){ + int x; + + /* no options were supplied */ + if(argc<5) + return ERROR; + + /* get the destination network address */ + strncpy(dest_network,argv[1],sizeof(dest_network)-1); + dest_network[sizeof(dest_network)-1]='\x0'; + + /* get the destination host address */ + strncpy(dest_address,argv[2],sizeof(dest_address)-1); + dest_address[sizeof(dest_address)-1]='\x0'; + + /* get the round trip time variables */ + wrtt=atoi(argv[3]); + crtt=atoi(argv[4]); + + /* process remaining arguments */ + for(x=6;x<=argc;x++){ + + /* we got the timeout to use */ + if(!strcmp(argv[x-1],"-to")){ + if(x