debian/0000755000000000000000000000000011741435633007175 5ustar debian/README.Debian0000644000000000000000000000071111741435572011237 0ustar mon-contrib for Debian ---------------------- This package provides some user contributed alerts and monitors for 'mon' package. Some alerts and monitors provided by 'mon-contrib' package may require additional software to be installed depending on the functionalies their provide. Please refer to alert or monitor documentation before setting up scripts provided by this package. -- Dario Minnucci Wed, 06 Jul 2011 18:43:39 +0200 debian/README.source0000644000000000000000000000065111741435572011360 0ustar mon-contrib for Debian ---------------------- Since Upstream's sources contains some files issued under unknown license and obsolete code we need to exclude these files from it and repack the .tar.gz to be DFSG compliant. To rebuild upstream's distributed .tar.gz we use the tools located under debian/maintainer-tools directory. To repack upstream's .tar.gz to be used as source for mon-contrib package run: make all debian/TODO0000644000000000000000000000016611741435572007672 0ustar # # TODO # * Upstream: - Provide patches for documentation update: - index.html - contrib-guidelines.html debian/changelog0000644000000000000000000000334411741435633011053 0ustar mon-contrib (1.0+dfsg-2) unstable; urgency=low * Package refreshed * debian/control: - Bump Standards-Version to 3.9.3 - Build-Depends updated to use debhelper >=9 - Homepage URL updated. (Closes: #659995) * debian/copyright: - Fixes for DEP5 compatibility - Copyright years updated * debian/patches: Patch headers adapted to DEP3 -- Dario Minnucci Thu, 12 Apr 2012 04:19:04 +0200 mon-contrib (1.0+dfsg-1) unstable; urgency=low * Initial release (Closes: #613220) * debian/patches: + 00-update-ospf.monitor.diff + 00-update-rbl-monitor.diff + 00-replacement-for-dir_file_age.monitor.diff + 00-replacement-for-softraid.monitor.diff + 00-sms.alert.copyright.README.diff + 01-fix-wrong-path-for-interpreter.diff + 05-add-smblist-monitor.diff (previously provided by mon package) + 05-extract-README-info-form-informix.monitor.diff (script cleanup) + 05-extract-README-info-from-smtp_rt.monitor.diff (script cleanup) + 05-extract-README-info-from-sqlconn.monitor.diff (script cleanup) * debian/exclude-monitors: - bootp.monitor: Is obsolete along with the CMU bootpd software it is based on. - mon.monitor: Already present in 'mon' package - phttp.monitor: Already present in 'mon' package - snmpdiskspace.monitor: Already present in 'mon' package - radius.monitor: Already present in 'mon' package * debian/README.source: - Upstream's sources contains files issued under unknown license and obsolete code so we need to repack the provided .tar.gz fil to make it DFSG compliant. See debian/README.source before repacking upstrem's .tar.gz file. -- Dario Minnucci Thu, 07 Jul 2011 15:10:23 +0200 debian/compat0000644000000000000000000000000211741435572010375 0ustar 9 debian/control0000644000000000000000000000201311741435572010576 0ustar Source: mon-contrib Section: admin Priority: extra Maintainer: Dario Minnucci Build-Depends: debhelper (>= 9) Standards-Version: 3.9.3 Homepage: https://mon.wiki.kernel.org/articles/c/o/n/Contrib_repository.html Vcs-Git: git://git.debian.org/collab-maint/mon-contrib.git Vcs-Browser: http://git.debian.org/?p=collab-maint/mon-contrib.git Package: mon-contrib Architecture: any Depends: mon (>= 1.2.0-3), ${shlibs:Depends}, ${misc:Depends} Description: contributed tools, monitors and alert for mon mon-contrib is the mon /contrib archive. It contains user-submitted add-ons to mon, which are not included in the main mon distribution. . Most submissions are not checked by the archive maintainers for quality and some may not work, or work how you expect them to (most are quite good, though). . If you have something to contribute, either a new submission or a patch to another contrib'ed item, great! Please read the contrib guidelines to speed up the inclusion of your submission in the archives. debian/copyright0000644000000000000000000006105411741435572011140 0ustar Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: mon-contrib Source: https://sourceforge.net/projects/mon/files/mon-contrib Files: alerts/aim/aim.alert Copyright: 2002, Don Harper License: GPL-2+ On Debian systems, the complete text of the GNU General Public License version 2 can be found in "/usr/share/common-licenses/GPL-2". Files: alerts/bugzilla/bugzilla.alert Copyright: 2000, Michael S. Fischer, , AuctionWatch.com. License: GPL-2+ On Debian systems, the complete text of the GNU General Public License version 2 can be found in "/usr/share/common-licenses/GPL-2". Files: alerts/gnats/gnats.alert Copyright: 2002, Ted Serreyn License: GPL-2+ On Debian systems, the complete text of the GNU General Public License version 2 can be found in "/usr/share/common-licenses/GPL-2". Files: alerts/hpov/hpov.alert Copyright: 2001, Scott Prater 1998, Jim Trocki License: GPL-2+ On Debian systems, the complete text of the GNU General Public License version 2 can be found in "/usr/share/common-licenses/GPL-2". Files: alerts/lvs/ipvs.alert Copyright: 2004, Christopher DeMarco 2008, Richard Hartmann License: GPL-2+ On Debian systems, the complete text of the GNU General Public License version 2 can be found in "/usr/share/common-licenses/GPL-2". Files: alerts/sms/sms.alert Copyright: Robert Sander License: Public domain See: /usr/share/doc/mon-contrib/alerts/sms.alert.copyright.README Files: alerts/sms/sms/sms.alert Copyright: 1998, Peter Holzleitner 1998, Jim Trocki License: GPL-2+ On Debian systems, the complete text of the GNU General Public License version 2 can be found in "/usr/share/common-licenses/GPL-2". Files: alerts/snapshot/snapdelete.alert Copyright: 1998-2001, Theo Van Dinter License: GPL-2+ On Debian systems, the complete text of the GNU General Public License version 2 can be found in "/usr/share/common-licenses/GPL-2". Files: alerts/winpopup/winpopup.alert Copyright: 2001, Matthew Rechs - rechsm@hotmail.com 1998, Jim Trocki License: GPL-2+ On Debian systems, the complete text of the GNU General Public License version 2 can be found in "/usr/share/common-licenses/GPL-2". Files: monitors/bgp/bgp/bgp.monitor Copyright: 2002, Marc Hauswirth, Safe Host SA 2005, Ed Ravin License: GPL-2 On Debian systems, the complete text of the GNU General Public License version 2 can be found in "/usr/share/common-licenses/GPL-2". Files: monitors/cisco/cisco-env.monitor Copyright: 2004, Carnegie Mellon University License: BSD-4-clause Copyright (c) 2002 Carnegie Mellon University. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: . 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. . 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. . 3. The name "Carnegie Mellon University" must not be used to endorse or promote products derived from this software without prior written permission. For permission or any legal details, please contact: Office of Technology Transfer Carnegie Mellon University 5000 Forbes Avenue Pittsburgh, PA 15213-3890 (412) 268-4387, fax: (412) 268-7395 tech-transfer@andrew.cmu.edu . 4. Redistributions of any form whatsoever must retain the following acknowledgment: "This product includes software developed by Computing Services at Carnegie Mellon University (http://www.cmu.edu/computing/)." . CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. Files: monitors/cisco/snmp_interface/snmp_interface.monitor Copyright: 1998, Brian Moore 2000, Ed Ravin License: GPL-2+ On Debian systems, the complete text of the GNU General Public License version 2 can be found in "/usr/share/common-licenses/GPL-2". Files: monitors/citrix/citrix.monitor Copyright: 2005, Jeroen Moors License: GPL-2+ On Debian systems, the complete text of the GNU General Public License version 2 can be found in "/usr/share/common-licenses/GPL-2". Files: monitors/cyrus/imsp.monitor Copyright: 1998, Jim Trocki License: GPL-2+ On Debian systems, the complete text of the GNU General Public License version 2 can be found in "/usr/share/common-licenses/GPL-2". Files: monitors/cyrus/lmtp.monitor Copyright: 1998, Jim Trocki License: GPL-2+ On Debian systems, the complete text of the GNU General Public License version 2 can be found in "/usr/share/common-licenses/GPL-2". Files: monitors/cyrus/mupdate.monitor Copyright: 1998, Jim Trocki License: GPL-2+ On Debian systems, the complete text of the GNU General Public License version 2 can be found in "/usr/share/common-licenses/GPL-2". Files: monitors/dhcp/dhcp.monitor Copyright: 2002, Carnegie Mellon University License: BSD-4-clause Copyright (c) 2002 Carnegie Mellon University. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: . 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. . 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. . 3. The name "Carnegie Mellon University" must not be used to endorse or promote products derived from this software without prior written permission. For permission or any legal details, please contact: Office of Technology Transfer Carnegie Mellon University 5000 Forbes Avenue Pittsburgh, PA 15213-3890 (412) 268-4387, fax: (412) 268-7395 tech-transfer@andrew.cmu.edu . 4. Redistributions of any form whatsoever must retain the following acknowledgment: "This product includes software developed by Computing Services at Carnegie Mellon University (http://www.cmu.edu/computing/)." . CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. Files: monitors/diskspace/netsnmp-freespace/netsnmp-freespace.monitor Copyright: 2001, SATOH Fumiyasu License: GPL-2+ On Debian systems, the complete text of the GNU General Public License version 2 can be found in "/usr/share/common-licenses/GPL-2". Files: monitors/diskspace/snmpdiskspace/snmpdiskspace.monitor Copyright: 1998, Jim Trocki 2000, jens persson License: GPL-2+ On Debian systems, the complete text of the GNU General Public License version 2 can be found in "/usr/share/common-licenses/GPL-2". Files: monitors/diskspace/storage.monitor-1.0.0/storage.monitor Copyright: 1998, Jim Trocki 2000, Peter Holzleitner License: GPL-2+ On Debian systems, the complete text of the GNU General Public License version 2 can be found in "/usr/share/common-licenses/GPL-2". Files: monitors/dnsbl/rbl.monitor Copyright: 2007-2008, Ed Ravin License: GPL-2 On Debian systems, the complete text of the GNU General Public License version 2 can be found in "/usr/share/common-licenses/GPL-2". Files: monitors/file/dir_file_age/dir_file_age.monitor Copyright: 2000-2011, Jon Meek License: GPL-2+ On Debian systems, the complete text of the GNU General Public License version 2 can be found in "/usr/share/common-licenses/GPL-2". Files: monitors/flexlm/flexlm.monitor Copyright: 1999, Juha Ylitalo License: GPL-2+ On Debian systems, the complete text of the GNU General Public License version 2 can be found in "/usr/share/common-licenses/GPL-2". Files: monitors/ftp/ftps/ftps.monitor Copyright: 2008, Pierre-Emmanuel Andre License: GPL-2+ On Debian systems, the complete text of the GNU General Public License version 2 can be found in "/usr/share/common-licenses/GPL-2". Files: monitors/http/http_integrity/http_integrity.monitor Copyright: 2000, Andrew Ryan License: GPL-2+ On Debian systems, the complete text of the GNU General Public License version 2 can be found in "/usr/share/common-licenses/GPL-2". Files: monitors/http/phttp/phttp.monitor Copyright: 2006, Gilles LAMIRAL License: GPL-1 On Debian systems, the complete text of the GNU General Public License version 2 can be found in "/usr/share/common-licenses/GPL-1". Files: monitors/https/https/https.monitor Copyright: 1998, Jim Trocki License: Artistic | GPL-1 This program is free software; you can redistribute it and/or modify it under the terms of the Artistic License, which comes with Perl. . On Debian systems, the complete text of the Artistic License can be found in `/usr/share/common-licenses/Artistic'. Files: monitors/icecast/icecast/icecast.monitor Copyright: 2001, Mark Rushing License: GPL-2+ On Debian systems, the complete text of the GNU General Public License version 2 can be found in "/usr/share/common-licenses/GPL-2". Files: monitors/imap/imap-ptp.monitor Copyright: 1998, Jim Trocki License: GPL-2+ On Debian systems, the complete text of the GNU General Public License version 2 can be found in "/usr/share/common-licenses/GPL-2". Files: monitors/imap/imap-ssl.monitor Copyright: 1998, Jim Trocki License: GPL-2+ On Debian systems, the complete text of the GNU General Public License version 2 can be found in "/usr/share/common-licenses/GPL-2". Files: monitors/imap/imap-starttls.monitor Copyright: 1998, Jim Trocki License: GPL-2+ On Debian systems, the complete text of the GNU General Public License version 2 can be found in "/usr/share/common-licenses/GPL-2". Files: monitors/informix/informix/informix.monitor Copyright: 1999, SKECHERS USA, Inc. License: GPL-2+ On Debian systems, the complete text of the GNU General Public License version 2 can be found in "/usr/share/common-licenses/GPL-2". Files: monitors/informix/informixdbspace/informixdbspace.monitor Copyright: 1999, SKECHERS USA, Inc. License: GPL-2+ On Debian systems, the complete text of the GNU General Public License version 2 can be found in "/usr/share/common-licenses/GPL-2". Files: monitors/ipsec/ipsec/ipsec.monitor Copyright: 2001, Wiktor Wodecki License: GPL-2+ On Debian systems, the complete text of the GNU General Public License version 2 can be found in "/usr/share/common-licenses/GPL-2". Files: monitors/kerberos/krb5.monitor Copyright: 2002, Carnegie Mellon University License: BSD-4-clause Copyright (c) 2002 Carnegie Mellon University. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: . 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. . 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. . 3. The name "Carnegie Mellon University" must not be used to endorse or promote products derived from this software without prior written permission. For permission or any legal details, please contact: Office of Technology Transfer Carnegie Mellon University 5000 Forbes Avenue Pittsburgh, PA 15213-3890 (412) 268-4387, fax: (412) 268-7395 tech-transfer@andrew.cmu.edu . 4. Redistributions of any form whatsoever must retain the following acknowledgment: "This product includes software developed by Computing Services at Carnegie Mellon University (http://www.cmu.edu/computing/)." . CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. Files: monitors/lvs/ipvs.monitor Copyright: 2004, Christopher DeMarco 2008, Richard Hartmann License: GPL-2+ On Debian systems, the complete text of the GNU General Public License version 2 can be found in "/usr/share/common-licenses/GPL-2". Files: monitors/mon/mon/mon.monitor Copyright: 2000, Andrew Ryan License: GPL-2+ On Debian systems, the complete text of the GNU General Public License version 2 can be found in "/usr/share/common-licenses/GPL-2". Files: monitors/mon/umn_mon/umn_mon.monitor Copyright: 1998, Jim Trocki License: GPL-2+ On Debian systems, the complete text of the GNU General Public License version 2 can be found in "/usr/share/common-licenses/GPL-2". Files: monitors/netsnmp/netsnmp-exec/netsnmp-exec.monitor Copyright: 2001 Daniel J. Urist License: GPL-2+ On Debian systems, the complete text of the GNU General Public License version 2 can be found in "/usr/share/common-licenses/GPL-2". Files: monitors/netsnmp/netsnmp-freespace/netsnmp-freespace.monitor Copyright: 2001 SATOH Fumiyasu License: GPL-2+ On Debian systems, the complete text of the GNU General Public License version 2 can be found in "/usr/share/common-licenses/GPL-2". Files: monitors/netsnmp/netsnmp-proc/netsnmp-proc.monitor Copyright: 2001 Daniel J. Urist License: GPL-2+ On Debian systems, the complete text of the GNU General Public License version 2 can be found in "/usr/share/common-licenses/GPL-2". Files: monitors/netsnmp/process-full-command-line/process-full-command-line.monitor Copyright: 1998, Stephane Bortzmeyer License: GPL-2+ On Debian systems, the complete text of the GNU General Public License version 2 can be found in "/usr/share/common-licenses/GPL-2". Files: monitors/netware/netwarefree/netwarefree.monitor Copyright: 2000-2001, Peter Holzleitner License: GPL-2+ On Debian systems, the complete text of the GNU General Public License version 2 can be found in "/usr/share/common-licenses/GPL-2". Files: monitors/oracle/sqlconn/sqlconn.monitor Copyright: 1999, Duncan Lawie License: GPL-1+ On Debian systems, the complete text of the GNU General Public License version 1 can be found in "/usr/share/common-licenses/GPL-1". Files: monitors/ospf/ospf.monitor Copyright: 2002, Marc Hauswirth, Safe Host SA Copyright: 2005, Ed Ravin License: GPL-2+ On Debian systems, the complete text of the GNU General Public License version 2 can be found in "/usr/share/common-licenses/GPL-2". Files: monitors/postgres/postgresql/postgresql.monitor Copyright: 2001, CubIT IT Solutions, Severin Luftensteiner License: GPL-2+ On Debian systems, the complete text of the GNU General Public License version 2 can be found in "/usr/share/common-licenses/GPL-2". Files: monitors/printers/printmib/printmib.monitor Copyright: 2000, Seth Vidal License: GPL-2+ On Debian systems, the complete text of the GNU General Public License version 2 can be found in "/usr/share/common-licenses/GPL-2". Files: monitors/ps/ps.monitor Copyright: 2005, Allan Wind License: Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: . The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. . THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Files: monitors/pubcookie/pubcookielogin.monitor Copyright: 1999, Juha Ylitalo License: GPL-2+ On Debian systems, the complete text of the GNU General Public License version 2 can be found in "/usr/share/common-licenses/GPL-2". Files: monitors/pubcookie/webapp.monitor Copyright: 1999, Juha Ylitalo License: GPL-2+ On Debian systems, the complete text of the GNU General Public License version 2 can be found in "/usr/share/common-licenses/GPL-2". Files: monitors/radius/radius/radius.monitor Copyright: 1998, ACC TelEnterprises, James FitzGibbon License: GPL-2+ On Debian systems, the complete text of the GNU General Public License version 2 can be found in "/usr/share/common-licenses/GPL-2". Files: monitors/raid/softraid.monitor Copyright: 2004-2011, Kevin Ivory License: GPL-3 On Debian systems, the complete text of the GNU General Public License version 2 can be found in "/usr/share/common-licenses/GPL-3". Files: monitors/remote/remote/remote.monitor Copyright: 1999, Gilles LAMIRAL 1999, Laurent COMBE 1999, Thomas MORIN License: GPL-1 On Debian systems, the complete text of the GNU General Public License version 2 can be found in "/usr/share/common-licenses/GPL-1". Files: monitors/remote/startremote/startremote.monitor Copyright: 2001, CubIT IT Solutions, Severin Luftensteiner License: GPL-2+ On Debian systems, the complete text of the GNU General Public License version 2 can be found in "/usr/share/common-licenses/GPL-2". Files: monitors/repeater/rptr/rptr.monitor Copyright: 2000, Phil Gregory License: GPL-2+ On Debian systems, the complete text of the GNU General Public License version 2 can be found in "/usr/share/common-licenses/GPL-2". Files: monitors/samba/samba/samba.monitor Copyright: 1998, Jean Le Moigne License: GPL-2+ On Debian systems, the complete text of the GNU General Public License version 2 can be found in "/usr/share/common-licenses/GPL-2". Files: monitors/smtp/mailloop/mailloop.monitor Copyright: 2000, Shared Medical Systems, Inc, Bill Smargiassi License: GPL-2+ On Debian systems, the complete text of the GNU General Public License version 2 can be found in "/usr/share/common-licenses/GPL-2". Files: monitors/smtp/smtp-ssl.monitor Copyright: 1998, Jim Trocki License: GPL-2+ On Debian systems, the complete text of the GNU General Public License version 2 can be found in "/usr/share/common-licenses/GPL-2". Files: monitors/smtp/smtp_rt/smtp_rt.monitor Copyright: 1998, Jim Trocki 1999, Tom Bates License: GPL-2+ On Debian systems, the complete text of the GNU General Public License version 2 can be found in "/usr/share/common-licenses/GPL-2". Files: monitors/ssh/ssh/ssh.monitor Copyright: 2000, Regents of the University of Minnesota, Steven F. Siirila License: Permission to use, copy, modify, and distribute this software and documentation without fee is hereby granted, provided that the University of Minnesota copyright notices and this permission notice appear in all copies, and that the name University of Minnesota not be used in advertising or publicity pertaining to this software and documentation without specific, written prior permission. . The University of Minnesota makes no representations about the suitability of this software and documentation for any purpose. It is provided ``as is'' without express or implied warranty. Files: monitors/sybase/sybase/sybase.monitor Copyright: 1999, Peter Holzleitner License: GPL-2+ On Debian systems, the complete text of the GNU General Public License version 2 can be found in "/usr/share/common-licenses/GPL-2". Files: monitors/tcp/tcpch/tcpch.monitor Copyright: 1998, Jim Trocki 2000, Ed Ravin License: GPL-2+ On Debian systems, the complete text of the GNU General Public License version 2 can be found in "/usr/share/common-licenses/GPL-2". Files: monitors/tftp/tftp.monitor Copyright: 2002, Carnegie Mellon University, David Nolan License: BSD-4-clause Copyright (c) 2002 Carnegie Mellon University. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: . 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. . 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. . 3. The name "Carnegie Mellon University" must not be used to endorse or promote products derived from this software without prior written permission. For permission or any legal details, please contact: Office of Technology Transfer Carnegie Mellon University 5000 Forbes Avenue Pittsburgh, PA 15213-3890 (412) 268-4387, fax: (412) 268-7395 tech-transfer@andrew.cmu.edu . 4. Redistributions of any form whatsoever must retain the following acknowledgment: "This product includes software developed by Computing Services at Carnegie Mellon University (http://www.cmu.edu/computing/)." . CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. Files: monitors/udp/udp.monitor Copyright: 1998, Jim Trocki 2005, David Nolan License: GPL-2+ On Debian systems, the complete text of the GNU General Public License version 2 can be found in "/usr/share/common-licenses/GPL-2". Files: debian/* Copyright: 2011-2012, Dario Minnucci License: GPL-2 On Debian systems, the complete text of the GNU General Public License version 2 can be found in "/usr/share/common-licenses/GPL-2". debian/maintainer-tools/0000755000000000000000000000000011741435572012464 5ustar debian/maintainer-tools/Makefile0000644000000000000000000000411011741435572014120 0ustar # # PACKAGE_NAME=mon-contrib PACKAGE_VERSION=1.0 # # CVSROOT=:pserver:anonymous@mon.cvs.sourceforge.net:/cvsroot/mon CVS=$(shell which cvs) WORKDIR=$(shell echo $(PACKAGE_NAME)-$(PACKAGE_VERSION)) MON_CONTRIB_TAG=$(PACKAGE_NAME)-$(shell echo $(PACKAGE_VERSION) | sed s/\\./-/g) ORIG_TAR_GZ=$(PACKAGE_NAME)_$(PACKAGE_VERSION)+dfsg.orig.tar.gz all: export exclude-all dfsg-orig-tgz export: # Exporting version from upstream CVS repository ... $(CVS) -d$(CVSROOT) login @$(CVS) -z3 -d$(CVSROOT) export -r $(MON_CONTRIB_TAG) mon-contrib @mv mon-contrib $(WORKDIR) # Done exclude-all: exclude-alerts exclude-cgi-bin exclude-monitors exclude-utils exclude-alerts: # Removing excluded alerts ... rm -fr $(WORKDIR)/alerts/pager # Unknown license # Done exclude-cgi-bin: # Removing excluded cgi-bin ... rm -fr $(WORKDIR)/cgi-bin # Not packaged in this version # Done exclude-monitors: # Removing excluded monitors ... rm -fr $(WORKDIR)/monitors/bootp # Obsolete monitor rm -fr $(WORKDIR)/monitors/http/lwp-http-post # Unknown license rm -fr $(WORKDIR)/monitors/http/phttp # Monitor already present in 'mon' package rm -fr $(WORKDIR)/monitors/ipmi # Unknown license rm -fr $(WORKDIR)/monitors/mon/mon # Monitor already present in 'mon' package rm -fr $(WORKDIR)/monitors/nt-service # Unknown license rm -fr $(WORKDIR)/monitors/ntp/ntp # Unknown license rm -fr $(WORKDIR)/monitors/diskspace/snmpdiskspace # Monitor already present in 'mon' package rm -fr $(WORKDIR)/monitors/radius/radius # Monitor already present in 'mon' package # Done exclude-utils: # Removing excluded utils ... rm -fr $(WORKDIR)/utils # Not packaged in this version # Done dfsg-orig-tgz: # Building $(ORIG_TAR_GZ) ... @tar cfz $(ORIG_TAR_GZ) $(WORKDIR) # Done clean: # Cleaning environment ... # Removing $(WORKDIR) ... @rm -fr $(WORKDIR) # Removing $(ORIG_TAR_GZ) ... @rm -fr $(ORIG_TAR_GZ) # Done debian/maintainer-tools/README0000644000000000000000000000012111741435572013336 0ustar # # README # See debian/README.source before repacking upstrem's .tar.gz file. debian/maintainer-tools/extract-licenses0000755000000000000000000000174711741435572015700 0ustar #!/usr/bin/env bash # # Copyright: Dario Minnucci # License: GPL-2+ # # This script tries to extract licenses from *.alert and *.monitor # files and updates debian/copyright.extracted file for easier # composition of the debian/copyright file. # ALERT_LIST=$(find ../alerts -name "*.alert" -print) MONITOR_LIST=$(find ../monitors -name "*.monitor" -print) function extract () { LIST="$1" for alert in ${LIST} ; do FILES=$(echo ${alert} | sed 's/\.\.\///g') COPYRIGHT=$(cat $alert | grep "Copyright" | sed 's/^#//g' | sed 's/Copyright//g' | sed 's/(C)//g') LICENSE=$(cat $alert | grep "License\license" | sed 's/^#//g' | sed 's/Copyright//g' | sed 's/(C)//g') echo echo "Files: ${FILES}" echo "Copyright: ${COPYRIGHT}" echo "License: ${LICENSE}" echo echo "--------------------------------------------------------------------------------" done } extract "${ALERT_LIST}" > copyright.extracted extract "${MONITOR_LIST}" >> copyright.extracted exit 0 debian/mon-contrib.dirs0000644000000000000000000000032511741435572012311 0ustar usr/lib/mon/alert.d/ usr/lib/mon/mon.d/ usr/lib/mon-contrib usr/lib/mon-contrib/alert.d usr/lib/mon-contrib/mon.d usr/share/doc/mon-contrib/alerts usr/share/doc/mon-contrib/monitors usr/share/doc/mon-contrib/html debian/mon-contrib.doc-base0000644000000000000000000000052511741435572013027 0ustar Document: mon-contrib Title: mon-contrib information and contribution guidelines Author: Jim Trocki Abstract: Refereces to the mon /contrib archive and contribution guidelines Section: Network/Monitoring Format: HTML Index: /usr/share/doc/mon-contrib/html/index.html Files: /usr/share/doc/mon-contrib/html/*.html debian/mon-contrib.docs0000644000000000000000000000001511741435572012274 0ustar README HOWTO debian/patches/0000755000000000000000000000000011741435572010626 5ustar debian/patches/00-replacement-for-dir_file_age.monitor.diff0000644000000000000000000000336011741435572021037 0ustar Description: Replacement for 'dir_file_age.monitor' file Author: Dario Minnucci Last-Update: 2011-02-20 Index: mon-contrib/monitors/file/dir_file_age/dir_file_age.monitor =================================================================== --- mon-contrib.orig/monitors/file/dir_file_age/dir_file_age.monitor 2011-02-20 21:55:22.584123548 +0100 +++ mon-contrib/monitors/file/dir_file_age/dir_file_age.monitor 2011-02-20 21:56:24.487225671 +0100 @@ -5,9 +5,28 @@ # but there is nothing DNS specific here except that the directory # is removed from the failure list leaving only the file (zone) name # -# Jon Meek, originally 25-Dec-2000 -$RCSid = q{$Id: dir_file_age.monitor,v 1.1.1.1 2005/02/18 17:52:22 trockij Exp $}; +$RCSid = q{$Id: dir_file_age.monitor,v 1.1 2000/12/25 18:30:09 meekj Exp meekj $}; +# +# Author: Jon Meek, originally 25-Dec-2000 +# Copyright (C) 2011, Jon Meek (meekj at ieee.org) +# +# 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 +# + + use Getopt::Long; use File::Find; @@ -66,3 +85,4 @@ # $FileCount++; } + debian/patches/00-replacement-for-softraid.monitor.diff0000644000000000000000000001070311741435572020260 0ustar Description: Replacement for 'softraid.monitor' file Author: Dario Minnucci Last-Update: 2011-02-21 Index: mon-contrib/monitors/raid/softraid.monitor =================================================================== --- mon-contrib.orig/monitors/raid/softraid.monitor 2011-02-21 19:28:15.947929456 +0100 +++ mon-contrib/monitors/raid/softraid.monitor 2011-02-21 19:29:03.271220769 +0100 @@ -1,42 +1,83 @@ #!/bin/bash # softraid.monitor # Linux Software RAID check with mon compatible output/return values -# Call without arguments. +# For monitoring, call without arguments. +# To initialize a reference file, call with argument "learn". +# This script does not need root permissions, but the calling user needs +# permissions to read and write a reference file. # The reference file $md_ref must exist. To generate it: # softraid.monitor learn -# [ cat /proc/mdstat > /path/to/dir/mdstat.reference ] -# no administrative permissions needed for this script. +# THIS NEEDS TO BE SOMEWHERE THE CHECKING USER CAN WRITE +md_ref="/var/something/mdstat.reference" +# # Return values: 3 /proc/mdstat missing, no Software RAID? -# 2 reference file missing +# 2 reference file either missing or not writeable with learn # 1 RAID not okay -# 0 alles okay +# 0 all okay + +# Author: Kevin Ivory +# Copyright: 2004-2011, Kevin Ivory +# License: GNU General Public License +# 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 3 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. # -# Date: Thu, 07 Apr 2005 17:28:02 +0200 -# From: Kevin Ivory -# To: mon@linux.kernel.org -# Subject: Re: Monitoring software raid? +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . # +# basic script security: begin +# no default access for group and others to new files/directories +umask u=rwx,go= +# Set very basic PATH, add only as needed +export PATH=/usr/bin:/bin +# Internal Field Separator (word splitting) +# if unset, default value is +unset IFS +# Do not let user preload libraries with the environment variables: +unset LD_PRELOAD LD_LIBRARY_PATH +# No language specials, only Posix standard +unset LANG +export LC_ALL=POSIX +# set -u Treat unset variables and parameters other than the +# special parameters "@" and "*" as an error when per- +# forming parameter expansion. If expansion is attempted +# on an unset variable or parameter, the shell prints an +# error message, and, if not interactive, exits with a +# non-zero status. +set -u +# basic script security: end + mdstat="/proc/mdstat" -# THIS NEEDS TO BE SOMEWHERE THE CHECKING USER CAN WRITE -md_ref="/var/something/mdstat.reference" if [ ! -r "$mdstat" ]; then echo -e "$HOSTNAME:$0 Missing RAID status file: $mdstat Perhaps no software RAID?" exit 3 fi -if [ "$1" = "learn" ]; then - cat "$mdstat" > "$md_ref" +# auto-read-only is a normal status used for boot/hibernation: at this time +# it is critical for raid-array to be read-only. It automatically switches +# to read-write on first write (that is the 'auto' bit - it automatically +# stops being read-only). +# regular expression used because of kernel dependent output +if [ "${1:-unset}" = "learn" ]; then + sed 's/active \?(auto-read-only)/active/' "$mdstat" > "$md_ref" + [ $? -ne 0 ] && { echo "Writing to $md_ref failed."; exit 2; } fi if [ ! -r "$md_ref" ]; then echo -e "$HOSTNAME:$0 Missing RAID reference file: $md_ref - Generate with: $0 learn > $md_ref" + Generate with: $0 learn" exit 2 fi md_out="Complete contents of $mdstat:\n\n$(cat $mdstat)" -diff=$(diff -u -U 0 $md_ref $mdstat) +diff=$(diff -U 0 -w $md_ref <(sed 's/active \?(auto-read-only)/active/' $mdstat)) stat=$? if [ $stat -eq 0 ]; then echo -e "$HOSTNAME\nSoftware RAID ok:\n$md_out" @@ -45,3 +86,4 @@ exit 1 fi # end of softraid.monitor + debian/patches/00-sms.alert.copyright.README.diff0000644000000000000000000000624511741435572016557 0ustar Description: Creates a file 'sms.alert.copyright.README' including author's email declaring the script copyright as Public Domain Author: Dario Minnucci Last-Update: 2011-02-20 Index: mon-contrib/alerts/sms/sms.alert.copyright.README =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 +++ mon-contrib/alerts/sms/sms.alert.copyright.README 2011-02-20 21:31:27.008962171 +0100 @@ -0,0 +1,57 @@ +Received: from localhost (localhost [127.0.0.1]) + by naghi.nunpa.com (Postfix) with ESMTP id BB36A34063D26 + for ; Sun, 20 Feb 2011 15:15:08 +0100 (CET) +Received: from naghi.nunpa.com ([127.0.0.1]) + by localhost (naghi.nunpa.com [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id iosVyN1ztxcJ for ; + Sun, 20 Feb 2011 15:15:05 +0100 (CET) +Received: from master.debian.org (master.debian.org [70.103.162.29]) + by naghi.nunpa.com (Postfix) with ESMTPS id 1ECB134063D14 + for ; Sun, 20 Feb 2011 15:15:04 +0100 (CET) +Received: from gk-hm.epigenomics.net ([145.253.88.2]) + by master.debian.org with esmtp (Exim 4.69) + (envelope-from ) + id 1PrA3z-0007jQ-Tv + for debian@midworld.net; Sun, 20 Feb 2011 14:15:04 +0000 +Received: (qmail 32567 invoked from network); 20 Feb 2011 14:08:20 -0000 +Received: from kao.epigenomics.epi (192.168.48.82) + by salam.epigenomics.epi with ESMTP; 20 Feb 2011 14:08:20 -0000 +Received: from localhost (localhost [127.0.0.1]) + by kao.epigenomics.epi (Postfix) with ESMTP id F21F73B74144 + for ; Sun, 20 Feb 2011 15:08:20 +0100 (CET) +X-Virus-Scanned: amavisd-new at epigenomics.com +Received: from kao.epigenomics.epi ([127.0.0.1]) + by localhost (kao.epigenomics.epi [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id o3SoTTcU6xsi for ; + Sun, 20 Feb 2011 15:08:19 +0100 (CET) +Received: from kao.epigenomics.epi (localhost [127.0.0.1]) + by kao.epigenomics.epi (Postfix) with ESMTP id 676593B74013 + for ; Sun, 20 Feb 2011 15:08:19 +0100 (CET) +Date: Sun, 20 Feb 2011 15:08:19 +0100 (CET) +From: Robert Sander +To: Dario Minnucci +Subject: Re: About your contributed software (sms.alert) +Message-ID: <1472a73b-2884-409e-b6da-12a021d0e9e7@kao> +In-Reply-To: <4D5EBFA6.1030304@debian.org> +Content-Type: text/plain; charset=utf-8 +Content-Transfer-Encoding: quoted-printable +MIME-Version: 1.0 +X-Originating-IP: [88.130.160.160] +X-Mailer: Zimbra 7.0.0_GA_3077 (ZimbraWebClient - FF3.0 (Linux)/7.0.0_GA_3077) +X-Greylist: delayed 399 seconds by postgrey-1.31 at master; Sun, 20 Feb 2011 14:15:03 UTC + +Dear Dario, + +thank you for contacting me about this old script of mine. + +As we even do not use mon any more you can consider this simple script +to be in the public domain. + +Regards +-- +Robert Sander Senior Manager Information Systems +Epigenomics AG Kleine Pr=C3=A4sidentenstr. 1 10178 Berlin, Germany= + +phone:+49-30-24345-0 fax:+49-30-24345-555 +http://www.epigenomics.com robert.sander@epigenomics.com + debian/patches/00-update-ospf.monitor.diff0000644000000000000000000001723011741435572015615 0ustar Description: Update ospf.monitor to latest version Author: Dario Minnucci Last-Update: 2011-05-04 Index: mon-contrib/monitors/ospf/ospf.monitor =================================================================== --- mon-contrib.orig/monitors/ospf/ospf.monitor 2011-05-04 18:08:17.106005113 +0200 +++ mon-contrib/monitors/ospf/ospf.monitor 2011-05-04 18:09:13.589156470 +0200 @@ -2,8 +2,12 @@ # # Router ospf (Open Shortest Path First) monitor # Look at each router and get the status of all OSPF neighbors. +# Look at each router and get the status of all OSPF interfaces. # Issue alarm if any interfaces configured for neighbors do not -# have a full adjacencies +# have a full adjacencies (but fails for point-to-point state) +# Try to match OSPF neighbors to their interfaces +# Issue alarm for any interface that does not have at least one neighbor +# (i.e. kludge to catch point-to-point state problem) # Detail log shows status of all enabled OSPF interfaces. # Usage: @@ -29,15 +33,15 @@ # License: GNU GPL v2, see http://www.gnu.org/copyleft/gpl.html # # Loosely based on bgp.monitor which is: -# Copyright 2002, by Marc Hauswirth, Safe Host SA -# -# Some inspiration is taked from others mon monitors and from -# routerinfo.pl by Ben Buxton (bb@zipworld.net), also under GPL, see http://www.zipworld.com.au/~bb/linux/ -# and from routerint.monitor by P. Strauss (philou@philou.ch) and me self (marc@safehostnet.com). -# +### Copyright 2002, by Marc Hauswirth, Safe Host SA +### +### Some inspiration is taked from others mon monitors and from +### routerinfo.pl by Ben Buxton (bb@zipworld.net), also under GPL, see http://www.zipworld.com.au/~bb/linux/ +### and from routerint.monitor by P. Strauss (philou@philou.ch) and me self (marc@safehostnet.com). +### # This script need the SNMP Session module from Simon Leinen -# Wich you could found under http://www.switch.ch/misc/leinen/snmp/perl/ +# Which you could found under http://www.switch.ch/misc/leinen/snmp/perl/ # It is also part of MRTG (http://people.ee.ethz.ch/~oetiker/webtools/mrtg/) use SNMP; @@ -50,8 +54,8 @@ $opt{'community'}= undef; $opt{'exclude'}= ""; $opt{'debug'}= undef; -my $usage="Usage: [COMMUNITY=str] ospf.monitor [--exclude regexp] [--community str] [--timeout usecs] [--version N] [--retries nn] router [...]\n"; -GetOptions(\%opt, "exclude=s", "community=s", "timeout=i", "version=i", "retries=i", "debug") or die $usage; +my $usage="Usage: [COMMUNITY=str] ospf.monitor [--exclude regexp] [--community str] [--timeout usecs] [--version N] [--retries nn] [--neighbormin N] router [...]\n"; +GetOptions(\%opt, "exclude=s", "community=s", "timeout=i", "version=i", "retries=i", "debug", "neighbormin=i") or die $usage; # It's highly unlikely someone wants dots in an IP address to be treated # as a regexp pattern, so we'll escape them to make behavior more predictable. @@ -67,6 +71,7 @@ my $timeout= $opt{'timeout'} || 5000000; my $retries= $opt{'retries'} || 3; my $version= $opt{'version'} || 1; +my $neighbormin= $opt{'neighbormin'} || 0; ## -- @@ -83,11 +88,13 @@ my %oids = ( "SysUptime" => "1.3.6.1.2.1.1.3.0", "ifDescr" => "1.3.6.1.2.1.2.2.1.2", + "ipAdEntNetMask" => "1.3.6.1.2.1.4.20.1.3" , "ospfRouterId" => "1.3.6.1.2.1.14.1.1" , "ospfIfIpAddress" => "1.3.6.1.2.1.14.7.1.1" , "ospfAddressLessIf" => "1.3.6.1.2.1.14.7.1.2" , "ospfIfAdminStat" => "1.3.6.1.2.1.14.7.1.5" , "ospfIfState" => "1.3.6.1.2.1.14.7.1.12" , + "ospfNbrState" => "1.3.6.1.2.1.14.10.1.6" , ); @@ -101,6 +108,18 @@ 7 => "otherDesignatedRouter", ); +my %ospfNbrStates = ( + 1 => "down", + 2 => "attempt", + 3 => "init", + 4 => "twoWay", + 5 => "exchangeStart", + 6 => "exchange", + 7 => "loading", + 8 => "full", + ); + + my %ospfAdminStatus = ( 1 => "enabled", 2 => "disabled", @@ -119,13 +138,33 @@ if ($session->{ErrorNum}) { push @failures, $router; - push @details, "$router: error on SNMP get of $oidstr.$instance: $session->{ErrorStr}"; + push @details, "$router: error on SNMP get of $oidstr/$oids{$oidstr}.$instance: $session->{ErrorStr}"; return 0; } return $result; } + +sub ip2val # octet string +{ + my @octets= split('\.', $_[0]); + pop @octets if @octets == 5; # dump the .0, if it exists + die "$0: ip2val: bad input, expected 4 octets got " . scalar @octets unless @octets == 4; + my $maskval= 0; + map {$maskval= ($maskval << 8) | $_} @octets; + return $maskval; +} + +sub i2ip # drop instance number from IP value +{ + return substr($_[0], 0, -2); +} + + +# MAIN + foreach $router (@ARGV) { # Get some infos about this router + my $vars; my $sess = new SNMP::Session ( DestHost => $router, Community => $community, @@ -136,7 +175,6 @@ if (!defined($sess)) { push @failures, $router; - push @details, "$router: cannot create SNMP session"; next; } @@ -144,10 +182,26 @@ push @details, "$router (Router-ID $ospfRouterID)"; + my %ospfNeighbors; + + # Discover all active OSPF neighbors, and their states + $vars = new SNMP::VarList([$oids{ospfNbrState}]); + for (my @vals= $sess->getnext($vars); + $vars->[0]->tag =~ /1\.3\.6\.1\.2\.1\.14\.10\.1\.6/ # still in table (Did you have a cleaner solutions ?) + and + not $sess->{ErrorStr}; # and not end of mib or other error + @vals = $sess->getnext($vars)) + { + # trim down OID to keep just the interface part + my $neighbor= $vars->[0]->tag; + $neighbor =~ s/^\.$oids{ospfNbrState}\.//; + $ospfNeighbors{$neighbor}= $ospfNbrStates{$vals[0]}; + } + # Find the indexes of the interfaces with OSPF enabled my @ospfinterfaces; - my $vars = new SNMP::VarList([$oids{ospfIfAdminStat}]); + $vars = new SNMP::VarList([$oids{ospfIfAdminStat}]); for (my @vals = $sess->getnext($vars); $vars->[0]->tag =~ /1\.3\.6\.1\.2\.1\.14\.7\.1\.5/ # still in table (Did you have a cleaner solutions ?) and @@ -167,20 +221,46 @@ { my $ifstate = snmpget1($sess, "ospfIfState", "$int"); my $ifinfo= $int; + if ($int =~ /0\.0\.0\.0\.(\d+)$/) { my $ifindex= $1; $ifinfo= snmpget1($sess, "ifDescr", $ifindex) . " (.$ifindex)"; } - push @details, sprintf("$router: Interface %-23s %-15s",$ifinfo, $ospfIfStates{$ifstate}); + push @details, sprintf("$router: Interface %-15s %-15s", i2ip($ifinfo), $ospfIfStates{$ifstate}); # if ospfIfState not in [4..7] (OSPF full adjacency states) if ($ifstate < 4 or $ifstate > 7) { push @failures, $router unless $int =~ /$opt{exclude}\b/ or grep(/^$router$/, @failures); $details[$#details] .= " [NO ADJACENCY]"; + } else { + # try to find the active neighbors for this interface by + # using the interface's netmask. + my $ifip= $ifinfo; + $ifip =~ s/\.0$//; # drop that annoying .0 + my $ipmask= ip2val(snmpget1($sess, "ipAdEntNetMask", $ifip)); + my $neighborcount= 0; + foreach my $nabe (keys %ospfNeighbors) { + if ( (ip2val($nabe) & $ipmask) == (ip2val($ifip) & $ipmask) ) + { + push @details, sprintf("$router: Interface %-15s neighbor %-15s state %s", i2ip($ifinfo), i2ip($nabe), $ospfNeighbors{$nabe}); + $neighborcount++; + } + } + if ($neighborcount == 0) { + # no neighbor found for this interface, issue a warning + push @failures, $router unless $int =~ /$opt{exclude}\b/ or grep(/^$router$/, @failures); + push @details, sprintf("$router: Interface %-15s [NO NEIGHBOR]", i2ip($ifinfo)); + } } } + my $totalneighbors= scalar(keys %ospfNeighbors); + if ($totalneighbors < $neighbormin) { + push @failures, $router; + push @details, "$router: ALARM: Less than $neighbormin neighbors: only $totalneighbors found"; + } } + if (@failures) { print join(' ', @failures), "\n"; }; debian/patches/00-update-rbl-monitor.diff0000644000000000000000000000536211741435572015427 0ustar Description: Update rbl.monitor to latest version Author: Dario Minnucci Last-Update: 2011-05-04 Index: mon-contrib/monitors/dnsbl/rbl.monitor =================================================================== --- mon-contrib.orig/monitors/dnsbl/rbl.monitor 2011-05-04 17:53:36.983228918 +0200 +++ mon-contrib/monitors/dnsbl/rbl.monitor 2011-05-04 17:56:34.856557698 +0200 @@ -1,13 +1,10 @@ #!/usr/bin/perl -# + # rbl.monitor - check RBL blacklists for an IP address. Uses asynch I/O # to send all the requests simultaneously -# -# Based on original work by Tim Haynes, re-written by Ed Ravin to -# use asynchronous I/O. -# -# $Id: rbl.monitor,v 1.3 2010/05/22 12:35:23 trockij Exp $ -# + +# Copyright (c) 2007, 2008 by Ed Ravin . License is GNU. +# Available to the public courtesy of Public Access Networks http://panix.com my $usage="\ Usage: rbl.monitor [options] hostname [...] @@ -77,9 +74,9 @@ my $sel = IO::Select->new(); my $starttime= time; -my %hostpart2host; +my %revip2host; -# gethostbyname is non-reentrant, so do all the queries up front +# gethostbyname is non-reentrant, so parse the hostnames to test up front foreach my $host (@ARGV) { my $hostdata= gethostbyname($host); if (!defined($hostdata)) { @@ -87,14 +84,16 @@ push @detail, "$host: bad hostname"; next; } - my $hostpart= join(".", reverse(unpack("C4", $hostdata))); - $hostpart2host{$hostpart}= $host; + my $revip= join(".", reverse(unpack("C4", $hostdata))); + $revip2host{$revip}= $host; } # start all the queries -foreach my $hostpart (keys %hostpart2host) { +foreach my $revip (keys %revip2host) { foreach my $rbl (@rbls2check) { - my $dnssock= $res->bgsend(join(".", $hostpart, $rbl)); + my $dnssock= $res->bgsend(join(".", $revip, $rbl)); + die "$0: Net::DNS::Resolver::bgsend returns undef - too many open files?\n" + unless defined($dnssock); push @sockets, $dnssock; $sel->add($dnssock); } @@ -108,16 +107,18 @@ last MAINLOOP; } foreach my $sock (@ready) { - my ($authority, $ipaddress, $hostpart, $host); + my ($authority, $ipaddress, $revip, $forwardip, $host); my $packet = $res->bgread($sock); foreach my $rr ($packet->answer) { if ($rr->type eq "A") { $ipaddress= $rr->address; $authority= $rr->name; - if ($authority=~ /^(\d+\.\d+\.\d+\.\d+)\./) { - $hostpart= $1; - $host= $hostpart2host{$hostpart}; - } else { $host= "???" } + my $q= \$packet->question; + my @qquads= split('\.',${$$q}{qname}); + splice(@qquads, 4); + $revip= join('.', @qquads); + $forwardip= join('.', reverse(@qquads)); + $host= $revip2host{$revip} || $forwardip; push @summary, $host unless grep /^$host$/, @summary; push @detail, "$host: $authority: " . $rr->address; debian/patches/01-fix-wrong-path-for-interpreter.diff0000644000000000000000000000411611741435572017677 0ustar Description: Fix wrong path for Perl interpreter Author: Dario Minnucci Last-Update: 2011-02-14 Index: mon-contrib/alerts/hpov/hpov.alert =================================================================== --- mon-contrib.orig/alerts/hpov/hpov.alert 2011-02-15 00:00:11.795939457 +0100 +++ mon-contrib/alerts/hpov/hpov.alert 2011-02-15 00:00:23.019765719 +0100 @@ -1,4 +1,4 @@ -#!/usr/local/bin/perl +#!/usr/bin/perl # # hpov.alert - generate event in HP OpenView # Index: mon-contrib/monitors/file/dir_file_age/dir_file_age.monitor =================================================================== --- mon-contrib.orig/monitors/file/dir_file_age/dir_file_age.monitor 2011-02-15 00:00:47.543386086 +0100 +++ mon-contrib/monitors/file/dir_file_age/dir_file_age.monitor 2011-02-15 00:01:24.114819903 +0100 @@ -1,4 +1,4 @@ -#!/usr/local/bin/perl +#!/usr/bin/perl # # mon monitor to watch for "old" files in one or more directories # original use was to monitor DNS zone transfers, Index: mon-contrib/monitors/http/http_integrity/http_integrity.monitor =================================================================== --- mon-contrib.orig/monitors/http/http_integrity/http_integrity.monitor 2011-02-15 00:01:30.774716790 +0100 +++ mon-contrib/monitors/http/http_integrity/http_integrity.monitor 2011-02-15 00:01:40.626564255 +0100 @@ -1,4 +1,4 @@ -#!/usr/local/bin/perl +#!/usr/bin/perl # # NAME # http_integrity.monitor Index: mon-contrib/monitors/informix/informixdbspace/informixdbspace.monitor =================================================================== --- mon-contrib.orig/monitors/informix/informixdbspace/informixdbspace.monitor 2011-02-15 00:02:12.214075161 +0100 +++ mon-contrib/monitors/informix/informixdbspace/informixdbspace.monitor 2011-02-15 00:02:31.697773458 +0100 @@ -1,4 +1,4 @@ -#!/usr/local/bin/perl -w +#!/usr/bin/perl -w # # $Id: informixdbspace.monitor,v 1.1.1.1 2005/02/18 17:52:24 trockij Exp $ # Usage: server:KBfree [server:KBfree] @@ -81,4 +81,4 @@ print join (", ", @failures), "\n"; exit 1; } -exit 0; \ No newline at end of file +exit 0; debian/patches/05-add-smblist-monitor.diff0000644000000000000000000000554111741435572015577 0ustar Description: Add smblist.monitor Author: Dario Minnucci Last-Update: 2011-02-16 Index: mon-contrib/monitors/samba/smblist.monitor =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 +++ mon-contrib/monitors/samba/smblist.monitor 2011-02-16 21:41:46.762288927 +0100 @@ -0,0 +1,84 @@ +#!/usr/bin/perl -w +# +# run "smbclient -N -L host" or "smbclient //host/ password -U username -L host" +# on a bunch of hosts. For use with "mon". +# +# Arguments are "host [-u username -p password] [host...]" +# +# The password is public property! It should not be a valuable one. +# +# Copyright (C) 2001, Matthew Astley +# Hacked from Jim Trocki's tcp.monitor +# +# 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 + + +use strict; + +my %failures = (); + +my $TIMEOUT = 20; +my $ALARM = 0; + +my ($user, $pass); + +if ( $ARGV[0] eq '-u' && $ARGV[2] eq '-p' ) { + $user = $ARGV[1]; + $pass = $ARGV[3]; + splice @ARGV, 0, 4; +} + +foreach my $host (@ARGV) { + my ($txt, $ret); + my $credentials = (defined $user ? "$pass -U $user" : "-N"); + my $cmd = "smbclient //$host/ $credentials -L $host"; + eval { + local $SIG{"ALRM"} = sub { die "alarm\n" }; + alarm $TIMEOUT; + + $txt = `$cmd 2>&1`; + $ret = $?; + + alarm 0; + }; + + if ($@) { + $failures{$host} = + ($@ eq "alarm\n" ? "timeout" : "unknown error $@"); + next; + } + + if ($ret != 0) { + $failures{$host} = sprintf("> %s\nReturncode 0x%X\n", $cmd, $ret); + $failures{$host} .= $txt if defined $txt; + next; + } + + # If we gave a username, then we don't expect to be refused the shares list + # (some servers give the share list anyway, but Win2k upwards seem to require a valid user) + if ( ($txt =~ /Error returning browse list/ || + $txt =~ /NT_STATUS_ACCESS_DENIED/ ) && + defined $user ) + { + $failures{$host} = "> $cmd\n$txt"; # maybe a little too verbose + } +} + +exit 0 unless scalar %failures; + +print join " ", sort keys %failures; +print "\n\n", join ("\n", map { ">> $_\n$failures{$_}" } sort keys %failures), "\n"; + +exit 1; debian/patches/05-extract-README-info-form-informix.monitor.diff0000644000000000000000000001011711741435572021520 0ustar Description: Extract README info from informix.monitor Author: Dario Minnucci Last-Update: 2011-02-16 Index: mon-contrib/monitors/informix/informix/informix.monitor =================================================================== --- mon-contrib.orig/monitors/informix/informix/informix.monitor 2011-02-16 22:17:21.341933547 +0100 +++ mon-contrib/monitors/informix/informix/informix.monitor 2011-02-16 22:18:21.417028547 +0100 @@ -1,65 +1,46 @@ -From clay@panix.com Mon Aug 23 06:52:13 1999 -Date: Thu, 5 Aug 1999 10:55:52 -0400 -From: Clay Irving -To: mon@linux.kernel.org -Subject: Monitor for INFORMIX IDS Database - -I hacked this monitor together yesterday to monitor online status of -several INFORMIX databases at work. I'd like to donate it to the growing -collection of monitors... - -It requires DBI and DBD::Informix. - - #!/usr/local/bin/perl - # - # Monitor online status of INFORMIX IDS - # - # Arguements are "database@server" - # - # $Id: informix.monitor,v 1.1.1.1 2005/02/18 17:52:24 trockij Exp $ - # - # Copyright (C) 1999, SKECHERS USA, Inc. - # - # 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 - # - - use DBI; - - chomp($parm = $ARGV[0]); - ($database, $server) = split /\@/, $parm; - - # Set environment variables - $ENV{LD_LIBRARY_PATH} = "/usr/informix/prod/lib:/usr/informix/prod/lib/esql"; - $ENV{INFORMIXDIR} = "/usr/informix/prod"; - $ENV{INFORMIXSERVER} = "$server"; - - # Attempt to connect to the database and get the database name - $dbh = DBI->connect($database, $username, $password, 'Informix'); - - if (defined $dbh->{Name}) { - $dbh->disconnect; - exit 0; - } else { - print "$parm is down\n"; - exit 1; - } - - --- -Clay Irving -Witchcraft always has a hard time, until it becomes respectable and -changes its name. -- Charles Fort +#!/usr/bin/perl +# +# Monitor online status of INFORMIX IDS +# +# Arguements are "database@server" +# +# $Id: informix.monitor,v 1.1.1.1 2005/02/18 17:52:24 trockij Exp $ +# +# Copyright (C) 1999, SKECHERS USA, Inc. +# +# 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 +# + +use DBI; + +chomp($parm = $ARGV[0]); +($database, $server) = split /\@/, $parm; + +# Set environment variables +$ENV{LD_LIBRARY_PATH} = "/usr/informix/prod/lib:/usr/informix/prod/lib/esql"; +$ENV{INFORMIXDIR} = "/usr/informix/prod"; +$ENV{INFORMIXSERVER} = "$server"; + +# Attempt to connect to the database and get the database name +$dbh = DBI->connect($database, $username, $password, 'Informix'); + +if (defined $dbh->{Name}) { + $dbh->disconnect; + exit 0; +} else { + print "$parm is down\n"; + exit 1; +} debian/patches/05-extract-README-info-from-smtp_rt.monitor.diff0000644000000000000000000000776611741435572021375 0ustar Description: Extract README info from smtp_rt.monitor Author: Dario Minnucci Last-Update: 2011-02-16 Index: mon-contrib/monitors/smtp/smtp_rt/smtp_rt.monitor =================================================================== --- mon-contrib.orig/monitors/smtp/smtp_rt/smtp_rt.monitor 2011-02-16 22:36:06.076692010 +0100 +++ mon-contrib/monitors/smtp/smtp_rt/smtp_rt.monitor 2011-02-16 22:37:14.847637832 +0100 @@ -1,44 +1,3 @@ -From ctbates@tva.gov Mon Aug 23 06:55:41 1999 -Date: Thu, 08 Jul 1999 11:03:40 -0400 -From: Tom Bates -To: mon@linux.kernel.org, meir@education.gov.il -Subject: Repost of smtp_rt.monitor - -My previous attempt to post this did not make it out of our MS email -system intact. Here it is again: - -I modified smpt.monitor to watch an email gateway between smpt and MS -Exchange, but presumably it could watch any email gateway. -smtp_rt.monitor sends an empty message to the monitored mailbox beyand -the gateway (monitored_mailbox@yourdomain.com), which sends a return -receipt back to a mailbox on the MON host, which has a .forward file -piped to mail_handler (e.g., |/home/yourname/mail_handler) which handles -the return receipt and lets the monitor know that the round-trip was -successful. - -Tom Bates -TVA -=============.forward============== -|/home/yourname/mail_handler -=============end .forward============== - -=============mail_handler============== -#!/usr/bin/perl -@msg = ; -$x = 0; -while ($x < @msg) { - if ($msg[$x] =~/^Subject:/) { - $msg[$x] =~s/^Subject: Delivered: //; - $timestamp = $msg[$x]; - chop ($timestamp); - } -$x++; -} -open (OUTFILE, ">/tmp/$timestamp"); -close (OUTFILE); -=============end mail_handler============== - -=============smtp_rt.monitor============== #!/usr/bin/perl # smpt_rt.monitor # Tries to connect to a SMTP server, send a timestamped message, and @@ -66,10 +25,8 @@ # # Copyright (C) 1998, Jim Trocki # -# 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 +# 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. # @@ -80,8 +37,7 @@ # # 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 +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # use Getopt::Std; use English; @@ -122,13 +78,11 @@ $Path = '/'; -############################################################### eval { local $SIG{ALRM} = sub { die "Timeout Alarm" }; alarm $TIMEOUT; - $result = &OpenSocket($Server, $Port); # Open a connection to the -server + $result = &OpenSocket($Server, $Port); # Open a connection to the server if ($result == 0) { # Failure to open the socket return ''; } @@ -226,12 +180,9 @@ $OurHostname = &hostname; ($name, $aliases, $proto) = getprotobyname('tcp'); - ($name, $aliases, $Port) = getservbyname($Port, 'tcp') unless $Port -=~ /^\d+$/; - ($name, $aliases, $type, $len, $ThisAddr) = -gethostbyname($OurHostname); - ($name, $aliases, $type, $len, $OtherHostAddr) = -gethostbyname($OtherHostname); + ($name, $aliases, $Port) = getservbyname($Port, 'tcp') unless $Port =~ /^\d+$/; + ($name, $aliases, $type, $len, $ThisAddr) = gethostbyname($OurHostname); + ($name, $aliases, $type, $len, $OtherHostAddr) = gethostbyname($OtherHostname); $sockaddr = 'S n a4 x8'; # Format for packed network address $that = pack($sockaddr, &AF_INET, $Port, $OtherHostAddr); @@ -243,5 +194,3 @@ select(S); $| = 1; select(STDOUT); # set S to be un-buffered return 1; # success } -=============end smtp_rt.monitor============== - debian/patches/05-extract-README-info-from-sqlconn.monitor.diff0000644000000000000000000000321211741435572021340 0ustar Description: Extract README info from sqlconn.monitorr Author: Dario Minnucci Last-Update: 2011-02-16 Index: mon-contrib/monitors/oracle/sqlconn/sqlconn.monitor =================================================================== --- mon-contrib.orig/monitors/oracle/sqlconn/sqlconn.monitor 2011-02-16 22:24:07.007722041 +0100 +++ mon-contrib/monitors/oracle/sqlconn/sqlconn.monitor 2011-02-16 22:24:30.555360604 +0100 @@ -1,40 +1,4 @@ -From duncanl@demon.net Mon Aug 23 06:51:17 1999 -Date: Fri, 06 Aug 1999 15:59:30 +0100 -From: Duncan Lawie -To: mon@linux.kernel.org -Subject: sqlconn.monitor - -Hi, - -herewith a monitor which checks on sqlnet connections. It uses DBI but, -as it stands, is coded in an Oracle-specific way. The matching mon.cf -lines would look something like this - -hostgroup first_db second_db - -watch ora_dbs - service sqlconnect - interval 15m - monitor sqlconn.monitor - period wd {Mon-Fri} hr {9am-5pm} - alert mail.alert duncanl@demon.net - alertevery 1h - period wd {Sat-Sun} - alert mail.alert duncanl@demon.net - -There is an element of hack in that the hostgroup is actually a list of -database names, not unix hosts. - -I am a little uncomfortable (as yet) with GPL, but as I understand it I -can sidestep the issue by making this open source under the terms of -perl. I also understand that if it were intergrated into mon it would -them be distributed under the GPL along with mon. Can anyone offer me -enlightenment on this issue? - -Duncan. - - -#!/usr/local/bin/perl -w +#!/usr/bin/perl -w # # Monitor sqlnet connection # debian/patches/series0000644000000000000000000000060711741435572012046 0ustar 00-update-ospf.monitor.diff 00-update-rbl-monitor.diff 00-replacement-for-softraid.monitor.diff 00-sms.alert.copyright.README.diff 05-extract-README-info-form-informix.monitor.diff 01-fix-wrong-path-for-interpreter.diff 05-add-smblist-monitor.diff 05-extract-README-info-from-sqlconn.monitor.diff 05-extract-README-info-from-smtp_rt.monitor.diff 00-replacement-for-dir_file_age.monitor.diff debian/rules0000755000000000000000000000453111741435572010262 0ustar #!/usr/bin/make -f # -*- makefile -*- # Sample debian/rules that uses debhelper. # This file was originally written by Joey Hess and Craig Small. # As a special exception, when this file is copied by dh-make into a # dh-make output file, you may use that output file without restriction. # This special exception was added by Craig Small in version 0.37 of dh-make. # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 ALERT_LIST_ORIG := $(shell find alerts -name "*.alert" -print) ALERT_LIST_DOCS := $(shell find alerts -name "*.README" -print) MONITOR_LIST_ORIG := $(shell find monitors -name "*.monitor" -print) MONITOR_LIST_DOCS := $(shell find monitors -name "*.README" -print) %: dh $@ override_dh_auto_install: ######################################################################### # PROCESSING ALERTS ######################################################################### @for i in $(ALERT_LIST_ORIG) ; do \ echo "# [A] Installing : $$i" ; \ install -m 755 $$i debian/mon-contrib/usr/lib/mon-contrib/alert.d; \ done # # Install alerts docs # @for i in $(ALERT_LIST_DOCS) ; do \ echo "# [A] Installing : $$i" ; \ install -m 644 $$i debian/mon-contrib/usr/share/doc/mon-contrib/alerts; \ done # # Link alerts # @for i in $(ALERT_LIST_ORIG) ; do \ alert=`basename $$i` ; \ src=`echo /usr/lib/mon-contrib/alert.d/$$alert` ; \ dst=`echo /usr/lib/mon/alert.d/$$alert` ; \ echo "# [A] Linking : $$src to $$dst" ; \ dh_link $$src $$dst ; \ done ######################################################################### # PROCESSING MONITORS ######################################################################### @for i in $(MONITOR_LIST_ORIG) ; do \ echo "# [M] Installing : $$i" ; \ install -m 755 $$i debian/mon-contrib/usr/lib/mon-contrib/mon.d; \ done # # Install monitor docs # @for i in $(MONITOR_LIST_DOCS) ; do \ echo "# [M] Installing : $$i" ; \ install -m 644 $$i debian/mon-contrib/usr/share/doc/mon-contrib/monitors; \ done # # Link monitors # @for i in $(MONITOR_LIST_ORIG) ; do \ monitor=`basename $$i` ; \ src=`echo /usr/lib/mon-contrib/mon.d/$$monitor` ; \ dst=`echo /usr/lib/mon/mon.d/$$monitor` ; \ echo "# [M] Linking : $$src to $$dst" ; \ dh_link $$src $$dst ; \ done # # Installing *.html documents # install -m 644 *.html debian/mon-contrib/usr/share/doc/mon-contrib/html debian/source/0000755000000000000000000000000011741435572010477 5ustar debian/source/format0000644000000000000000000000001411741435572011705 0ustar 3.0 (quilt) debian/watch0000644000000000000000000000013011741435572010222 0ustar version=3 opts=dversionmangle=s/\+dfsg// \ http://sf.net/mon/mon-contrib-(.*)\.tar\.gz