remove source-dist branch
This commit is contained in:
commit
27dcec3fa7
416 changed files with 128456 additions and 0 deletions
39
debian/README.Debian
vendored
Normal file
39
debian/README.Debian
vendored
Normal file
|
@ -0,0 +1,39 @@
|
|||
================================================================================
|
||||
nagios-plugins for Debian
|
||||
================================================================================
|
||||
|
||||
below is a collection of various bits of information that might be
|
||||
helpful to users of nagios-plugins in debian.
|
||||
|
||||
================================================================================
|
||||
different plugin packages and how to avoid installing massive dependencies
|
||||
================================================================================
|
||||
|
||||
if you're frustrated by all the crap being brought in by nagios-plugins (for
|
||||
example if you're installing nrpe or nsca on a remote host), try the
|
||||
nagios-plugins-basic package.
|
||||
|
||||
================================================================================
|
||||
plugins needing root privilege
|
||||
================================================================================
|
||||
|
||||
the check_dhcp and check_icmp plugins require root privileges to
|
||||
run, because of the low-level packet mangling that they perform.
|
||||
but, in the interest of the "safe default", these plugins will not
|
||||
be installed with the suid bit set. there are two recommended ways
|
||||
about overriding this on your system:
|
||||
|
||||
- set the suid bit with dpkg-statoverride:
|
||||
|
||||
# dpkg-statoverride --update --add root nagios 4750 $plugin
|
||||
|
||||
where $plugin is the specific plugin you want to grant such privileges.
|
||||
|
||||
- use sudo to grant the permissions and modify your plugin config
|
||||
|
||||
of these two, the first is recommended because it's the simplest and
|
||||
has the same effect as the second.
|
||||
|
||||
|
||||
-- sean finney <seanius@debian.org> Thu, 06 Oct 2005 04:48:16 -0400
|
||||
|
28
debian/TODO
vendored
Normal file
28
debian/TODO
vendored
Normal file
|
@ -0,0 +1,28 @@
|
|||
|
||||
After sarge:
|
||||
|
||||
- Remove the possibility to build with fileutils.
|
||||
|
||||
- Now /usr/share/nagios/pluginconfig -> /etc/nagios-plugins/config
|
||||
Remove the symlink af and conflict with nagios < (ver that reads from /etc)
|
||||
|
||||
|
||||
These are the plugins which miss .cfg files: add them if someone asks:
|
||||
|
||||
/usr/lib/nagios/plugins/check_ups
|
||||
/usr/lib/nagios/plugins/check_mysql
|
||||
/usr/lib/nagios/plugins/check_swap
|
||||
/usr/lib/nagios/plugins/check_dig
|
||||
/usr/lib/nagios/plugins/check_breeze
|
||||
/usr/lib/nagios/plugins/check_disk_smb
|
||||
/usr/lib/nagios/plugins/check_ircd
|
||||
/usr/lib/nagios/plugins/check_log
|
||||
/usr/lib/nagios/plugins/check_oracle
|
||||
/usr/lib/nagios/plugins/check_sensors
|
||||
/usr/lib/nagios/plugins/check_wave
|
||||
/usr/lib/nagios/plugins/check_mailq
|
||||
/usr/lib/nagios/plugins/check_simap
|
||||
/usr/lib/nagios/plugins/check_spop
|
||||
|
||||
|
||||
|
353
debian/changelog
vendored
Normal file
353
debian/changelog
vendored
Normal file
|
@ -0,0 +1,353 @@
|
|||
nagios-plugins (1.4.2-5) unstable; urgency=low
|
||||
|
||||
* Sean Finney
|
||||
- add documentation to README.Debian about the plugins needing setuid
|
||||
root, why we don't install them setuid root by default, and some
|
||||
recommended methods for dealing with this (closes: #289879).
|
||||
- add documentation to README.Debian about the new package split.
|
||||
- config.h_debiandefaults.dpatch now modifies common.h instead of
|
||||
config.h.in, because the latter would sometimes cause build hosts
|
||||
to spontaneously regenerate the file, overwriting our changes.
|
||||
since all the plugins include common.h too... (closes: #336639).
|
||||
- include some patches from "F.A.G. Luteijn" <f.a.g.luteijn@knoware.nl>:
|
||||
* dhcp.cfg (with notes added by me about needing setuid)
|
||||
* disk.cfg (check_all_disks)
|
||||
* disk-smb.cfg (seperated check_disk_smb commands)
|
||||
* http.cfg (check_https_auth)
|
||||
* check_disk_smb: allow checking disk usage via host addresses.
|
||||
(closes: #310780).
|
||||
|
||||
-- sean finney <seanius@debian.org> Mon, 31 Oct 2005 22:35:16 +0100
|
||||
|
||||
nagios-plugins (1.4.2-4) unstable; urgency=low
|
||||
|
||||
* Sean Finney:
|
||||
- only depend on ntp, not ntp | ntp-simple. hopefully this should
|
||||
allow nagios-plugins to co-exist with openntpd et al.
|
||||
- now building against libmysqlclient14-dev.
|
||||
- updated Standards-Version to 3.6.2
|
||||
- nagios-plugins is now separated into 3 separate packages:
|
||||
nagios-plugins, nagios-plugins-basic, and nagios-plugins-standard.
|
||||
this should provide folks with a "basic" set of plugins as an
|
||||
alternative to those who don't want to bring in so many dependencies
|
||||
(specifically, users of nsca and nagios-nrpe-server). the original
|
||||
package will depend on both of the new packages, for backwards
|
||||
compatibility. the list of what-goes-where may change in future
|
||||
updates, but nagios-plugins will always bring in everything.
|
||||
contact me if you have specific preferences on how the layout should
|
||||
be done (closes: #303996, #264194, #255438).
|
||||
- another fix to check_mrtg, seems like the WARN and CRIT states
|
||||
were working just fine, but there was no way for things to
|
||||
be OK. whoops. thanks to uno takeshi for looking into this.
|
||||
(closes: #335871).
|
||||
- updated FSF address, couple other cosmetic lintian-related fixes.
|
||||
|
||||
-- sean finney <seanius@debian.org> Wed, 26 Oct 2005 23:17:41 +0200
|
||||
|
||||
nagios-plugins (1.4.2-3) unstable; urgency=low
|
||||
|
||||
* Sean Finney:
|
||||
- include fix from Modesto Alexandre to correct paths in check_log
|
||||
(closes: #296600).
|
||||
- looks like upstream's check_mrtg has been broken for a while now.
|
||||
now including a fix that i'll eventually move upstream.
|
||||
(closes: #309673).
|
||||
- include a fix to check_smtp to make it speak proper ehlo before
|
||||
issueing a starttls command, and also check that the server
|
||||
actually supports it before blindly continuing. thanks to
|
||||
Jeroen van Wolffelaar for taking the time to point out the
|
||||
details (closes: #285554).
|
||||
- in the process of the above, also figured out how to get
|
||||
check_smtp to play nicely with gnutls-based servers.
|
||||
- check_disk once again will match non-mountpoint directories to
|
||||
the closest parent mountpoint (closes: #296278).
|
||||
- include jeroen's "less beastly" check_ntp sys.peer regex.
|
||||
- fix for braindead command-line option parsing for freespace
|
||||
in check_disk_smb (closes: #300701).
|
||||
- updated the usage function in check_game to reflect changed
|
||||
cmdline options (closes: #307905).
|
||||
- upstream is now shipping an non-broken ipv6-capable check_ping,
|
||||
with PING6_COMMAND properly set in config.h (closes: #309255).
|
||||
- upstream check_mysql can now check slave status (closes: #278864).
|
||||
|
||||
-- sean finney <seanius@debian.org> Tue, 11 Oct 2005 10:14:18 +0200
|
||||
|
||||
nagios-plugins (1.4.2-2) unstable; urgency=low
|
||||
|
||||
* Sean Finney:
|
||||
- ack, the perl plugins broke on the last upload, because "use lib"
|
||||
wasn't being properly substituted in. fixed. (closes: #332667).
|
||||
- include upstream fix for check_ups temperature perfdata. thanks
|
||||
to Chris AtLee for originally reporting this (closes: #316534).
|
||||
- stop mucking around with config.sub/config.guess in debian/rules.
|
||||
- last update in the changelog was missing a colon on the following:
|
||||
(closes: #312228, #306244, #308458, #327212, #316882).
|
||||
- have check_mysql read in defaults from my.cnf (closes: #278817).
|
||||
|
||||
-- sean finney <seanius@debian.org> Fri, 07 Oct 2005 22:19:09 +0200
|
||||
|
||||
nagios-plugins (1.4.2-1) unstable; urgency=low
|
||||
|
||||
* New upstream release.
|
||||
* Sean Finney:
|
||||
- now managing nagios-plugins as part of the pkg-nagios alioth project.
|
||||
- updated Maintainer field
|
||||
- updated build-dependencies to build against libsnmp9-dev
|
||||
- removed build-dependencies on exim4 | mail-transport-agent, ssh, fping,
|
||||
qstat, smbclient, and ntp stuff. instead they are all have their
|
||||
paths hardcoded into the build-process via dpatch file
|
||||
10_config.h_debiandefaults.dpatch (closes: #312333, #297708).
|
||||
- added config option for ssmtp
|
||||
- upstream is now accidentally deleting the check_ldaps plugin
|
||||
during the build-process. whoops.
|
||||
- removed unneccesary dpatch 09_pssyntax, massaged 08_subst.dpatch
|
||||
into shape with new upstream version.
|
||||
- added check_mysql_cmdlinecred to allow parsing of credentials on
|
||||
the cmdline (closes: #314913).
|
||||
- looks like the issue with check_load was previously resolved by
|
||||
guido (closes: #305351).
|
||||
- nagios and nagios-plugins no longer need to use update-nagios, as nagios
|
||||
can natively scan /etc/nagios-plugins/config now:
|
||||
(closes: #325893, #321939).
|
||||
- i believe check_ldap's config is now correct (closes: #305720).
|
||||
- removed references to check_nmap, which is generally superceded
|
||||
by check_tcp. it still exists in the contrib directory of the
|
||||
source, which may at some point be put in /usr/share/doc for those
|
||||
who really want it (closes: #319997).
|
||||
- include de.po patch from jens seidel (closes: #313960).
|
||||
- upstream fix: all of the plugins should now be properly setting
|
||||
locales, so problems like commas for decimal seperators should no
|
||||
longer break plugins for people in certain locales:
|
||||
(closes #312228, #306244, #308458, #327212, #316882).
|
||||
- upstream fix: check_ntp now supports zero offset (closes: #276794).
|
||||
- upstream fix: divide by zero check for check_swap (closes: #328603).
|
||||
|
||||
-- sean finney <seanius@debian.org> Thu, 06 Oct 2005 05:02:36 -0400
|
||||
|
||||
nagios-plugins (1.4-6) unstable; urgency=low
|
||||
|
||||
* Build-Depend on the *correct* libmysqlclient-dev
|
||||
|
||||
-- Guido Trotter <ultrotter@debian.org> Sun, 8 May 2005 08:12:20 -0700
|
||||
|
||||
nagios-plugins (1.4-5) unstable; urgency=low
|
||||
|
||||
* Fix Build-Dependencies for sarge as per
|
||||
http://lists.debian.org/debian-release/2005/05/msg00442.html and following
|
||||
|
||||
-- Guido Trotter <ultrotter@debian.org> Sat, 7 May 2005 18:19:32 -0700
|
||||
|
||||
nagios-plugins (1.4-4) unstable; urgency=medium
|
||||
|
||||
* The "Upload after it's too late" release
|
||||
* Make nagios-plugins depend on iputils-ping only (closes: #296295)
|
||||
* Urgency medium because it fixes an important bug reported by lots
|
||||
of people, and it doesn't change anything else
|
||||
* This version should be the one sarge ships with, hopefully!
|
||||
|
||||
-- Guido Trotter <ultrotter@debian.org> Tue, 3 May 2005 17:04:39 -0700
|
||||
|
||||
nagios-plugins (1.4-3) unstable; urgency=medium
|
||||
|
||||
* Add back empty imap.cfg (closes: #296249)
|
||||
* Remove --with-ping-command from configure (closes: #296295)
|
||||
* Fix load.cfg (closes: #296254)
|
||||
* Urgency medium because it fixes a segfault in check_ping
|
||||
* Build depend on mail-transport-agent (mailq path) (closes: #297708)
|
||||
|
||||
-- Guido Trotter <ultrotter@debian.org> Mon, 7 Mar 2005 04:31:49 +0000
|
||||
|
||||
nagios-plugins (1.4-2) unstable; urgency=low
|
||||
|
||||
* Add information about update-nagios needed after re-configuration
|
||||
(Shouldn't nagios document this? anyway...) (closes: #291224)
|
||||
* Use --ssl in check_https (closes: #295917)
|
||||
* Fix ps syntax (closes: #296003)
|
||||
|
||||
-- Guido Trotter <ultrotter@debian.org> Sat, 19 Feb 2005 20:22:16 +0000
|
||||
|
||||
nagios-plugins (1.4-1) unstable; urgency=low
|
||||
|
||||
* The "I'm still around" release
|
||||
* New upstream version (closes: #294224)
|
||||
* Remove useless patches:
|
||||
01_ldap21bind
|
||||
04_checkswap
|
||||
03_hostwithnumbers
|
||||
05_checkbreeze
|
||||
07_checkbyssh (apparently it wasn't considered a bug upstream)
|
||||
* Fix argument number in check_ldap (closes: #281700) (Thanks Joerg)
|
||||
* Fix hostname placeholder in mysql.cfg (closes: #281701)
|
||||
* Don't list check_imap twice (closes: #280702)
|
||||
* Add check_https command (closes: #292124)
|
||||
* Add check_dig command (closes: #281020)
|
||||
* Add check_breeze command (closes: #281019)
|
||||
* Add dummy commands (closes: #281018)
|
||||
* Add check_mailq_<MTA> commands for all supported mtas (closes: #281016, #282015)
|
||||
* Add check_spop and check_simap commands (closes: #280700)
|
||||
* Add check_nt command (closes: #294299)
|
||||
* Fix check_load command (closes: #294298)
|
||||
* Fix a reference to @libexec@ in snmp.cfg (closes: #276520)
|
||||
|
||||
-- Guido Trotter <ultrotter@debian.org> Fri, 18 Feb 2005 07:50:28 +0000
|
||||
|
||||
nagios-plugins (1.3.1.0-12) unstable; urgency=low
|
||||
|
||||
* Sorry for the multiple uploads trying to fix the problem...
|
||||
Unfortunately I don't have any !i386 handy. :(
|
||||
* This time #275803 should really be dealt with!
|
||||
|
||||
-- Guido Trotter <ultrotter@debian.org> Wed, 13 Oct 2004 13:59:58 -0700
|
||||
|
||||
nagios-plugins (1.3.1.0-11) unstable; urgency=high
|
||||
|
||||
* Hack subst.in to really solve the incorrect "use lib" on arches !i386
|
||||
forcing the correct (debian) path in (closes: #275803)
|
||||
* urgency set to high because it solves an RC bug in sarge
|
||||
|
||||
-- Guido Trotter <ultrotter@debian.org> Wed, 13 Oct 2004 08:23:53 -0700
|
||||
|
||||
nagios-plugins (1.3.1.0-10) unstable; urgency=low
|
||||
|
||||
* The "Better late than never" release
|
||||
* Include Tom Laermans mysql.cfg in pluginsconfig (closes: #267747)
|
||||
* Include Tom Laermans imap.cfg in pluginsconfig (closes: #267953)
|
||||
* Fix snmp_load typo (thanks to Raoul Borenius) (closes: #270276)
|
||||
* Fix snmp_load typo (thanks to Raoul Borenius) (closes: #270276)
|
||||
* Build-depend on mawk to try fixing #275803 (was that the culprit?)
|
||||
|
||||
-- Guido Trotter <ultrotter@debian.org> Tue, 12 Oct 2004 20:44:51 -0700
|
||||
|
||||
nagios-plugins (1.3.1.0-9) unstable; urgency=high
|
||||
|
||||
* Update debian/watch file
|
||||
* Fix check_breeze (thanks to Peter Palfrader for noticing it was broken)
|
||||
(closes: #265207)
|
||||
* Add to 04_checkswap two patches from Sean Finney plus one from me
|
||||
(to avoid it returning STATE_CRITICAL when no swap is configured)
|
||||
(closes: #265152, #265154)
|
||||
* Also import:
|
||||
- Sven Velt patch for check_ircd (closes: #259720)
|
||||
- Cyril Bouthors patch for check_by_ssh (closes: #257793)
|
||||
* Urgency high so nagios and nagios-plugins stop running one after
|
||||
the other to enter testing
|
||||
* Sorry, the package splitting is still delayed for after sarge
|
||||
|
||||
-- Guido Trotter <ultrotter@debian.org> Thu, 12 Aug 2004 16:13:35 +0200
|
||||
|
||||
nagios-plugins (1.3.1.0-8) unstable; urgency=low
|
||||
|
||||
* Import a backport of check_swap from upstream CVS done by
|
||||
"The Fungi" <fungi@yuggoth.org> to make swap checking 2.6
|
||||
compatible (closes: #261151)
|
||||
* Postpone package splitting, so this version can go in sarge
|
||||
with nagios before we have to wait a bit in the NEW queue
|
||||
|
||||
-- Guido Trotter <ultrotter@debian.org> Sun, 25 Jul 2004 11:34:01 +0200
|
||||
|
||||
nagios-plugins (1.3.1.0-7) unstable; urgency=low
|
||||
|
||||
* Add 03_hostwithnumbers.dpatch written by me to correct the behaviour
|
||||
of is_hostname() in utils.c about host components beginning with a
|
||||
number (closes: #253620). Thanks to Andreas Edler who spotted
|
||||
the problem.
|
||||
|
||||
-- Guido Trotter <ultrotter@debian.org> Tue, 15 Jun 2004 15:37:48 +0200
|
||||
|
||||
nagios-plugins (1.3.1.0-6) unstable; urgency=low
|
||||
|
||||
* Conflict with the current version of nagios (closes: #245607)
|
||||
|
||||
-- Guido Trotter <ultrotter@debian.org> Sat, 24 Apr 2004 12:01:59 +0200
|
||||
|
||||
nagios-plugins (1.3.1.0-5) unstable; urgency=low
|
||||
|
||||
* Move plugin configuration to /etc/nagios-plugins/config
|
||||
* For the time beeing symlink from the original directory
|
||||
|
||||
This should help nagios closing #241807
|
||||
|
||||
-- Guido Trotter <ultrotter@debian.org> Fri, 23 Apr 2004 09:06:51 +0200
|
||||
|
||||
nagios-plugins (1.3.1.0-4) unstable; urgency=low
|
||||
|
||||
* Fix not considered args and broken example in check_disk (closes: #241833)
|
||||
|
||||
-- Guido Trotter <ultrotter@debian.org> Mon, 5 Apr 2004 10:34:37 +0200
|
||||
|
||||
nagios-plugins (1.3.1.0-3) unstable; urgency=low
|
||||
|
||||
* Take parameters for basic check_ping (closes: #238670)
|
||||
* Add ssh.cfg and ldap.cfg (closes: #236781)
|
||||
|
||||
-- Guido Trotter <ultrotter@debian.org> Sat, 3 Apr 2004 18:03:38 +0200
|
||||
|
||||
nagios-plugins (1.3.1.0-2) unstable; urgency=low
|
||||
|
||||
* Recommend nagios-text | nagios
|
||||
* Remove notify.cfg from distributed config files (closes: #234951)
|
||||
|
||||
-- Guido Trotter <ultrotter@debian.org> Thu, 26 Feb 2004 22:41:56 +0100
|
||||
|
||||
nagios-plugins (1.3.1.0-1) unstable; urgency=low
|
||||
|
||||
* The "lintian clean it" release
|
||||
* Upstream version is 1.3.1, i've incremented the version number a bit in
|
||||
order to upload a new source without the CVS directories, and so let
|
||||
lintian not complain...
|
||||
|
||||
-- Guido Trotter <ultrotter@debian.org> Tue, 24 Feb 2004 19:37:09 +0100
|
||||
|
||||
nagios-plugins (1.3.1-6) unstable; urgency=low
|
||||
|
||||
* Depend only on ntp-simple instead of ntp (closes: #233267)
|
||||
* Also in build-dependency use ntp-simple rather than ntp
|
||||
|
||||
-- Guido Trotter <ultrotter@debian.org> Tue, 17 Feb 2004 21:03:58 +0100
|
||||
|
||||
nagios-plugins (1.3.1-5) unstable; urgency=low
|
||||
|
||||
* Adapt the choosen ping command to the fact that configure
|
||||
doesn't set PING_PACKETS_FIRST when PING_COMMAND is passed
|
||||
from the command line (closes: #233010)
|
||||
|
||||
-- Guido Trotter <ultrotter@debian.org> Mon, 16 Feb 2004 13:19:20 +0100
|
||||
|
||||
nagios-plugins (1.3.1-4) unstable; urgency=low
|
||||
|
||||
* Pass --with-ping-command to configure, and relax the dependency on ping.
|
||||
* Export a sane $PATH and pass it to configure (closes: #232498)
|
||||
* Give full path of libexec dir to configure (closes: #232436)
|
||||
* Remove empty dirs from debian/dirs
|
||||
* Ship command configuration in /usr/share/nagios/pluginconfig
|
||||
These files are generated passing the upstream command.cfg to
|
||||
nagios' convertcfg, and then splitted up manually removing
|
||||
definitions already shipped with nagios. Thanks to Nate Allen
|
||||
who found out the solution. (closes: #232300)
|
||||
|
||||
-- Guido Trotter <ultrotter@debian.org> Sat, 14 Feb 2004 13:20:55 +0100
|
||||
|
||||
nagios-plugins (1.3.1-3) unstable; urgency=low
|
||||
|
||||
* Remove dependency on non-existent package "dqs"
|
||||
* Pass --with-df-command="/bin/df -Pk" to configure, since compiling
|
||||
on the autobuilders doesn't detect that (why?)
|
||||
* Build-depend also on libkrb5-dev
|
||||
|
||||
-- Guido Trotter <ultrotter@debian.org> Wed, 11 Feb 2004 17:03:23 +0100
|
||||
|
||||
nagios-plugins (1.3.1-2) unstable; urgency=low
|
||||
|
||||
* Add some missing build dependencies that prevented nagios-plugins
|
||||
from compiling
|
||||
|
||||
-- Guido Trotter <ultrotter@debian.org> Wed, 11 Feb 2004 12:41:13 +0100
|
||||
|
||||
nagios-plugins (1.3.1-1) unstable; urgency=low
|
||||
|
||||
* Initial Release (closes: #208218)
|
||||
* I prefer having all the plugins in a single package: the installation size
|
||||
is not so terrible
|
||||
|
||||
-- Guido Trotter <ultrotter@debian.org> Sun, 1 Feb 2004 10:32:04 +0100
|
||||
|
1
debian/compat
vendored
Normal file
1
debian/compat
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
4
|
75
debian/control
vendored
Normal file
75
debian/control
vendored
Normal file
|
@ -0,0 +1,75 @@
|
|||
Source: nagios-plugins
|
||||
Section: net
|
||||
Priority: extra
|
||||
Maintainer: Debian Nagios Maintainer Group <pkg-nagios-devel@lists.alioth.debian.org>
|
||||
Uploaders: sean finney <seanius@debian.org>, Guido Trotter <ultrotter@debian.org>
|
||||
Build-Depends: debhelper (>= 4.0.0), dpatch (>= 2.0.9), libldap2-dev, postgresql-dev, libmysqlclient14-dev | libmysqlclient-dev, libsnmp9-dev | libsnmp-dev, libradius1-dev, libkrb5-dev, libnet-snmp-perl, procps, coreutils | fileutils, iputils-ping, dnsutils, bind9-host | host, snmp, mawk | awk
|
||||
Standards-Version: 3.6.2
|
||||
|
||||
Package: nagios-plugins
|
||||
Architecture: any
|
||||
Depends: nagios-plugins-basic, nagios-plugins-standard
|
||||
Suggests: nagios-text | nagios
|
||||
Description: Plugins for the nagios network monitoring and management system
|
||||
Nagios is a host/service/network monitoring and management system. It has
|
||||
the following features:
|
||||
.
|
||||
* Monitoring of network services (via TCP port, SMTP, POP3, HTTP, NNTP,
|
||||
PING, etc.)
|
||||
* Plugin interface to allow for user-developed service checks
|
||||
* Contact notifications when problems occur and get resolved (via email,
|
||||
pager, or user-defined method)
|
||||
* Ability to define event handlers to be run during service or host events
|
||||
(for proactive problem resolution)
|
||||
* Web output (current status, notifications, history, log file, etc.)
|
||||
.
|
||||
This meta-package will install the entire suite of plugins for nagios.
|
||||
If you are installing nagios plugins on a remote "satellite" server
|
||||
(using nagios-nrpe-server or nsca), you may be interested in the
|
||||
nagios-plugins-basic package.
|
||||
|
||||
Package: nagios-plugins-basic
|
||||
Architecture: any
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}, procps
|
||||
Conflicts: nagios-plugins (<= 1.4.2-3)
|
||||
Replaces: nagios-plugins
|
||||
Suggests: nagios-text | nagios
|
||||
Description: Plugins for the nagios network monitoring and management system
|
||||
Nagios is a host/service/network monitoring and management system. It has
|
||||
the following features:
|
||||
.
|
||||
* Monitoring of network services (via TCP port, SMTP, POP3, HTTP, NNTP,
|
||||
PING, etc.)
|
||||
* Plugin interface to allow for user-developed service checks
|
||||
* Contact notifications when problems occur and get resolved (via email,
|
||||
pager, or user-defined method)
|
||||
* Ability to define event handlers to be run during service or host events
|
||||
(for proactive problem resolution)
|
||||
* Web output (current status, notifications, history, log file, etc.)
|
||||
.
|
||||
This package provides a basic set of plugins with minimal external
|
||||
dependencies. It is not likely to be useful by itself unless you are
|
||||
installing a remote "satellite" server (using nagios-nrpe-server or nsca,
|
||||
for example).
|
||||
|
||||
Package: nagios-plugins-standard
|
||||
Architecture: any
|
||||
Conflicts: nagios-plugins (<= 1.4.2-3)
|
||||
Replaces: nagios-plugins
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}, fping, qstat, snmp, radiusclient1, libnet-snmp-perl, iputils-ping, dnsutils, bind9-host | host, ntpdate, ntp, smbclient
|
||||
Suggests: nagios-text | nagios
|
||||
Description: Plugins for the nagios network monitoring and management system
|
||||
Nagios is a host/service/network monitoring and management system. It has
|
||||
the following features:
|
||||
.
|
||||
* Monitoring of network services (via TCP port, SMTP, POP3, HTTP, NNTP,
|
||||
PING, etc.)
|
||||
* Plugin interface to allow for user-developed service checks
|
||||
* Contact notifications when problems occur and get resolved (via email,
|
||||
pager, or user-defined method)
|
||||
* Ability to define event handlers to be run during service or host events
|
||||
(for proactive problem resolution)
|
||||
* Web output (current status, notifications, history, log file, etc.)
|
||||
.
|
||||
This package provides the suite of plugins that are most likely to be
|
||||
useful on a central nagios host.
|
38
debian/copyright
vendored
Normal file
38
debian/copyright
vendored
Normal file
|
@ -0,0 +1,38 @@
|
|||
This package was debianized by Guido Trotter <ultrotter@debian.org> on
|
||||
Sun, 1 Feb 2004 10:05:51 +0100.
|
||||
|
||||
It was downloaded from http://nagiosplug.sourceforge.net/
|
||||
|
||||
Upstream Authors: 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
|
||||
Sean Finney
|
||||
|
||||
Copyright:
|
||||
|
||||
This package 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; version 2 dated June, 1991.
|
||||
|
||||
This package 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 package; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
|
||||
On Debian systems, the complete text of the GNU General
|
||||
Public License can be found in `/usr/share/common-licenses/GPL'.
|
||||
|
1
debian/dirs
vendored
Normal file
1
debian/dirs
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
etc/nagios-plugins/config
|
6
debian/docs
vendored
Normal file
6
debian/docs
vendored
Normal file
|
@ -0,0 +1,6 @@
|
|||
FAQ
|
||||
NEWS
|
||||
README
|
||||
LEGAL
|
||||
REQUIREMENTS
|
||||
SUPPORT
|
2
debian/nagios-plugins-basic.dirs
vendored
Normal file
2
debian/nagios-plugins-basic.dirs
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
usr/lib/nagios/plugins
|
||||
etc/nagios-plugins/config
|
2
debian/nagios-plugins-standard.dirs
vendored
Normal file
2
debian/nagios-plugins-standard.dirs
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
usr/lib/nagios/plugins
|
||||
etc/nagios-plugins/config
|
14
debian/patches/00list
vendored
Normal file
14
debian/patches/00list
vendored
Normal file
|
@ -0,0 +1,14 @@
|
|||
06_checkircd
|
||||
10_config.h_debiandefaults.dpatch
|
||||
11_check_ups.c_perfdata_fix.dpatch
|
||||
12_check_mysql.c_mysql_options.dpatch
|
||||
13_subst.in_again.dpatch
|
||||
14_check_log_paths.dpatch
|
||||
15_check_mrtg_wtf_conditionals.dpatch
|
||||
16_check_smtp_protocolfix.dpatch
|
||||
17_check_smb_freespace.dpatch
|
||||
18_check_game_cmdline.dpatch
|
||||
19_check_disk_subdirs.dpatch
|
||||
20_check_ntp_lessbeastlyregex.dpatch
|
||||
21_de.po_fixes.dpatch
|
||||
22_check_smb_hostaddress.dpatch
|
33
debian/patches/02_utilspm.dpatch
vendored
Normal file
33
debian/patches/02_utilspm.dpatch
vendored
Normal file
|
@ -0,0 +1,33 @@
|
|||
#!/bin/sh -e
|
||||
## 02_utilspm.dpatch by Guido Trotter <ultrotter@debian.org>
|
||||
##
|
||||
## All lines beginning with `## DP:' are a description of the patch.
|
||||
## DP: Correct utils.pm script to begin with #!/usr/bin/perl
|
||||
|
||||
if [ $# -lt 1 ]; then
|
||||
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
|
||||
patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
|
||||
|
||||
case "$1" in
|
||||
-patch) patch $patch_opts -p1 < $0;;
|
||||
-unpatch) patch $patch_opts -p1 -R < $0;;
|
||||
*)
|
||||
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
|
||||
exit 1;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
|
||||
@DPATCH@
|
||||
diff -urNad /home/ultrotter/docs/projects/deb/nagios/nagios-plugins-1.3.1/plugins-scripts/utils.pm.in nagios-plugins-1.3.1/plugins-scripts/utils.pm.in
|
||||
--- /home/ultrotter/docs/projects/deb/nagios/nagios-plugins-1.3.1/plugins-scripts/utils.pm.in 2003-02-03 21:29:55.000000000 +0100
|
||||
+++ nagios-plugins-1.3.1/plugins-scripts/utils.pm.in 2004-02-01 10:42:54.000000000 +0100
|
||||
@@ -1,3 +1,4 @@
|
||||
+#!/usr/bin/perl
|
||||
# Utility drawer for Nagios plugins.
|
||||
# $Id$
|
||||
#
|
45
debian/patches/06_checkircd.dpatch
vendored
Normal file
45
debian/patches/06_checkircd.dpatch
vendored
Normal file
|
@ -0,0 +1,45 @@
|
|||
#! /bin/sh -e
|
||||
## 06_checkircd.dpatch by <ultrotter@debian.org>
|
||||
##
|
||||
## All lines beginning with `## DP:' are a description of the patch.
|
||||
## DP: No description.
|
||||
|
||||
if [ $# -lt 1 ]; then
|
||||
echo "`basename $0`: script expects -patch|-unpatch as argument" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
|
||||
patch_opts="${patch_opts:--f --no-backup-if-mismatch} ${2:+-d $2}"
|
||||
|
||||
case "$1" in
|
||||
-patch) patch -p1 ${patch_opts} < $0;;
|
||||
-unpatch) patch -R -p1 ${patch_opts} < $0;;
|
||||
*)
|
||||
echo "`basename $0`: script expects -patch|-unpatch as argument" >&2
|
||||
exit 1;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
|
||||
@DPATCH@
|
||||
diff -urNad /home/ultrotter/docs/projects/deb/nagios/new/nagios-plugins-1.3.1.0/plugins-scripts/check_ircd.pl nagios-plugins-1.3.1.0/plugins-scripts/check_ircd.pl
|
||||
--- /home/ultrotter/docs/projects/deb/nagios/new/nagios-plugins-1.3.1.0/plugins-scripts/check_ircd.pl 2002-05-07 07:35:49.000000000 +0200
|
||||
+++ nagios-plugins-1.3.1.0/plugins-scripts/check_ircd.pl 2004-08-12 15:54:50.000000000 +0200
|
||||
@@ -148,7 +148,6 @@
|
||||
my $proto = getprotobyname('tcp');
|
||||
my $sockaddr;
|
||||
my $this;
|
||||
- my $thisaddr = gethostbyname($in_hostname);
|
||||
my $that;
|
||||
my ($name, $aliases,$type,$len,$thataddr) = gethostbyname($in_remotehost);
|
||||
# ($name,$aliases,$type,$len,$thisaddr) = gethostbyname($in_hostname);
|
||||
@@ -158,7 +157,7 @@
|
||||
exit $ERRORS{"UNKNOWN"};
|
||||
}
|
||||
$sockaddr = 'S n a4 x8';
|
||||
- $this = pack($sockaddr, AF_INET, 0, $thisaddr);
|
||||
+ $this = pack($sockaddr, AF_INET, 0, INADDR_ANY);
|
||||
$that = pack($sockaddr, AF_INET, $in_remoteport, $thataddr);
|
||||
if (!bind(ClientSocket, $this)) {
|
||||
print "IRCD UNKNOWN: Could not bind socket ($!)\n";
|
82
debian/patches/10_config.h_debiandefaults.dpatch
vendored
Executable file
82
debian/patches/10_config.h_debiandefaults.dpatch
vendored
Executable file
|
@ -0,0 +1,82 @@
|
|||
#! /bin/sh /usr/share/dpatch/dpatch-run
|
||||
## 10_config.h_debiandefaults.dpatch by <seanius@localhost.localdomain>
|
||||
##
|
||||
## All lines beginning with `## DP:' are a description of the patch.
|
||||
## DP: No description.
|
||||
|
||||
@DPATCH@
|
||||
diff -urNad sid~/configure sid/configure
|
||||
--- sid~/configure 2005-09-30 15:56:02.000000000 +0200
|
||||
+++ sid/configure 2005-10-31 21:15:42.000000000 +0100
|
||||
@@ -7760,7 +7760,7 @@
|
||||
fi;
|
||||
|
||||
|
||||
-EXTRAS=
|
||||
+#EXTRAS=
|
||||
|
||||
LDFLAGS="$LDFLAGS -L."
|
||||
|
||||
diff -urNad sid~/np-debian.h sid/np-debian.h
|
||||
--- sid~/np-debian.h 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ sid/np-debian.h 2005-10-31 21:15:42.000000000 +0100
|
||||
@@ -0,0 +1,25 @@
|
||||
+#ifndef _NP_DEBIAN_H_
|
||||
+#define _NP_DEBIAN_H_
|
||||
+
|
||||
+#undef PATH_TO_MAILQ
|
||||
+#define PATH_TO_MAILQ "/usr/bin/mailq"
|
||||
+
|
||||
+#undef SSH_COMMAND
|
||||
+#define SSH_COMMAND "/usr/bin/ssh"
|
||||
+
|
||||
+#undef PATH_TO_FPING
|
||||
+#define PATH_TO_FPING "/usr/bin/fping"
|
||||
+
|
||||
+#undef PATH_TO_QSTAT
|
||||
+#define PATH_TO_QSTAT "/usr/bin/quakestat"
|
||||
+
|
||||
+#undef PATH_TO_SMBCLIENT
|
||||
+#define PATH_TO_SMBCLIENT "/usr/bin/smbclient"
|
||||
+
|
||||
+#undef PATH_TO_NTPDATE
|
||||
+#define PATH_TO_NTPDATE "/usr/sbin/ntpdate"
|
||||
+
|
||||
+#undef PATH_TO_NTPQ
|
||||
+#define PATH_TO_NTPQ "/usr/bin/ntpq"
|
||||
+
|
||||
+#endif /* _NP_DEBIAN_H_ */
|
||||
diff -urNad sid~/plugins/common.h sid/plugins/common.h
|
||||
--- sid~/plugins/common.h 2004-12-10 01:13:43.000000000 +0100
|
||||
+++ sid/plugins/common.h 2005-10-31 21:16:22.000000000 +0100
|
||||
@@ -33,6 +33,7 @@
|
||||
*****************************************************************************/
|
||||
|
||||
#include "config.h"
|
||||
+#include "np-debian.h"
|
||||
|
||||
#ifdef HAVE_FEATURES_H
|
||||
#include <features.h>
|
||||
diff -urNad sid~/plugins-scripts/utils.pm.in sid/plugins-scripts/utils.pm.in
|
||||
--- sid~/plugins-scripts/utils.pm.in 2003-04-13 06:25:36.000000000 +0200
|
||||
+++ sid/plugins-scripts/utils.pm.in 2005-10-31 21:15:42.000000000 +0100
|
||||
@@ -35,13 +35,13 @@
|
||||
sub is_hostname;
|
||||
|
||||
## updated by autoconf
|
||||
-$PATH_TO_RPCINFO = "@PATH_TO_RPCINFO@" ;
|
||||
-$PATH_TO_NTPDATE = "@PATH_TO_NTPDATE@" ;
|
||||
-$PATH_TO_NTPDC = "@PATH_TO_NTPDC@" ;
|
||||
-$PATH_TO_NTPQ = "@PATH_TO_NTPQ@" ;
|
||||
+$PATH_TO_RPCINFO = "/usr/bin/rpcinfo";
|
||||
+$PATH_TO_NTPDATE = "/usr/sbin/ntpdate";
|
||||
+$PATH_TO_NTPDC = "/usr/bin/ntpdc";
|
||||
+$PATH_TO_NTPQ = "/usr/bin/ntpq";
|
||||
$PATH_TO_LMSTAT = "@PATH_TO_LMSTAT@" ;
|
||||
-$PATH_TO_SMBCLIENT = "@PATH_TO_SMBCLIENT@" ;
|
||||
-$PATH_TO_MAILQ = "@PATH_TO_MAILQ@";
|
||||
+$PATH_TO_SMBCLIENT = "/usr/bin/smbclient";
|
||||
+$PATH_TO_MAILQ = "/usr/bin/mailq";
|
||||
$PATH_TO_QMAIL_QSTAT = "@PATH_TO_QMAIL_QSTAT@";
|
||||
|
||||
## common variables
|
47
debian/patches/11_check_ups.c_perfdata_fix.dpatch
vendored
Executable file
47
debian/patches/11_check_ups.c_perfdata_fix.dpatch
vendored
Executable file
|
@ -0,0 +1,47 @@
|
|||
#! /bin/sh /usr/share/dpatch/dpatch-run
|
||||
## 11_check_ups.c_perfdata_fix.dpatch by <seanius@localhost.localdomain>
|
||||
##
|
||||
## All lines beginning with `## DP:' are a description of the patch.
|
||||
## DP: No description.
|
||||
|
||||
@DPATCH@
|
||||
diff -urNad sid~/plugins/check_ups.c sid/plugins/check_ups.c
|
||||
--- sid~/plugins/check_ups.c 2005-03-04 22:58:40.000000000 +0100
|
||||
+++ sid/plugins/check_ups.c 2005-10-06 14:43:10.000000000 +0200
|
||||
@@ -98,6 +98,7 @@
|
||||
int result = STATE_UNKNOWN;
|
||||
char *message;
|
||||
char *data;
|
||||
+ char *tunits;
|
||||
char temp_buffer[MAX_INPUT_BUFFER];
|
||||
double ups_utility_deviation = 0.0;
|
||||
int res;
|
||||
@@ -281,10 +282,12 @@
|
||||
else {
|
||||
supported_options |= UPS_TEMP;
|
||||
if (temp_output_c) {
|
||||
+ tunits="degC";
|
||||
ups_temperature = atof (temp_buffer);
|
||||
asprintf (&message, "%sTemp=%3.1fC", message, ups_temperature);
|
||||
}
|
||||
else {
|
||||
+ tunits="degF";
|
||||
ups_temperature = (atof (temp_buffer) * 1.8) + 32;
|
||||
asprintf (&message, "%sTemp=%3.1fF", message, ups_temperature);
|
||||
}
|
||||
@@ -297,13 +300,13 @@
|
||||
result = max_state (result, STATE_WARNING);
|
||||
}
|
||||
asprintf (&data, "%s %s", data,
|
||||
- perfdata ("temp", (long)ups_temperature, "degF",
|
||||
+ perfdata ("temp", (long)ups_temperature, tunits,
|
||||
check_warn, (long)(1000*warning_value),
|
||||
check_crit, (long)(1000*critical_value),
|
||||
TRUE, 0, FALSE, 0));
|
||||
} else {
|
||||
asprintf (&data, "%s %s", data,
|
||||
- perfdata ("temp", (long)ups_temperature, "degF",
|
||||
+ perfdata ("temp", (long)ups_temperature, tunits,
|
||||
FALSE, 0, FALSE, 0, TRUE, 0, FALSE, 0));
|
||||
}
|
||||
}
|
356
debian/patches/12_check_mysql.c_mysql_options.dpatch
vendored
Executable file
356
debian/patches/12_check_mysql.c_mysql_options.dpatch
vendored
Executable file
|
@ -0,0 +1,356 @@
|
|||
#! /bin/sh /usr/share/dpatch/dpatch-run
|
||||
## 12_check_mysql.c_mysql_options.dpatch by <seanius@localhost.localdomain>
|
||||
##
|
||||
## All lines beginning with `## DP:' are a description of the patch.
|
||||
## DP: No description.
|
||||
|
||||
@DPATCH@
|
||||
diff -urNad sid2~/plugins/check_mysql.c sid2/plugins/check_mysql.c
|
||||
--- sid2~/plugins/check_mysql.c 2005-05-26 04:13:19.000000000 +0200
|
||||
+++ sid2/plugins/check_mysql.c 2005-10-07 22:23:07.000000000 +0200
|
||||
@@ -65,6 +65,8 @@
|
||||
/* initialize mysql */
|
||||
mysql_init (&mysql);
|
||||
|
||||
+ mysql_options(&mysql,MYSQL_READ_DEFAULT_GROUP,"client");
|
||||
+
|
||||
/* establish a connection to the server and error checking */
|
||||
if (!mysql_real_connect(&mysql,db_host,db_user,db_pass,db,db_port,NULL,0)) {
|
||||
if (mysql_errno (&mysql) == CR_UNKNOWN_HOST)
|
||||
diff -urNad sid2~/plugins/check_mysql.c.orig sid2/plugins/check_mysql.c.orig
|
||||
--- sid2~/plugins/check_mysql.c.orig 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ sid2/plugins/check_mysql.c.orig 2005-05-26 04:13:19.000000000 +0200
|
||||
@@ -0,0 +1,333 @@
|
||||
+/******************************************************************************
|
||||
+*
|
||||
+* CHECK_MYSQL.C
|
||||
+*
|
||||
+* Program: Mysql plugin for Nagios
|
||||
+* License: GPL
|
||||
+* Copyright (c) 1999 Didi Rieder (adrieder@sbox.tu-graz.ac.at)
|
||||
+* portions (c) 2000 Karl DeBisschop (kdebisschop@users.sourceforge.net)
|
||||
+*
|
||||
+* $Id$
|
||||
+*
|
||||
+* Description:
|
||||
+*
|
||||
+* This plugin is for testing a mysql server.
|
||||
+******************************************************************************/
|
||||
+
|
||||
+const char *progname = "check_mysql";
|
||||
+const char *revision = "$Revision$";
|
||||
+const char *copyright = "1999-2004";
|
||||
+const char *email = "nagiosplug-devel@lists.sourceforge.net";
|
||||
+
|
||||
+#define SLAVERESULTSIZE 40
|
||||
+
|
||||
+#include "common.h"
|
||||
+#include "utils.h"
|
||||
+#include "netutils.h"
|
||||
+
|
||||
+#include <mysql/mysql.h>
|
||||
+#include <mysql/errmsg.h>
|
||||
+
|
||||
+char *db_user = NULL;
|
||||
+char *db_host = NULL;
|
||||
+char *db_pass = NULL;
|
||||
+char *db = NULL;
|
||||
+unsigned int db_port = MYSQL_PORT;
|
||||
+int check_slave = 0;
|
||||
+
|
||||
+int process_arguments (int, char **);
|
||||
+int validate_arguments (void);
|
||||
+void print_help (void);
|
||||
+void print_usage (void);
|
||||
+
|
||||
+
|
||||
+
|
||||
+int
|
||||
+main (int argc, char **argv)
|
||||
+{
|
||||
+
|
||||
+ MYSQL mysql;
|
||||
+ MYSQL_RES *res;
|
||||
+ MYSQL_ROW row;
|
||||
+
|
||||
+ /* should be status */
|
||||
+
|
||||
+ char *result = NULL;
|
||||
+ char slaveresult[SLAVERESULTSIZE];
|
||||
+
|
||||
+ setlocale (LC_ALL, "");
|
||||
+ bindtextdomain (PACKAGE, LOCALEDIR);
|
||||
+ textdomain (PACKAGE);
|
||||
+
|
||||
+ if (process_arguments (argc, argv) == ERROR)
|
||||
+ usage4 (_("Could not parse arguments"));
|
||||
+
|
||||
+ /* initialize mysql */
|
||||
+ mysql_init (&mysql);
|
||||
+
|
||||
+ /* establish a connection to the server and error checking */
|
||||
+ if (!mysql_real_connect(&mysql,db_host,db_user,db_pass,db,db_port,NULL,0)) {
|
||||
+ if (mysql_errno (&mysql) == CR_UNKNOWN_HOST)
|
||||
+ die (STATE_WARNING, "%s\n", mysql_error (&mysql));
|
||||
+ else if (mysql_errno (&mysql) == CR_VERSION_ERROR)
|
||||
+ die (STATE_WARNING, "%s\n", mysql_error (&mysql));
|
||||
+ else if (mysql_errno (&mysql) == CR_OUT_OF_MEMORY)
|
||||
+ die (STATE_WARNING, "%s\n", mysql_error (&mysql));
|
||||
+ else if (mysql_errno (&mysql) == CR_IPSOCK_ERROR)
|
||||
+ die (STATE_WARNING, "%s\n", mysql_error (&mysql));
|
||||
+ else if (mysql_errno (&mysql) == CR_SOCKET_CREATE_ERROR)
|
||||
+ die (STATE_WARNING, "%s\n", mysql_error (&mysql));
|
||||
+ else
|
||||
+ die (STATE_CRITICAL, "%s\n", mysql_error (&mysql));
|
||||
+ }
|
||||
+
|
||||
+ /* get the server stats */
|
||||
+ result = strdup (mysql_stat (&mysql));
|
||||
+
|
||||
+ /* error checking once more */
|
||||
+ if (mysql_error (&mysql)) {
|
||||
+ if (mysql_errno (&mysql) == CR_SERVER_GONE_ERROR)
|
||||
+ die (STATE_CRITICAL, "%s\n", mysql_error (&mysql));
|
||||
+ else if (mysql_errno (&mysql) == CR_SERVER_LOST)
|
||||
+ die (STATE_CRITICAL, "%s\n", mysql_error (&mysql));
|
||||
+ else if (mysql_errno (&mysql) == CR_UNKNOWN_ERROR)
|
||||
+ die (STATE_CRITICAL, "%s\n", mysql_error (&mysql));
|
||||
+ }
|
||||
+
|
||||
+ if(check_slave) {
|
||||
+ /* check the slave status */
|
||||
+ if (mysql_query (&mysql, "show slave status") != 0) {
|
||||
+ mysql_close (&mysql);
|
||||
+ die (STATE_CRITICAL, _("slave query error: %s\n"), mysql_error (&mysql));
|
||||
+ }
|
||||
+
|
||||
+ /* store the result */
|
||||
+ if ( (res = mysql_store_result (&mysql)) == NULL) {
|
||||
+ mysql_close (&mysql);
|
||||
+ die (STATE_CRITICAL, _("slave store_result error: %s\n"), mysql_error (&mysql));
|
||||
+ }
|
||||
+
|
||||
+ /* fetch the first row */
|
||||
+ if ( (row = mysql_fetch_row (res)) == NULL) {
|
||||
+ mysql_free_result (res);
|
||||
+ mysql_close (&mysql);
|
||||
+ die (STATE_CRITICAL, _("slave fetch row error: %s\n"), mysql_error (&mysql));
|
||||
+ }
|
||||
+
|
||||
+ if (mysql_field_count (&mysql) == 12) {
|
||||
+ /* mysql 3.23.x */
|
||||
+ snprintf (slaveresult, SLAVERESULTSIZE, _("Slave running: %s"), row[6]);
|
||||
+ if (strcmp (row[6], "Yes") != 0) {
|
||||
+ mysql_free_result (res);
|
||||
+ mysql_close (&mysql);
|
||||
+ die (STATE_CRITICAL, "%s\n", slaveresult);
|
||||
+ }
|
||||
+
|
||||
+ } else {
|
||||
+ /* mysql 4.x.x */
|
||||
+ int slave_io_field = -1 , slave_sql_field = -1, i, num_fields;
|
||||
+ MYSQL_FIELD* fields;
|
||||
+
|
||||
+ num_fields = mysql_num_fields(res);
|
||||
+ fields = mysql_fetch_fields(res);
|
||||
+ for(i = 0; i < num_fields; i++)
|
||||
+ {
|
||||
+ if (0 == strcmp(fields[i].name, "Slave_IO_Running"))
|
||||
+ {
|
||||
+ slave_io_field = i;
|
||||
+ continue;
|
||||
+ }
|
||||
+ if (0 == strcmp(fields[i].name, "Slave_SQL_Running"))
|
||||
+ {
|
||||
+ slave_sql_field = i;
|
||||
+ continue;
|
||||
+ }
|
||||
+ }
|
||||
+ if ((slave_io_field < 0) || (slave_sql_field < 0) || (num_fields == 0))
|
||||
+ {
|
||||
+ mysql_free_result (res);
|
||||
+ mysql_close (&mysql);
|
||||
+ die (STATE_CRITICAL, "Slave status unavailable\n");
|
||||
+ }
|
||||
+
|
||||
+ snprintf (slaveresult, SLAVERESULTSIZE, "Slave IO: %s Slave SQL: %s", row[slave_io_field], row[slave_sql_field]);
|
||||
+ if (strcmp (row[slave_io_field], "Yes") != 0 || strcmp (row[slave_sql_field], "Yes") != 0) {
|
||||
+ mysql_free_result (res);
|
||||
+ mysql_close (&mysql);
|
||||
+ die (STATE_CRITICAL, "%s\n", slaveresult);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ /* free the result */
|
||||
+ mysql_free_result (res);
|
||||
+ }
|
||||
+
|
||||
+ /* close the connection */
|
||||
+ mysql_close (&mysql);
|
||||
+
|
||||
+ /* print out the result of stats */
|
||||
+ if (check_slave) {
|
||||
+ printf ("%s %s\n", result, slaveresult);
|
||||
+ } else {
|
||||
+ printf ("%s\n", result);
|
||||
+ }
|
||||
+
|
||||
+ return STATE_OK;
|
||||
+}
|
||||
+
|
||||
+
|
||||
+/* process command-line arguments */
|
||||
+int
|
||||
+process_arguments (int argc, char **argv)
|
||||
+{
|
||||
+ int c;
|
||||
+
|
||||
+ int option = 0;
|
||||
+ static struct option longopts[] = {
|
||||
+ {"hostname", required_argument, 0, 'H'},
|
||||
+ {"database", required_argument, 0, 'd'},
|
||||
+ {"username", required_argument, 0, 'u'},
|
||||
+ {"password", required_argument, 0, 'p'},
|
||||
+ {"port", required_argument, 0, 'P'},
|
||||
+ {"check-slave", no_argument, 0, 'S'},
|
||||
+ {"verbose", no_argument, 0, 'v'},
|
||||
+ {"version", no_argument, 0, 'V'},
|
||||
+ {"help", no_argument, 0, 'h'},
|
||||
+ {0, 0, 0, 0}
|
||||
+ };
|
||||
+
|
||||
+ if (argc < 1)
|
||||
+ return ERROR;
|
||||
+
|
||||
+ while (1) {
|
||||
+ c = getopt_long (argc, argv, "hVSP:p:u:d:H:", longopts, &option);
|
||||
+
|
||||
+ if (c == -1 || c == EOF)
|
||||
+ break;
|
||||
+
|
||||
+ switch (c) {
|
||||
+ case 'H': /* hostname */
|
||||
+ if (is_host (optarg)) {
|
||||
+ db_host = optarg;
|
||||
+ }
|
||||
+ else {
|
||||
+ usage2 (_("Invalid hostname/address"), optarg);
|
||||
+ }
|
||||
+ break;
|
||||
+ case 'd': /* hostname */
|
||||
+ db = optarg;
|
||||
+ break;
|
||||
+ case 'u': /* username */
|
||||
+ db_user = optarg;
|
||||
+ break;
|
||||
+ case 'p': /* authentication information: password */
|
||||
+ db_pass = optarg;
|
||||
+ break;
|
||||
+ case 'P': /* critical time threshold */
|
||||
+ db_port = atoi (optarg);
|
||||
+ break;
|
||||
+ case 'S':
|
||||
+ check_slave = 1; /* check-slave */
|
||||
+ break;
|
||||
+ case 'V': /* version */
|
||||
+ print_revision (progname, revision);
|
||||
+ exit (STATE_OK);
|
||||
+ case 'h': /* help */
|
||||
+ print_help ();
|
||||
+ exit (STATE_OK);
|
||||
+ case '?': /* help */
|
||||
+ usage2 (_("Unknown argument"), optarg);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ c = optind;
|
||||
+
|
||||
+ while ( argc > c ) {
|
||||
+
|
||||
+ if (strlen(db_host) == 0)
|
||||
+ if (is_host (argv[c])) {
|
||||
+ db_host = argv[c++];
|
||||
+ }
|
||||
+ else {
|
||||
+ usage2 (_("Invalid hostname/address"), optarg);
|
||||
+ }
|
||||
+ else if (strlen(db_user) == 0)
|
||||
+ db_user = argv[c++];
|
||||
+ else if (strlen(db_pass) == 0)
|
||||
+ db_pass = argv[c++];
|
||||
+ else if (strlen(db) == 0)
|
||||
+ db = argv[c++];
|
||||
+ else if (is_intnonneg (argv[c]))
|
||||
+ db_port = atoi (argv[c++]);
|
||||
+ else
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ return validate_arguments ();
|
||||
+}
|
||||
+
|
||||
+
|
||||
+int
|
||||
+validate_arguments (void)
|
||||
+{
|
||||
+ if (db_user == NULL)
|
||||
+ db_user = strdup("");
|
||||
+
|
||||
+ if (db_host == NULL)
|
||||
+ db_host = strdup("");
|
||||
+
|
||||
+ if (db_pass == NULL)
|
||||
+ db_pass == strdup("");
|
||||
+
|
||||
+ if (db == NULL)
|
||||
+ db = strdup("");
|
||||
+
|
||||
+ return OK;
|
||||
+}
|
||||
+
|
||||
+
|
||||
+void
|
||||
+print_help (void)
|
||||
+{
|
||||
+ char *myport;
|
||||
+ asprintf (&myport, "%d", MYSQL_PORT);
|
||||
+
|
||||
+ print_revision (progname, revision);
|
||||
+
|
||||
+ printf (_(COPYRIGHT), copyright, email);
|
||||
+
|
||||
+ printf (_("This program tests connections to a mysql server\n"));
|
||||
+
|
||||
+ print_usage ();
|
||||
+
|
||||
+ printf (_(UT_HELP_VRSN));
|
||||
+
|
||||
+ printf (_(UT_HOST_PORT), 'P', myport);
|
||||
+
|
||||
+ printf (_("\
|
||||
+ -d, --database=STRING\n\
|
||||
+ Check database with indicated name\n\
|
||||
+ -u, --username=STRING\n\
|
||||
+ Connect using the indicated username\n\
|
||||
+ -p, --password=STRING\n\
|
||||
+ Use the indicated password to authenticate the connection\n\
|
||||
+ ==> IMPORTANT: THIS FORM OF AUTHENTICATION IS NOT SECURE!!! <==\n\
|
||||
+ Your clear-text password will be visible as a process table entry\n\
|
||||
+ -S, --check-slave\n\
|
||||
+ Check if the slave thread is running properly.\n"));
|
||||
+
|
||||
+ printf (_("\n\
|
||||
+There are no required arguments. By default, the local database with\n\
|
||||
+a server listening on MySQL standard port %d will be checked\n"), MYSQL_PORT);
|
||||
+
|
||||
+ printf (_(UT_SUPPORT));
|
||||
+}
|
||||
+
|
||||
+
|
||||
+void
|
||||
+print_usage (void)
|
||||
+{
|
||||
+ printf ("\
|
||||
+Usage: %s [-d database] [-H host] [-P port] [-u user] [-p password] [-S]\n",
|
||||
+ progname);
|
||||
+}
|
64
debian/patches/13_subst.in_again.dpatch
vendored
Executable file
64
debian/patches/13_subst.in_again.dpatch
vendored
Executable file
|
@ -0,0 +1,64 @@
|
|||
#! /bin/sh /usr/share/dpatch/dpatch-run
|
||||
## 13_subst.in_again.dpatch by <seanius@localhost.localdomain>
|
||||
##
|
||||
## All lines beginning with `## DP:' are a description of the patch.
|
||||
## DP: No description.
|
||||
|
||||
@DPATCH@
|
||||
diff -urNad sid2~/plugins-scripts/subst.in sid2/plugins-scripts/subst.in
|
||||
--- sid2~/plugins-scripts/subst.in 2005-08-31 00:11:42.000000000 +0200
|
||||
+++ sid2/plugins-scripts/subst.in 2005-10-07 22:37:45.000000000 +0200
|
||||
@@ -1,35 +1,9 @@
|
||||
#!/usr/bin/awk
|
||||
|
||||
-function which(c,path) {
|
||||
- cmd = "test -x " c;
|
||||
-
|
||||
- if (system(cmd)==0) {
|
||||
- return c;
|
||||
- }
|
||||
-
|
||||
- sub(/\/.*\//,"",c);
|
||||
- for (dir in path) {
|
||||
- cmd = "test -x " path[dir] "/" c;
|
||||
- if (system(cmd)==0) {
|
||||
- return path[dir] "/" c;
|
||||
- }
|
||||
- }
|
||||
-
|
||||
-
|
||||
- return c;
|
||||
-}
|
||||
-
|
||||
# used to replace "use lib utils.pm" with "use lib @libexecdir"
|
||||
#
|
||||
function led() {
|
||||
- led1 = "@libexecdir@";
|
||||
- led2 = "@exec_prefix@";
|
||||
- led3 = "@prefix@";
|
||||
- if ( match(led1, /^\$\{exec_prefix\}/ ) != 0 ) {
|
||||
- return "\"" led3 "/libexec\" " ;
|
||||
-
|
||||
- }
|
||||
- return "\"" led1 "\"" ;
|
||||
+ return "\"/usr/lib/nagios/plugins\"" ;
|
||||
}
|
||||
|
||||
BEGIN {
|
||||
@@ -58,16 +32,6 @@
|
||||
sub(/\=.*$/,"='@with_trusted_path@' # autoconf-derived");
|
||||
}
|
||||
|
||||
-# If a script contains a reference to a fully qualified command,
|
||||
-# subst will replace the fully qualified command with whatever is
|
||||
-# returned from the which subroutine
|
||||
-#
|
||||
-/^[^#]/ && /(\/.*)?\/(bin|sbin|lib|libexec)\// {
|
||||
- match($0,/(\/.*)?\/(bin|sbin|lib|libexec)\/[-_a-zA-Z0-9]+/);
|
||||
- c=substr($0,RSTART,RLENGTH);
|
||||
- sub(c,which(c,path));
|
||||
-}
|
||||
-
|
||||
{
|
||||
print;
|
||||
}
|
26
debian/patches/14_check_log_paths.dpatch
vendored
Executable file
26
debian/patches/14_check_log_paths.dpatch
vendored
Executable file
|
@ -0,0 +1,26 @@
|
|||
#! /bin/sh /usr/share/dpatch/dpatch-run
|
||||
## 14_check_log_paths.dpatch by <seanius@debian.org>
|
||||
##
|
||||
## All lines beginning with `## DP:' are a description of the patch.
|
||||
## DP: No description.
|
||||
|
||||
@DPATCH@
|
||||
diff -urNad nagios-plugins~/plugins-scripts/check_log.sh nagios-plugins/plugins-scripts/check_log.sh
|
||||
--- nagios-plugins~/plugins-scripts/check_log.sh 2005-02-04 00:51:35.000000000 +0100
|
||||
+++ nagios-plugins/plugins-scripts/check_log.sh 2005-10-09 17:29:46.000000000 +0200
|
||||
@@ -62,12 +62,12 @@
|
||||
|
||||
ECHO="/bin/echo"
|
||||
GREP="/bin/grep"
|
||||
-DIFF="/bin/diff"
|
||||
-TAIL="/bin/tail"
|
||||
+DIFF="/usr/bin/diff"
|
||||
+TAIL="/usr/bin/tail"
|
||||
CAT="/bin/cat"
|
||||
RM="/bin/rm"
|
||||
|
||||
-PROGNAME=`/bin/basename $0`
|
||||
+PROGNAME=`/usr/bin/basename $0`
|
||||
PROGPATH=`echo $0 | /bin/sed -e 's,[\\/][^\\/][^\\/]*$,,'`
|
||||
REVISION=`echo '$Revision$' | /bin/sed -e 's/[^0-9.]//g'`
|
||||
|
92
debian/patches/15_check_mrtg_wtf_conditionals.dpatch
vendored
Executable file
92
debian/patches/15_check_mrtg_wtf_conditionals.dpatch
vendored
Executable file
|
@ -0,0 +1,92 @@
|
|||
#! /bin/sh /usr/share/dpatch/dpatch-run
|
||||
## 14_check_log_paths.dpatch by <seanius@debian.org>
|
||||
##
|
||||
## All lines beginning with `## DP:' are a description of the patch.
|
||||
## DP: No description.
|
||||
|
||||
@DPATCH@
|
||||
diff -urNad nagios-plugins~/plugins/check_mrtg.c nagios-plugins/plugins/check_mrtg.c
|
||||
--- nagios-plugins~/plugins/check_mrtg.c 2004-12-26 00:17:44.000000000 +0100
|
||||
+++ nagios-plugins/plugins/check_mrtg.c 2005-10-26 23:15:37.000000000 +0200
|
||||
@@ -43,13 +43,12 @@
|
||||
int
|
||||
main (int argc, char **argv)
|
||||
{
|
||||
- int result = STATE_UNKNOWN;
|
||||
+ int result = STATE_OK;
|
||||
FILE *fp;
|
||||
int line;
|
||||
char input_buffer[MAX_INPUT_BUFFER];
|
||||
char *temp_buffer;
|
||||
time_t current_time;
|
||||
- char* message;
|
||||
time_t timestamp = 0L;
|
||||
unsigned long average_value_rate = 0L;
|
||||
unsigned long maximum_value_rate = 0L;
|
||||
@@ -112,43 +111,37 @@
|
||||
|
||||
/* if we couldn't read enough data, return an unknown error */
|
||||
if (line <= 2) {
|
||||
- result = STATE_UNKNOWN;
|
||||
- asprintf (&message, _("Unable to process MRTG log file\n"));
|
||||
+ printf (_("Unable to process MRTG log file\n"));
|
||||
+ return STATE_UNKNOWN;
|
||||
}
|
||||
|
||||
/* make sure the MRTG data isn't too old */
|
||||
- if (result == STATE_OK) {
|
||||
- time (¤t_time);
|
||||
- if (expire_minutes > 0
|
||||
- && (current_time - timestamp) > (expire_minutes * 60)) {
|
||||
- result = STATE_WARNING;
|
||||
- asprintf (&message, _("MRTG data has expired (%d minutes old)\n"),
|
||||
- (int) ((current_time - timestamp) / 60));
|
||||
- }
|
||||
+ time (¤t_time);
|
||||
+ if (expire_minutes > 0
|
||||
+ && (current_time - timestamp) > (expire_minutes * 60)) {
|
||||
+ printf (_("MRTG data has expired (%d minutes old)\n"),
|
||||
+ (int) ((current_time - timestamp) / 60));
|
||||
+ return STATE_WARNING;
|
||||
}
|
||||
|
||||
/* else check the incoming/outgoing rates */
|
||||
- if (result == STATE_OK) {
|
||||
- if (use_average == TRUE)
|
||||
- rate = average_value_rate;
|
||||
- else
|
||||
- rate = maximum_value_rate;
|
||||
-
|
||||
- if (rate > value_critical_threshold)
|
||||
- result = STATE_CRITICAL;
|
||||
- else if (rate > value_warning_threshold)
|
||||
- result = STATE_WARNING;
|
||||
+ if (use_average == TRUE)
|
||||
+ rate = average_value_rate;
|
||||
+ else
|
||||
+ rate = maximum_value_rate;
|
||||
|
||||
- asprintf (&message, "%s. %s = %lu %s|%s",
|
||||
- (use_average == TRUE) ? _("Avg") : _("Max"),
|
||||
- label, rate, units,
|
||||
- perfdata(label, (long) rate, units,
|
||||
- (int) value_warning_threshold, (long) value_warning_threshold,
|
||||
- (int) value_critical_threshold, (long) value_critical_threshold,
|
||||
- 0, 0, 0, 0));
|
||||
- }
|
||||
+ if (rate > value_critical_threshold)
|
||||
+ result = STATE_CRITICAL;
|
||||
+ else if (rate > value_warning_threshold)
|
||||
+ result = STATE_WARNING;
|
||||
|
||||
- printf ("%s\n", message);
|
||||
+ printf("%s. %s = %lu %s|%s\n",
|
||||
+ (use_average == TRUE) ? _("Avg") : _("Max"),
|
||||
+ label, rate, units,
|
||||
+ perfdata(label, (long) rate, units,
|
||||
+ (int) value_warning_threshold, (long) value_warning_threshold,
|
||||
+ (int) value_critical_threshold, (long) value_critical_threshold,
|
||||
+ 0, 0, 0, 0));
|
||||
|
||||
return result;
|
||||
}
|
202
debian/patches/16_check_smtp_protocolfix.dpatch
vendored
Executable file
202
debian/patches/16_check_smtp_protocolfix.dpatch
vendored
Executable file
|
@ -0,0 +1,202 @@
|
|||
#! /bin/sh /usr/share/dpatch/dpatch-run
|
||||
## 16_check_smtp_protocolfix.dpatch by <seanius@debian.org>
|
||||
##
|
||||
## All lines beginning with `## DP:' are a description of the patch.
|
||||
## DP: No description.
|
||||
|
||||
@DPATCH@
|
||||
diff -urNad nagios-plugins~/plugins/check_smtp.c nagios-plugins/plugins/check_smtp.c
|
||||
--- nagios-plugins~/plugins/check_smtp.c 2005-10-10 09:52:49.000000000 +0200
|
||||
+++ nagios-plugins/plugins/check_smtp.c 2005-10-10 09:54:53.000000000 +0200
|
||||
@@ -59,10 +59,17 @@
|
||||
enum {
|
||||
SMTP_PORT = 25
|
||||
};
|
||||
-const char *SMTP_EXPECT = "220";
|
||||
-const char *SMTP_HELO = "HELO ";
|
||||
-const char *SMTP_QUIT = "QUIT\r\n";
|
||||
-const char *SMTP_STARTTLS = "STARTTLS\r\n";
|
||||
+#define SMTP_EXPECT "220"
|
||||
+#define SMTP_HELO "HELO "
|
||||
+#define SMTP_EHLO "EHLO "
|
||||
+#define SMTP_QUIT "QUIT\r\n"
|
||||
+#define SMTP_STARTTLS "STARTTLS\r\n"
|
||||
+
|
||||
+#ifndef HOST_MAX_BYTES
|
||||
+#define HOST_MAX_BYTES 255
|
||||
+#endif
|
||||
+
|
||||
+#define EHLO_SUPPORTS_STARTTLS 1
|
||||
|
||||
int process_arguments (int, char **);
|
||||
int validate_arguments (void);
|
||||
@@ -101,6 +108,9 @@
|
||||
int check_critical_time = FALSE;
|
||||
int verbose = 0;
|
||||
int use_ssl = FALSE;
|
||||
+short use_ehlo = FALSE;
|
||||
+short ssl_established = TRUE;
|
||||
+char *localhostname = NULL;
|
||||
int sd;
|
||||
char buffer[MAX_INPUT_BUFFER];
|
||||
enum {
|
||||
@@ -112,7 +122,7 @@
|
||||
int
|
||||
main (int argc, char **argv)
|
||||
{
|
||||
-
|
||||
+ short supports_tls=FALSE;
|
||||
int n = 0;
|
||||
double elapsed_time;
|
||||
long microsec;
|
||||
@@ -120,6 +130,7 @@
|
||||
char *cmd_str = NULL;
|
||||
char *helocmd = NULL;
|
||||
struct timeval tv;
|
||||
+ struct hostent *hp;
|
||||
|
||||
setlocale (LC_ALL, "");
|
||||
bindtextdomain (PACKAGE, LOCALEDIR);
|
||||
@@ -129,12 +140,26 @@
|
||||
usage4 (_("Could not parse arguments"));
|
||||
|
||||
/* initialize the HELO command with the localhostname */
|
||||
-#ifndef HOST_MAX_BYTES
|
||||
-#define HOST_MAX_BYTES 255
|
||||
-#endif
|
||||
- helocmd = malloc (HOST_MAX_BYTES);
|
||||
- gethostname(helocmd, HOST_MAX_BYTES);
|
||||
- asprintf (&helocmd, "%s%s%s", SMTP_HELO, helocmd, "\r\n");
|
||||
+ if(! localhostname){
|
||||
+ localhostname = malloc (HOST_MAX_BYTES);
|
||||
+ if(!localhostname){
|
||||
+ printf(_("malloc() failed!\n"));
|
||||
+ return STATE_CRITICAL;
|
||||
+ }
|
||||
+ if(gethostname(localhostname, HOST_MAX_BYTES)){
|
||||
+ printf(_("gethostname() failed!\n"));
|
||||
+ return STATE_CRITICAL;
|
||||
+ }
|
||||
+ hp = gethostbyname(localhostname);
|
||||
+ if(!hp) helocmd = localhostname;
|
||||
+ else helocmd = hp->h_name;
|
||||
+ } else {
|
||||
+ helocmd = localhostname;
|
||||
+ }
|
||||
+ if(use_ehlo)
|
||||
+ asprintf (&helocmd, "%s%s%s", SMTP_EHLO, helocmd, "\r\n");
|
||||
+ else
|
||||
+ asprintf (&helocmd, "%s%s%s", SMTP_HELO, helocmd, "\r\n");
|
||||
|
||||
/* initialize the MAIL command with optional FROM command */
|
||||
asprintf (&cmd_str, "%sFROM: %s%s", mail_command, from_arg, "\r\n");
|
||||
@@ -178,11 +203,26 @@
|
||||
}
|
||||
}
|
||||
|
||||
- /* send the HELO command */
|
||||
+ /* send the HELO/EHLO command */
|
||||
send(sd, helocmd, strlen(helocmd), 0);
|
||||
|
||||
/* allow for response to helo command to reach us */
|
||||
- read (sd, buffer, MAXBUF - 1);
|
||||
+ if(read (sd, buffer, MAXBUF - 1) < 0){
|
||||
+ printf (_("recv() failed\n"));
|
||||
+ return STATE_WARNING;
|
||||
+ } else if(use_ehlo){
|
||||
+ buffer[MAXBUF-1]='\0';
|
||||
+ if(strstr(buffer, "250 STARTTLS") != NULL ||
|
||||
+ strstr(buffer, "250-STARTTLS") != NULL){
|
||||
+ supports_tls=TRUE;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ if(use_ssl && ! supports_tls){
|
||||
+ printf(_("WARNING - TLS not supported by server\n"));
|
||||
+ send (sd, SMTP_QUIT, strlen (SMTP_QUIT), 0);
|
||||
+ return STATE_WARNING;
|
||||
+ }
|
||||
|
||||
#ifdef HAVE_SSL
|
||||
if(use_ssl) {
|
||||
@@ -192,11 +232,14 @@
|
||||
recv(sd,buffer, MAX_INPUT_BUFFER-1, 0); /* wait for it */
|
||||
if (!strstr (buffer, server_expect)) {
|
||||
printf (_("Server does not support STARTTLS\n"));
|
||||
+ send (sd, SMTP_QUIT, strlen (SMTP_QUIT), 0);
|
||||
return STATE_UNKNOWN;
|
||||
}
|
||||
if(connect_STARTTLS() != OK) {
|
||||
printf (_("CRITICAL - Cannot create SSL context.\n"));
|
||||
return STATE_CRITICAL;
|
||||
+ } else {
|
||||
+ ssl_established = TRUE;
|
||||
}
|
||||
if ( check_cert ) {
|
||||
if ((server_cert = SSL_get_peer_certificate (ssl)) != NULL) {
|
||||
@@ -333,6 +376,7 @@
|
||||
{"timeout", required_argument, 0, 't'},
|
||||
{"port", required_argument, 0, 'p'},
|
||||
{"from", required_argument, 0, 'f'},
|
||||
+ {"fqdn", required_argument, 0, 'F'},
|
||||
{"command", required_argument, 0, 'C'},
|
||||
{"response", required_argument, 0, 'R'},
|
||||
{"nocommand", required_argument, 0, 'n'},
|
||||
@@ -359,7 +403,7 @@
|
||||
}
|
||||
|
||||
while (1) {
|
||||
- c = getopt_long (argc, argv, "+hVv46t:p:f:e:c:w:H:C:R:SD:",
|
||||
+ c = getopt_long (argc, argv, "+hVv46t:p:f:e:c:w:H:C:R:SD:F:",
|
||||
longopts, &option);
|
||||
|
||||
if (c == -1 || c == EOF)
|
||||
@@ -380,6 +424,10 @@
|
||||
else
|
||||
usage4 (_("Port must be a positive integer"));
|
||||
break;
|
||||
+ case 'F':
|
||||
+ /* localhostname */
|
||||
+ localhostname = strdup(optarg);
|
||||
+ break;
|
||||
case 'f': /* from argument */
|
||||
from_arg = optarg;
|
||||
smtp_use_dummycmd = 1;
|
||||
@@ -439,6 +487,7 @@
|
||||
case 'S':
|
||||
/* starttls */
|
||||
use_ssl = TRUE;
|
||||
+ use_ehlo = TRUE;
|
||||
break;
|
||||
case 'D':
|
||||
/* Check SSL cert validity */
|
||||
@@ -581,7 +630,7 @@
|
||||
|
||||
/* Initialize SSL context */
|
||||
SSLeay_add_ssl_algorithms ();
|
||||
- meth = SSLv2_client_method ();
|
||||
+ meth = SSLv23_client_method ();
|
||||
SSL_load_error_strings ();
|
||||
if ((ctx = SSL_CTX_new (meth)) == NULL)
|
||||
{
|
||||
@@ -602,11 +651,6 @@
|
||||
{
|
||||
printf (_("CRITICAL - Cannot initiate SSL handshake.\n"));
|
||||
}
|
||||
- /* this causes a seg faul
|
||||
- not sure why, being sloppy
|
||||
- and commenting it out */
|
||||
- /* SSL_free (ssl); */
|
||||
- SSL_CTX_free(ctx);
|
||||
my_close();
|
||||
|
||||
return STATE_CRITICAL;
|
||||
@@ -708,7 +752,7 @@
|
||||
my_close (void)
|
||||
{
|
||||
#ifdef HAVE_SSL
|
||||
- if (use_ssl == TRUE) {
|
||||
+ if (use_ssl == TRUE && ssl_established == TRUE) {
|
||||
SSL_shutdown (ssl);
|
||||
SSL_free (ssl);
|
||||
SSL_CTX_free (ctx);
|
104
debian/patches/17_check_smb_freespace.dpatch
vendored
Executable file
104
debian/patches/17_check_smb_freespace.dpatch
vendored
Executable file
|
@ -0,0 +1,104 @@
|
|||
#! /bin/sh /usr/share/dpatch/dpatch-run
|
||||
## 17_check_smb_freespace.dpatch by <seanius@debian.org>
|
||||
##
|
||||
## All lines beginning with `## DP:' are a description of the patch.
|
||||
## DP: No description.
|
||||
|
||||
@DPATCH@
|
||||
diff -urNad nagios-plugins~/plugins-scripts/check_disk_smb.pl nagios-plugins/plugins-scripts/check_disk_smb.pl
|
||||
--- nagios-plugins~/plugins-scripts/check_disk_smb.pl 2005-10-11 09:31:55.000000000 +0200
|
||||
+++ nagios-plugins/plugins-scripts/check_disk_smb.pl 2005-10-11 09:33:17.000000000 +0200
|
||||
@@ -87,18 +87,55 @@
|
||||
my $crit = $1 if ($opt_c =~ /^([0-9]{1,2}\%?|100\%?|[0-9]+[kMG])$/);
|
||||
($crit) || usage("Invalid critical threshold: $opt_c\n");
|
||||
|
||||
+# split the type from the unit value
|
||||
+#Check $warn and $crit for type (%/M/G) and set up for tests
|
||||
+#P = Percent, K = KBytes
|
||||
+my $warn_type;
|
||||
+my $crit_type;
|
||||
+
|
||||
+if ($opt_w =~ /^([0-9]+)\%?$/) {
|
||||
+ $warn = "$1";
|
||||
+ $warn_type = "P";
|
||||
+} elsif ($opt_w =~ /^([0-9]+)k$/) {
|
||||
+ $warn_type = "K";
|
||||
+ $warn = $1;
|
||||
+} elsif ($opt_w =~ /^([0-9]+)M$/) {
|
||||
+ $warn_type = "K";
|
||||
+ $warn = $1 * 1024;
|
||||
+} elsif ($opt_w =~ /^([0-9]+)G$/) {
|
||||
+ $warn_type = "K";
|
||||
+ $warn = $1 * 1048576;
|
||||
+}
|
||||
+if ($opt_c =~ /^([0-9]+)\%?$/) {
|
||||
+ $crit = "$1";
|
||||
+ $crit_type = "P";
|
||||
+} elsif ($opt_c =~ /^([0-9]+)k$/) {
|
||||
+ $crit_type = "K";
|
||||
+ $crit = $1;
|
||||
+} elsif ($opt_c =~ /^([0-9]+)M$/) {
|
||||
+ $crit_type = "K";
|
||||
+ $crit = $1 * 1024;
|
||||
+} elsif ($opt_c =~ /^([0-9]+)G$/) {
|
||||
+ $crit_type = "K";
|
||||
+ $crit = $1 * 1048576;
|
||||
+}
|
||||
+
|
||||
# check if both warning and critical are percentage or size
|
||||
-unless( ( ($opt_w =~ /([0-9]){1,2}$/ ) && ($opt_c =~ /([0-9]){1,2}$/ ) )|| (( $opt_w =~ /[kMG]/ ) && ($opt_c =~ /[kMG]/) ) ){
|
||||
+unless( ( $warn_type eq "P" && $crit_type eq "P" ) || ( $warn_type ne "P" && $crit_type ne "P" ) ){
|
||||
+ $opt_w =~ s/\%/\%\%/g;
|
||||
+ $opt_c =~ s/\%/\%\%/g;
|
||||
usage("Both warning and critical should be same type- warning: $opt_w critical: $opt_c \n");
|
||||
}
|
||||
|
||||
# verify warning is less than critical
|
||||
-if ( $opt_w =~ /[kMG]/) {
|
||||
+if ( $warn_type eq "K") {
|
||||
unless ( $warn > $crit) {
|
||||
usage("Disk size: warning ($opt_w) should be greater than critical ($opt_c) \n");
|
||||
}
|
||||
}else{
|
||||
unless ( $warn < $crit) {
|
||||
+ $opt_w =~ s/\%/\%\%/g;
|
||||
+ $opt_c =~ s/\%/\%\%/g;
|
||||
usage("Percentage: warning ($opt_w) should be less than critical ($opt_c) \n");
|
||||
}
|
||||
}
|
||||
@@ -147,35 +184,6 @@
|
||||
my ($capper) = int(($3/$1)*100);
|
||||
my ($mountpt) = "\\\\$host\\$share";
|
||||
|
||||
- #Check $warn and $crit for type (%/M/G) and set up for tests
|
||||
- #P = Percent, K = KBytes
|
||||
- my $warn_type;
|
||||
- my $crit_type;
|
||||
-
|
||||
- if ($opt_w =~ /^([0-9]+$)/) {
|
||||
- $warn_type = "P";
|
||||
- } elsif ($opt_w =~ /^([0-9]+)k$/) {
|
||||
- $warn_type = "K";
|
||||
- $warn = $1;
|
||||
- } elsif ($opt_w =~ /^([0-9]+)M$/) {
|
||||
- $warn_type = "K";
|
||||
- $warn = $1 * 1024;
|
||||
- } elsif ($opt_w =~ /^([0-9]+)G$/) {
|
||||
- $warn_type = "K";
|
||||
- $warn = $1 * 1048576;
|
||||
- }
|
||||
- if ($opt_c =~ /^([0-9]+$)/) {
|
||||
- $crit_type = "P";
|
||||
- } elsif ($opt_c =~ /^([0-9]+)k$/) {
|
||||
- $crit_type = "K";
|
||||
- $crit = $1;
|
||||
- } elsif ($opt_c =~ /^([0-9]+)M$/) {
|
||||
- $crit_type = "K";
|
||||
- $crit = $1 * 1024;
|
||||
- } elsif ($opt_c =~ /^([0-9]+)G$/) {
|
||||
- $crit_type = "K";
|
||||
- $crit = $1 * 1048576;
|
||||
- }
|
||||
|
||||
if (int($avail / 1024) > 0) {
|
||||
$avail = int($avail / 1024);
|
21
debian/patches/18_check_game_cmdline.dpatch
vendored
Executable file
21
debian/patches/18_check_game_cmdline.dpatch
vendored
Executable file
|
@ -0,0 +1,21 @@
|
|||
#! /bin/sh /usr/share/dpatch/dpatch-run
|
||||
## 18_check_game_cmdline.dpatch by <seanius@debian.org>
|
||||
##
|
||||
## All lines beginning with `## DP:' are a description of the patch.
|
||||
## DP: No description.
|
||||
|
||||
@DPATCH@
|
||||
diff -urNad nagios-plugins~/plugins/check_game.c nagios-plugins/plugins/check_game.c
|
||||
--- nagios-plugins~/plugins/check_game.c 2005-10-11 16:45:44.000000000 +0200
|
||||
+++ nagios-plugins/plugins/check_game.c 2005-10-11 16:47:07.000000000 +0200
|
||||
@@ -328,8 +328,8 @@
|
||||
print_usage (void)
|
||||
{
|
||||
printf ("\
|
||||
-Usage: %s <game> <ip_address> [-p port] [-gf game_field] [-mf map_field]\n\
|
||||
- [-pf ping_field]\n", progname);
|
||||
+Usage: %s [-hvV] [-P port] [-t timeout] [-g game_field] [-m map_field]\n\
|
||||
+ [-p ping_field] [-G game-time] [-H hostname] <game> <ip_address>\n", progname);
|
||||
}
|
||||
|
||||
/******************************************************************************
|
156
debian/patches/19_check_disk_subdirs.dpatch
vendored
Executable file
156
debian/patches/19_check_disk_subdirs.dpatch
vendored
Executable file
|
@ -0,0 +1,156 @@
|
|||
#! /bin/sh /usr/share/dpatch/dpatch-run
|
||||
## 19_check_disk_subdirs.dpatch by <seanius@debian.org>
|
||||
##
|
||||
## All lines beginning with `## DP:' are a description of the patch.
|
||||
## DP: No description.
|
||||
|
||||
@DPATCH@
|
||||
diff -urNad nagios-plugins~/plugins/check_disk.c nagios-plugins/plugins/check_disk.c
|
||||
--- nagios-plugins~/plugins/check_disk.c 2005-10-11 11:48:33.000000000 +0200
|
||||
+++ nagios-plugins/plugins/check_disk.c 2005-10-11 11:49:34.000000000 +0200
|
||||
@@ -64,6 +64,7 @@
|
||||
{
|
||||
char *name;
|
||||
int found;
|
||||
+ int found_len;
|
||||
uintmax_t w_df;
|
||||
uintmax_t c_df;
|
||||
double w_dfp;
|
||||
@@ -166,26 +167,56 @@
|
||||
if (process_arguments (argc, argv) == ERROR)
|
||||
usage4 (_("Could not parse arguments"));
|
||||
|
||||
- for (me = mount_list; me; me = me->me_next) {
|
||||
+ /* if a list of paths has been selected, preseed the list with
|
||||
+ * the longest matching filesystem name by iterating across
|
||||
+ * the mountlist once ahead of time. this will allow a query on
|
||||
+ * "/var/log" to return information about "/var" if no "/var/log"
|
||||
+ * filesystem exists, etc. this is the default behavior already
|
||||
+ * with df-based checks, but for systems with their own space
|
||||
+ * checking routines, this should make them more consistent.
|
||||
+ */
|
||||
+ if(path_select_list){
|
||||
+ for (me = mount_list; me; me = me->me_next) {
|
||||
+ walk_name_list(path_select_list, me->me_mountdir);
|
||||
+ walk_name_list(path_select_list, me->me_devname);
|
||||
+ }
|
||||
+ /* now pretend we never saw anything, but keep found_len.
|
||||
+ * thus future searches will only match the best match */
|
||||
+ for (temp_list = path_select_list; temp_list; temp_list=temp_list->name_next){
|
||||
+ temp_list->found=0;
|
||||
+ }
|
||||
+ }
|
||||
|
||||
+ /* for every mount entry */
|
||||
+ for (me = mount_list; me; me = me->me_next) {
|
||||
+ /* if there's a list of paths to select, the current mount
|
||||
+ * entry matches in path or device name, get fs usage */
|
||||
if (path_select_list &&
|
||||
(walk_name_list (path_select_list, me->me_mountdir) ||
|
||||
- walk_name_list (path_select_list, me->me_devname) ) )
|
||||
+ walk_name_list (path_select_list, me->me_devname) ) ) {
|
||||
get_fs_usage (me->me_mountdir, me->me_devname, &fsp);
|
||||
- else if (dev_select_list || path_select_list)
|
||||
+ /* else if there's a list of paths/devices to select (but
|
||||
+ * we didn't match above) skip to the next mount entry */
|
||||
+ } else if (dev_select_list || path_select_list) {
|
||||
continue;
|
||||
- else if (me->me_remote && show_local_fs)
|
||||
+ /* skip remote filesystems if we're not interested in them */
|
||||
+ } else if (me->me_remote && show_local_fs) {
|
||||
continue;
|
||||
- else if (me->me_dummy && !show_all_fs)
|
||||
+ /* skip pseudo fs's if we haven't asked for all fs's */
|
||||
+ } else if (me->me_dummy && !show_all_fs) {
|
||||
continue;
|
||||
- else if (fs_exclude_list && walk_name_list (fs_exclude_list, me->me_type))
|
||||
+ /* skip excluded fstypes */
|
||||
+ } else if (fs_exclude_list && walk_name_list (fs_exclude_list, me->me_type)) {
|
||||
continue;
|
||||
- else if (dp_exclude_list &&
|
||||
+ /* skip excluded fs's */
|
||||
+ } else if (dp_exclude_list &&
|
||||
(walk_name_list (dp_exclude_list, me->me_devname) ||
|
||||
- walk_name_list (dp_exclude_list, me->me_mountdir)))
|
||||
+ walk_name_list (dp_exclude_list, me->me_mountdir))) {
|
||||
continue;
|
||||
- else
|
||||
+ /* otherwise, get fs usage */
|
||||
+ } else {
|
||||
get_fs_usage (me->me_mountdir, me->me_devname, &fsp);
|
||||
+ }
|
||||
|
||||
if (fsp.fsu_blocks && strcmp ("none", me->me_mountdir)) {
|
||||
usp = (double)(fsp.fsu_blocks - fsp.fsu_bavail) * 100 / fsp.fsu_blocks;
|
||||
@@ -229,7 +260,7 @@
|
||||
/* Override result if paths specified and not found */
|
||||
temp_list = path_select_list;
|
||||
while (temp_list) {
|
||||
- if (temp_list->found != TRUE) {
|
||||
+ if (!temp_list->found) {
|
||||
asprintf (&output, _("%s [%s not found]"), output, temp_list->name);
|
||||
result = STATE_CRITICAL;
|
||||
}
|
||||
@@ -285,6 +316,8 @@
|
||||
se = (struct name_list *) malloc (sizeof (struct name_list));
|
||||
se->name = strdup ("iso9660");
|
||||
se->name_next = NULL;
|
||||
+ se->found = 0;
|
||||
+ se->found_len = 0;
|
||||
*fstail = se;
|
||||
fstail = &se->name_next;
|
||||
|
||||
@@ -388,6 +421,8 @@
|
||||
se->c_df = c_df;
|
||||
se->w_dfp = w_dfp;
|
||||
se->c_dfp = c_dfp;
|
||||
+ se->found = 0;
|
||||
+ se->found_len = 0;
|
||||
*pathtail = se;
|
||||
pathtail = &se->name_next;
|
||||
break;
|
||||
@@ -399,6 +434,8 @@
|
||||
se->c_df = 0;
|
||||
se->w_dfp = -1.0;
|
||||
se->c_dfp = -1.0;
|
||||
+ se->found = 0;
|
||||
+ se->found_len = 0;
|
||||
*dptail = se;
|
||||
dptail = &se->name_next;
|
||||
break;
|
||||
@@ -410,6 +447,8 @@
|
||||
se->c_df = 0;
|
||||
se->w_dfp = -1.0;
|
||||
se->c_dfp = -1.0;
|
||||
+ se->found = 0;
|
||||
+ se->found_len = 0;
|
||||
*fstail = se;
|
||||
fstail = &se->name_next;
|
||||
break;
|
||||
@@ -458,6 +497,8 @@
|
||||
se->c_df = c_df;
|
||||
se->w_dfp = w_dfp;
|
||||
se->c_dfp = c_dfp;
|
||||
+ se->found =0;
|
||||
+ se->found_len = 0;
|
||||
*pathtail = se;
|
||||
}
|
||||
|
||||
@@ -549,9 +590,16 @@
|
||||
int
|
||||
walk_name_list (struct name_list *list, const char *name)
|
||||
{
|
||||
+ int name_len;
|
||||
+ name_len = strlen(name);
|
||||
while (list) {
|
||||
- if (! strcmp(list->name, name)) {
|
||||
+ /* if the paths match up to the length of the mount path,
|
||||
+ * AND if the mount path name is longer than the longest
|
||||
+ * found match, we have a new winner */
|
||||
+ if (name_len >= list->found_len &&
|
||||
+ ! strncmp(list->name, name, name_len)) {
|
||||
list->found = 1;
|
||||
+ list->found_len = name_len;
|
||||
/* if required for name_lists that have not saved w_df, etc (eg exclude lists) */
|
||||
if (list->w_df) w_df = list->w_df;
|
||||
if (list->c_df) c_df = list->c_df;
|
19
debian/patches/20_check_ntp_lessbeastlyregex.dpatch
vendored
Executable file
19
debian/patches/20_check_ntp_lessbeastlyregex.dpatch
vendored
Executable file
|
@ -0,0 +1,19 @@
|
|||
#! /bin/sh /usr/share/dpatch/dpatch-run
|
||||
## 20_check_ntp_lessbeastlyregex.dpatch by <seanius@debian.org>
|
||||
##
|
||||
## All lines beginning with `## DP:' are a description of the patch.
|
||||
## DP: No description.
|
||||
|
||||
@DPATCH@
|
||||
diff -urNad nagios-plugins~/plugins-scripts/check_ntp.pl nagios-plugins/plugins-scripts/check_ntp.pl
|
||||
--- nagios-plugins~/plugins-scripts/check_ntp.pl 2005-05-25 16:05:41.000000000 +0200
|
||||
+++ nagios-plugins/plugins-scripts/check_ntp.pl 2005-10-11 16:57:37.000000000 +0200
|
||||
@@ -293,7 +293,7 @@
|
||||
}
|
||||
|
||||
# match sys.peer or pps.peer
|
||||
- if (/^(\*|o)([-0-9.\s]+)\s+([-0-9A-Za-z_().]+)\s+([-0-9.]+)\s+([lumb-]+)\s+([-0-9hm.]+)\s+([-0-9.mh]+)\s+([-0-9.]+)\s+([-0-9.]+)\s+([-0-9.]+)\s+([-0-9.]+)/) {
|
||||
+ if (/^(\*|o)(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S+)/) {
|
||||
$syspeer = $2;
|
||||
$stratum = $4;
|
||||
$jitter = $11;
|
48
debian/patches/21_de.po_fixes.dpatch
vendored
Executable file
48
debian/patches/21_de.po_fixes.dpatch
vendored
Executable file
|
@ -0,0 +1,48 @@
|
|||
#! /bin/sh /usr/share/dpatch/dpatch-run
|
||||
## 21_de.po_fixes.dpatch by <seanius@debian.org>
|
||||
##
|
||||
## All lines beginning with `## DP:' are a description of the patch.
|
||||
## DP: No description.
|
||||
|
||||
@DPATCH@
|
||||
diff -urNad nagios-plugins~/po/de.po nagios-plugins/po/de.po
|
||||
--- nagios-plugins~/po/de.po 2005-10-13 11:00:06.000000000 +0200
|
||||
+++ nagios-plugins/po/de.po 2005-10-13 11:03:58.000000000 +0200
|
||||
@@ -717,7 +717,7 @@
|
||||
#: plugins/check_dns.c:190
|
||||
#, c-format
|
||||
msgid "server %s is not authoritative for %s"
|
||||
-msgstr "Server %s ist nicht authoritativ für %s"
|
||||
+msgstr "Server %s ist nicht autoritativ für %s"
|
||||
|
||||
#: plugins/check_dns.c:202 plugins/check_dummy.c:59 plugins/check_http.c:999
|
||||
#: plugins/check_http.c:1257 plugins/check_procs.c:282
|
||||
@@ -900,11 +900,11 @@
|
||||
|
||||
#: plugins/check_fping.c:291
|
||||
msgid "Packet size must be a positive integer"
|
||||
-msgstr "Packet size muss ein positiver Integer sein"
|
||||
+msgstr "Paketgröße muss ein positiver Integer sein"
|
||||
|
||||
#: plugins/check_fping.c:297
|
||||
msgid "Packet count must be a positive integer"
|
||||
-msgstr "Packet count muss ein positiver Integer sein"
|
||||
+msgstr "Paketanzahl muss ein positiver Integer sein"
|
||||
|
||||
#: plugins/check_fping.c:303 plugins/check_time.c:307 plugins/check_udp.c:207
|
||||
msgid "Hostname was not supplied"
|
||||
@@ -913,12 +913,12 @@
|
||||
#: plugins/check_fping.c:323
|
||||
#, c-format
|
||||
msgid "%s: Only one threshold may be packet loss (%s)\n"
|
||||
-msgstr "%s: Nur ein Wert darf für packet loss angegeben werden (%s)\n"
|
||||
+msgstr "%s: Nur ein Wert darf für paket loss angegeben werden (%s)\n"
|
||||
|
||||
#: plugins/check_fping.c:327
|
||||
#, c-format
|
||||
msgid "%s: Only one threshold must be packet loss (%s)\n"
|
||||
-msgstr "%s: Nur ein Wert darf für packet loss angegeben werden (%s)\n"
|
||||
+msgstr "%s: Nur ein Wert darf für paket loss angegeben werden (%s)\n"
|
||||
|
||||
#: plugins/check_fping.c:359
|
||||
msgid ""
|
90
debian/patches/22_check_smb_hostaddress.dpatch
vendored
Executable file
90
debian/patches/22_check_smb_hostaddress.dpatch
vendored
Executable file
|
@ -0,0 +1,90 @@
|
|||
#! /bin/sh /usr/share/dpatch/dpatch-run
|
||||
## 22_check_smb_hostaddress.dpatch by <seanius@localhost.localdomain>
|
||||
##
|
||||
## All lines beginning with `## DP:' are a description of the patch.
|
||||
## DP: No description.
|
||||
|
||||
@DPATCH@
|
||||
diff -urNad sid~/plugins-scripts/check_disk_smb.pl sid/plugins-scripts/check_disk_smb.pl
|
||||
--- sid~/plugins-scripts/check_disk_smb.pl 2005-10-31 21:44:20.000000000 +0100
|
||||
+++ sid/plugins-scripts/check_disk_smb.pl 2005-10-31 21:44:41.000000000 +0100
|
||||
@@ -23,7 +23,7 @@
|
||||
use POSIX;
|
||||
use strict;
|
||||
use Getopt::Long;
|
||||
-use vars qw($opt_P $opt_V $opt_h $opt_H $opt_s $opt_W $opt_u $opt_p $opt_w $opt_c $verbose);
|
||||
+use vars qw($opt_P $opt_V $opt_h $opt_H $opt_s $opt_W $opt_u $opt_p $opt_w $opt_c $opt_a $verbose);
|
||||
use vars qw($PROGNAME);
|
||||
use lib utils.pm ;
|
||||
use utils qw($TIMEOUT %ERRORS &print_revision &support &usage);
|
||||
@@ -49,7 +49,8 @@
|
||||
"u=s" => \$opt_u, "username=s" => \$opt_u,
|
||||
"s=s" => \$opt_s, "share=s" => \$opt_s,
|
||||
"W=s" => \$opt_W, "workgroup=s" => \$opt_W,
|
||||
- "H=s" => \$opt_H, "hostname=s" => \$opt_H);
|
||||
+ "H=s" => \$opt_H, "hostname=s" => \$opt_H,
|
||||
+ "a=s" => \$opt_a, "address=s" => \$opt_a);
|
||||
|
||||
if ($opt_V) {
|
||||
print_revision($PROGNAME,'$Revision$'); #'
|
||||
@@ -65,7 +66,7 @@
|
||||
# Options checking
|
||||
|
||||
($opt_H) || ($opt_H = shift) || usage("Host name not specified\n");
|
||||
-my $host = $1 if ($opt_H =~ /^([-_.A-Za-z0-9]+\$?)$/);
|
||||
+my $host = $1 if ($opt_H =~ /^([-_.A-Za-z0-9 ]+\$?)$/);
|
||||
($host) || usage("Invalid host: $opt_H\n");
|
||||
|
||||
($opt_s) || ($opt_s = shift) || usage("Share volume not specified\n");
|
||||
@@ -142,6 +143,8 @@
|
||||
|
||||
my $workgroup = $1 if (defined($opt_W) && $opt_W =~ /(.*)/);
|
||||
|
||||
+my $address = $1 if (defined($opt_a) && $opt_a =~ /(.*)/);
|
||||
+
|
||||
# end of options checking
|
||||
|
||||
|
||||
@@ -160,10 +163,21 @@
|
||||
# Execute an "ls" on the share using smbclient program
|
||||
# get the results into $res
|
||||
if (defined($workgroup)) {
|
||||
- $res = qx/$smbclient \/\/$host\/$share -W $workgroup -U $user%$pass $smbclientoptions -c ls/;
|
||||
+ if (defined($address)) {
|
||||
+ print "$smbclient " . "\/\/$host\/$share" ." $pass -W $workgroup -U $user $smbclientoptions -I $address -c ls\n" if ($verbose);
|
||||
+ $res = qx/$smbclient "\/\/$host\/$share" $pass -W $workgroup -U $user $smbclientoptions -I $address -c ls/;
|
||||
+ } else {
|
||||
+ print "$smbclient " . "\/\/$host\/$share" ." $pass -W $workgroup -U $user $smbclientoptions -c ls\n" if ($verbose);
|
||||
+ $res = qx/$smbclient "\/\/$host\/$share" $pass -W $workgroup -U $user $smbclientoptions -c ls/;
|
||||
+ }
|
||||
} else {
|
||||
- print "$smbclient " . "\/\/$host\/$share" ." $pass -U $user $smbclientoptions -c ls\n" if ($verbose);
|
||||
- $res = qx/$smbclient \/\/$host\/$share -U $user%$pass $smbclientoptions -c ls/;
|
||||
+ if (defined($address)) {
|
||||
+ print "$smbclient " . "\/\/$host\/$share" ." $pass -U $user $smbclientoptions -I $address -c ls\n" if ($verbose);
|
||||
+ $res = qx/$smbclient "\/\/$host\/$share" $pass -U $user $smbclientoptions -I $address -c ls/;
|
||||
+ } else {
|
||||
+ print "$smbclient " . "\/\/$host\/$share" ." $pass -U $user $smbclientoptions -c ls\n" if ($verbose);
|
||||
+ $res = qx/$smbclient "\/\/$host\/$share" $pass -U $user $smbclientoptions -c ls/;
|
||||
+ }
|
||||
}
|
||||
#Turn off alarm
|
||||
alarm(0);
|
||||
@@ -239,7 +253,7 @@
|
||||
|
||||
sub print_usage () {
|
||||
print "Usage: $PROGNAME -H <host> -s <share> -u <user> -p <password>
|
||||
- -w <warn> -c <crit> [-W <workgroup>] [-P <port>]\n";
|
||||
+ -w <warn> -c <crit> [-W <workgroup>] [-P <port>] [-a <IP>]\n";
|
||||
}
|
||||
|
||||
sub print_help () {
|
||||
@@ -257,6 +271,8 @@
|
||||
Share name to be tested
|
||||
-W, --workgroup=STRING
|
||||
Workgroup or Domain used (Defaults to \"WORKGROUP\")
|
||||
+-a, --address=IP
|
||||
+ IP-address of HOST (only necessary if HOST is in another network)
|
||||
-u, --user=STRING
|
||||
Username to log in to server. (Defaults to \"guest\")
|
||||
-p, --password=STRING
|
5
debian/pluginconfig/breeze.cfg
vendored
Normal file
5
debian/pluginconfig/breeze.cfg
vendored
Normal file
|
@ -0,0 +1,5 @@
|
|||
# 'check_breeze' command definition
|
||||
define command {
|
||||
command_name check_breeze
|
||||
command_line /usr/lib/nagios/plugins/check_breeze -H $HOSTADDRESS$ -w $ARG1$ -c $ARG2$
|
||||
}
|
15
debian/pluginconfig/dhcp.cfg
vendored
Normal file
15
debian/pluginconfig/dhcp.cfg
vendored
Normal file
|
@ -0,0 +1,15 @@
|
|||
# note: these plugins require root privilege. see README.Debian for
|
||||
# more information on how it is recommended that you do this.
|
||||
|
||||
# 'check_dhcp' command definition
|
||||
define command{
|
||||
command_name check_dhcp
|
||||
command_line /usr/lib/nagios/plugins/check_dhcp -s $HOSTADDRESS$
|
||||
}
|
||||
|
||||
# 'check_dhcp_interface' command definition
|
||||
define command{
|
||||
command_name check_dhcp_interface
|
||||
command_line /usr/lib/nagios/plugins/check_dhcp -s $HOSTADDRESS$ -i $ARG1$
|
||||
}
|
||||
|
54
debian/pluginconfig/disk-smb.cfg
vendored
Normal file
54
debian/pluginconfig/disk-smb.cfg
vendored
Normal file
|
@ -0,0 +1,54 @@
|
|||
# 'check_disk_smb' command definition
|
||||
define command{
|
||||
command_name check_disk_smb
|
||||
command_line /usr/lib/nagios/plugins/check_disk_smb -H "$ARG1$" -s $ARG2$
|
||||
}
|
||||
|
||||
|
||||
# 'check_disk_smb_workgroup' command definition
|
||||
define command{
|
||||
command_name check_disk_smb_workgroup
|
||||
command_line /usr/lib/nagios/plugins/check_disk_smb -H "$ARG1$" -s $ARG2$ -W $ARG3$
|
||||
}
|
||||
|
||||
|
||||
# 'check_disk_smb_host' command definition
|
||||
define command{
|
||||
command_name check_disk_smb_host
|
||||
command_line /usr/lib/nagios/plugins/check_disk_smb -a $HOSTADDRESS$ -H "$ARG1$" -s $ARG2$
|
||||
}
|
||||
|
||||
|
||||
# 'check_disk_smb_workgroup_host' command definition
|
||||
define command{
|
||||
command_name check_disk_smb_workgroup_host
|
||||
command_line /usr/lib/nagios/plugins/check_disk_smb -a $HOSTADDRESS$ -H "$ARG1$" -s $ARG2$ -W $ARG3$
|
||||
}
|
||||
|
||||
|
||||
# 'check_disk_smb_user' command definition
|
||||
define command{
|
||||
command_name check_disk_smb_user
|
||||
command_line /usr/lib/nagios/plugins/check_disk_smb -H "$ARG1$" -s $ARG2$ -u $ARG3$ -p $ARG4$
|
||||
}
|
||||
|
||||
|
||||
# 'check_disk_smb_workgroup_user' command definition
|
||||
define command{
|
||||
command_name check_disk_smb_workgroup_user
|
||||
command_line /usr/lib/nagios/plugins/check_disk_smb -H "$ARG1$" -s $ARG2$ -W $ARG3$ -u $ARG4$ -p $ARG5$
|
||||
}
|
||||
|
||||
|
||||
# 'check_disk_smb_host_user' command definition
|
||||
define command{
|
||||
command_name check_disk_smb_host_user
|
||||
command_line /usr/lib/nagios/plugins/check_disk_smb -a $HOSTADDRESS$ -H "$ARG1$" -s $ARG2$ -u $ARG3$ -p $ARG4$
|
||||
}
|
||||
|
||||
|
||||
# 'check_disk_smb_workgroup_host_user' command definition
|
||||
define command{
|
||||
command_name check_disk_smb_workgroup_host_user
|
||||
command_line /usr/lib/nagios/plugins/check_disk_smb -a $HOSTADDRESS$ -H "$ARG1$" -s $ARG2$ -W $ARG3$ -u $ARG4$ -p $ARG5$
|
||||
}
|
19
debian/pluginconfig/disk.cfg
vendored
Normal file
19
debian/pluginconfig/disk.cfg
vendored
Normal file
|
@ -0,0 +1,19 @@
|
|||
# 'check_disk' command definition
|
||||
define command{
|
||||
command_name check_disk
|
||||
command_line /usr/lib/nagios/plugins/check_disk -w $ARG1$ -c $ARG2$ -p $ARG3$
|
||||
}
|
||||
|
||||
# 'check_all_disks' command definition
|
||||
define command{
|
||||
command_name check_all_disks
|
||||
command_line /usr/lib/nagios/plugins/check_disk -w $ARG1$ -c $ARG2$
|
||||
}
|
||||
|
||||
# 'ssh_disk' command definition
|
||||
define command{
|
||||
command_name ssh_disk
|
||||
command_line /usr/lib/nagios/plugins/check_by_ssh -H $HOSTADDRESS$ -C '/usr/lib/nagios/plugins/check_disk -w $ARG1$ -c $ARG2$ -p $ARG3$'
|
||||
}
|
||||
|
||||
|
11
debian/pluginconfig/dns.cfg
vendored
Normal file
11
debian/pluginconfig/dns.cfg
vendored
Normal file
|
@ -0,0 +1,11 @@
|
|||
# 'check_dns' command definition
|
||||
define command{
|
||||
command_name check_dns
|
||||
command_line /usr/lib/nagios/plugins/check_dns -H www.google.com -s $HOSTADDRESS$
|
||||
}
|
||||
|
||||
# 'check_dig' command definition
|
||||
define command{
|
||||
command_name check_dig
|
||||
command_line /usr/lib/nagios/plugins/check_dig -H $HOSTNAME$ -l $ARG1$
|
||||
}
|
29
debian/pluginconfig/dummy.cfg
vendored
Normal file
29
debian/pluginconfig/dummy.cfg
vendored
Normal file
|
@ -0,0 +1,29 @@
|
|||
# return-ok definition
|
||||
define command {
|
||||
command_name return-ok
|
||||
command_line /usr/lib/nagios/plugins/check_dummy 0
|
||||
}
|
||||
|
||||
# return-warning definition
|
||||
define command {
|
||||
command_name return-warning
|
||||
command_line /usr/lib/nagios/plugins/check_dummy 1
|
||||
}
|
||||
|
||||
# return-critical definition
|
||||
define command {
|
||||
command_name return-critical
|
||||
command_line /usr/lib/nagios/plugins/check_dummy 2
|
||||
}
|
||||
|
||||
# return-unknown definition
|
||||
define command {
|
||||
command_name return-unknown
|
||||
command_line /usr/lib/nagios/plugins/check_dummy 3
|
||||
}
|
||||
|
||||
# return-numeric definition
|
||||
define command {
|
||||
command_name return-numeric
|
||||
command_line /usr/lib/nagios/plugins/check_dummy $ARG1$
|
||||
}
|
6
debian/pluginconfig/flexlm.cfg
vendored
Normal file
6
debian/pluginconfig/flexlm.cfg
vendored
Normal file
|
@ -0,0 +1,6 @@
|
|||
# 'check_flexlm' command definition
|
||||
define command{
|
||||
command_name check_flexlm
|
||||
command_line /usr/lib/nagios/plugins/check_flexlm -F $ARG1$
|
||||
}
|
||||
|
6
debian/pluginconfig/ftp.cfg
vendored
Normal file
6
debian/pluginconfig/ftp.cfg
vendored
Normal file
|
@ -0,0 +1,6 @@
|
|||
# 'check_ftp' command definition
|
||||
define command{
|
||||
command_name check_ftp
|
||||
command_line /usr/lib/nagios/plugins/check_ftp -H $HOSTADDRESS$
|
||||
}
|
||||
|
14
debian/pluginconfig/games.cfg
vendored
Normal file
14
debian/pluginconfig/games.cfg
vendored
Normal file
|
@ -0,0 +1,14 @@
|
|||
# 'check_quake' command definition
|
||||
define command{
|
||||
command_name check_quake
|
||||
command_line /usr/lib/nagios/plugins/check_game qs $HOSTADDRESS$
|
||||
}
|
||||
|
||||
|
||||
# 'check_unreal' command definition
|
||||
define command{
|
||||
command_name check_unreal
|
||||
command_line /usr/lib/nagios/plugins/check_game uns $HOSTADDRESS$ -P $ARG1$ -p 8
|
||||
}
|
||||
|
||||
|
6
debian/pluginconfig/hppjd.cfg
vendored
Normal file
6
debian/pluginconfig/hppjd.cfg
vendored
Normal file
|
@ -0,0 +1,6 @@
|
|||
# 'check_hpjd' command definition
|
||||
define command{
|
||||
command_name check_hpjd
|
||||
command_line /usr/lib/nagios/plugins/check_hpjd -H $HOSTADDRESS$ -C public
|
||||
}
|
||||
|
31
debian/pluginconfig/http.cfg
vendored
Normal file
31
debian/pluginconfig/http.cfg
vendored
Normal file
|
@ -0,0 +1,31 @@
|
|||
# 'check_http' command definition
|
||||
define command{
|
||||
command_name check_http
|
||||
command_line /usr/lib/nagios/plugins/check_http -H $HOSTADDRESS$ -I $HOSTADDRESS$
|
||||
}
|
||||
|
||||
|
||||
# 'check_http2' command definition
|
||||
define command{
|
||||
command_name check_http2
|
||||
command_line /usr/lib/nagios/plugins/check_http -H $ARG1$ -I $HOSTADDRESS$ -w $ARG2$ -c $ARG3$
|
||||
}
|
||||
|
||||
# 'check_squid' command definition
|
||||
define command{
|
||||
command_name check_squid
|
||||
command_line /usr/lib/nagios/plugins/check_http -H $HOSTADDRESS$ -p $ARG1$ -u $ARG2$ -e 'HTTP/1.0 200 OK'
|
||||
}
|
||||
|
||||
# 'check_https' command definition
|
||||
define command{
|
||||
command_name check_https
|
||||
command_line /usr/lib/nagios/plugins/check_http --ssl -H $HOSTADDRESS$ -I $HOSTADDRESS$
|
||||
}
|
||||
|
||||
# 'check_https_auth' command definition
|
||||
define command{
|
||||
command_name check_https_auth
|
||||
command_line /usr/lib/nagios/plugins/check_http --ssl -H $HOSTADDRESS$ -I $HOSTADDRESS$ -a $ARG1$
|
||||
}
|
||||
|
20
debian/pluginconfig/ifstatus.cfg
vendored
Normal file
20
debian/pluginconfig/ifstatus.cfg
vendored
Normal file
|
@ -0,0 +1,20 @@
|
|||
# 'check_ifstatus' command definition
|
||||
define command{
|
||||
command_name check_ifstatus
|
||||
command_line /usr/lib/nagios/plugins/check_ifstatus -H $HOSTADDRESS$ -C public
|
||||
}
|
||||
|
||||
|
||||
# 'check_ifoperstatus_ifindex' command definition
|
||||
define command{
|
||||
command_name check_ifoperstatus_ifindex
|
||||
command_line /usr/lib/nagios/plugins/check_ifoperstatus -H $HOSTADDRESS$ -C public -k $ARG1$
|
||||
}
|
||||
|
||||
|
||||
# 'check_ifoperstatus_ifdescr' command definition
|
||||
define command{
|
||||
command_name check_ifoperstatus_ifdescr
|
||||
command_line /usr/lib/nagios/plugins/check_ifoperstatus -H $HOSTADDRESS$ -C public -d $ARG1$
|
||||
}
|
||||
|
6
debian/pluginconfig/ldap.cfg
vendored
Normal file
6
debian/pluginconfig/ldap.cfg
vendored
Normal file
|
@ -0,0 +1,6 @@
|
|||
# 'check_ldap' command definition
|
||||
define command{
|
||||
command_name check_ldap
|
||||
command_line /usr/lib/nagios/plugins/check_ldap -H $HOSTADDRESS$ -b $ARG1$
|
||||
}
|
||||
|
6
debian/pluginconfig/load.cfg
vendored
Normal file
6
debian/pluginconfig/load.cfg
vendored
Normal file
|
@ -0,0 +1,6 @@
|
|||
# 'check_load' command definition
|
||||
define command{
|
||||
command_name check_load
|
||||
command_line /usr/lib/nagios/plugins/check_load --warning=$ARG1$,$ARG2$,$ARG3$ --critical=$ARG4$,$ARG5$,$ARG6$
|
||||
}
|
||||
|
61
debian/pluginconfig/mail.cfg
vendored
Normal file
61
debian/pluginconfig/mail.cfg
vendored
Normal file
|
@ -0,0 +1,61 @@
|
|||
# 'check_pop' command definition
|
||||
define command {
|
||||
command_name check_pop
|
||||
command_line /usr/lib/nagios/plugins/check_pop -H $HOSTADDRESS$
|
||||
}
|
||||
|
||||
|
||||
# 'check_smtp' command definition
|
||||
define command {
|
||||
command_name check_smtp
|
||||
command_line /usr/lib/nagios/plugins/check_smtp -H $HOSTADDRESS$
|
||||
}
|
||||
|
||||
# 'check_ssmtp' command definition
|
||||
define command {
|
||||
command_name check_ssmtp
|
||||
command_line /usr/lib/nagios/plugins/check_ssmtp -H $HOSTADDRESS$
|
||||
}
|
||||
|
||||
# 'check_imap' command definition
|
||||
define command {
|
||||
command_name check_imap
|
||||
command_line /usr/lib/nagios/plugins/check_imap -H $HOSTADDRESS$
|
||||
}
|
||||
|
||||
# 'check_spop' command definition
|
||||
define command {
|
||||
command_name check_spop
|
||||
command_line /usr/lib/nagios/plugins/check_pop -p 995 -H $HOSTADDRESS$ -S
|
||||
}
|
||||
|
||||
|
||||
# 'check_simap' command definition
|
||||
define command {
|
||||
command_name check_simap
|
||||
command_line /usr/lib/nagios/plugins/check_imap -p 993 -H $HOSTADDRESS$ -S
|
||||
}
|
||||
|
||||
# 'check-mailq' for sendmail
|
||||
define command {
|
||||
command_name check_mailq_sendmail
|
||||
command_line /usr/lib/nagios/plugins/check_mailq -w $ARG1$ -c $ARG2$ -M sendmail
|
||||
}
|
||||
|
||||
# 'check-mailq' for postfix
|
||||
define command {
|
||||
command_name check_mailq_postfix
|
||||
command_line /usr/lib/nagios/plugins/check_mailq -w $ARG1$ -c $ARG2$ -M postfix
|
||||
}
|
||||
|
||||
# 'check-mailq' for exim
|
||||
define command {
|
||||
command_name check_mailq_exim
|
||||
command_line /usr/lib/nagios/plugins/check_mailq -w $ARG1$ -c $ARG2$ -M exim
|
||||
}
|
||||
|
||||
# 'check-mailq' for qmail
|
||||
define command {
|
||||
command_name check_mailq_qmail
|
||||
command_line /usr/lib/nagios/plugins/check_mailq -w $ARG1$ -c $ARG2$ -M qmail
|
||||
}
|
14
debian/pluginconfig/mrtg.cfg
vendored
Normal file
14
debian/pluginconfig/mrtg.cfg
vendored
Normal file
|
@ -0,0 +1,14 @@
|
|||
# 'check_mrtg' command definition
|
||||
define command{
|
||||
command_name check_mrtg
|
||||
command_line /usr/lib/nagios/plugins/check_mrtg $ARG1$ 10 AVG $ARG2$ $ARG3$ $ARG4$ $ARG5$ $ARG6$
|
||||
}
|
||||
|
||||
|
||||
# 'traffic_average' command definition
|
||||
define command{
|
||||
command_name traffic_average
|
||||
command_line /usr/lib/nagios/plugins/check_mrtgtraf $ARG1$ 10 AVG $ARG2$ $ARG3$ $ARG4$ $ARG5$
|
||||
}
|
||||
|
||||
|
11
debian/pluginconfig/mysql.cfg
vendored
Normal file
11
debian/pluginconfig/mysql.cfg
vendored
Normal file
|
@ -0,0 +1,11 @@
|
|||
# 'check_mysql' command definition
|
||||
define command{
|
||||
command_name check_mysql
|
||||
command_line /usr/lib/nagios/plugins/check_mysql -H $HOSTADDRESS$
|
||||
}
|
||||
|
||||
# 'check_mysql_cmdlinecred' command definition
|
||||
define command{
|
||||
command_name check_mysql_cmdlinecred
|
||||
command_line /usr/lib/nagios/plugins/check_mysql -H $HOSTADDRESS$ -u $ARG1$ -p $ARG2$
|
||||
}
|
84
debian/pluginconfig/netware.cfg
vendored
Normal file
84
debian/pluginconfig/netware.cfg
vendored
Normal file
|
@ -0,0 +1,84 @@
|
|||
# 'check_netware_logins' command definition
|
||||
define command{
|
||||
command_name check_netware_logins
|
||||
command_line /usr/lib/nagios/plugins/check_nwstat -H $HOSTADDRESS$ -v "LOGINS" -w $ARG1$ -c $ARG2$
|
||||
}
|
||||
|
||||
|
||||
# 'check_nwstat_conns' command definition
|
||||
define command{
|
||||
command_name check_nwstat_conns
|
||||
command_line /usr/lib/nagios/plugins/check_nwstat -H $HOSTADDRESS$ -v CONNS -w $ARG1$ -c $ARG2$
|
||||
}
|
||||
|
||||
|
||||
# 'check_netware_1load' command definition
|
||||
define command{
|
||||
command_name check_netware_1load
|
||||
command_line /usr/lib/nagios/plugins/check_nwstat -H $HOSTADDRESS$ -v "LOAD1" -w 70 -c 90
|
||||
}
|
||||
|
||||
|
||||
# 'check_netware_5load' command definition
|
||||
define command{
|
||||
command_name check_netware_5load
|
||||
command_line /usr/lib/nagios/plugins/check_nwstat -H $HOSTADDRESS$ -v "LOAD5" -w 70 -c 90
|
||||
}
|
||||
|
||||
|
||||
# 'check_netware_15load' command definition
|
||||
define command{
|
||||
command_name check_netware_15load
|
||||
command_line /usr/lib/nagios/plugins/check_nwstat -H $HOSTADDRESS$ -v "LOAD15" -w 70 -c 90
|
||||
}
|
||||
|
||||
|
||||
# 'check_nwstat_vol_p' command definition
|
||||
define command{
|
||||
command_name check_nwstat_vol_p
|
||||
command_line /usr/lib/nagios/plugins/check_nwstat -H $HOSTADDRESS$ -v VPF$ARG1$ -w $ARG2$ -c $ARG3$
|
||||
}
|
||||
|
||||
|
||||
# 'check_nwstat_vol_k' command definition
|
||||
define command{
|
||||
command_name check_nwstat_vol_k
|
||||
command_line /usr/lib/nagios/plugins/check_nwstat -H $HOSTADDRESS$ -v VKF$ARG1$ -w $ARG2$ -c $ARG3$
|
||||
}
|
||||
|
||||
|
||||
# 'check_nwstat_ltch' command definition
|
||||
define command{
|
||||
command_name check_nwstat_ltch
|
||||
command_line /usr/lib/nagios/plugins/check_nwstat -H $HOSTADDRESS$ -v LTCH -w $ARG1$ -c $ARG2$
|
||||
}
|
||||
|
||||
|
||||
# 'check_nwstat_puprb' command definition
|
||||
define command{
|
||||
command_name check_nwstat_puprb
|
||||
command_line /usr/lib/nagios/plugins/check_nwstat -H $HOSTADDRESS$ -v PUPRB -w $ARG1$ -c $ARG2$
|
||||
}
|
||||
|
||||
|
||||
# 'check_nwstat_dsdb' command definition
|
||||
define command{
|
||||
command_name check_nwstat_dsdb
|
||||
command_line /usr/lib/nagios/plugins/check_nwstat -H $HOSTADDRESS$ -v DSDB
|
||||
}
|
||||
|
||||
|
||||
# 'check_netware_abend' command definition
|
||||
define command{
|
||||
command_name check_netware_abend
|
||||
command_line /usr/lib/nagios/plugins/check_nwstat -H $HOSTADDRESS$ -v "ABENDS" -w 10 -c 30
|
||||
}
|
||||
|
||||
|
||||
# 'check_nwstat_csprocs' command definition
|
||||
define command{
|
||||
command_name check_nwstat_csprocs
|
||||
command_line /usr/lib/nagios/plugins/check_nwstat -H $HOSTADDRESS$ -v CSPROCS -w $ARG1$ -c $ARG2$
|
||||
}
|
||||
|
||||
|
6
debian/pluginconfig/news.cfg
vendored
Normal file
6
debian/pluginconfig/news.cfg
vendored
Normal file
|
@ -0,0 +1,6 @@
|
|||
# 'check_nntp' command definition
|
||||
define command{
|
||||
command_name check_nntp
|
||||
command_line /usr/lib/nagios/plugins/check_nntp -H $HOSTADDRESS$
|
||||
}
|
||||
|
5
debian/pluginconfig/nt.cfg
vendored
Normal file
5
debian/pluginconfig/nt.cfg
vendored
Normal file
|
@ -0,0 +1,5 @@
|
|||
# 'check_nt' command definition
|
||||
define command {
|
||||
command_name check_nt
|
||||
command_line /usr/lib/nagios/plugins/check_nt -H $HOSTADDRESS$ -v $ARG1$
|
||||
}
|
18
debian/pluginconfig/ntp.cfg
vendored
Normal file
18
debian/pluginconfig/ntp.cfg
vendored
Normal file
|
@ -0,0 +1,18 @@
|
|||
# 'check_ntp' command definition
|
||||
define command{
|
||||
command_name check_ntp
|
||||
command_line /usr/lib/nagios/plugins/check_ntp -H $HOSTADDRESS$
|
||||
}
|
||||
|
||||
|
||||
# 'check_ntp_ntpq' command definition
|
||||
define command{
|
||||
command_name check_ntp_ntpq
|
||||
command_line /usr/lib/nagios/plugins/check_ntp -H $HOSTADDRESS$ -j 10 -k 15
|
||||
}
|
||||
|
||||
# 'check_time' command definition
|
||||
define command{
|
||||
command_name check_time
|
||||
command_line /usr/lib/nagios/plugins/check_time -H $HOSTADDRESS$
|
||||
}
|
6
debian/pluginconfig/pgsql.cfg
vendored
Normal file
6
debian/pluginconfig/pgsql.cfg
vendored
Normal file
|
@ -0,0 +1,6 @@
|
|||
# 'check_pgsql' command definition
|
||||
define command{
|
||||
command_name check_pgsql
|
||||
command_line /usr/lib/nagios/plugins/check_pgsql -H $HOSTADDRESS$
|
||||
}
|
||||
|
41
debian/pluginconfig/ping.cfg
vendored
Normal file
41
debian/pluginconfig/ping.cfg
vendored
Normal file
|
@ -0,0 +1,41 @@
|
|||
# 'check_ping' command definition
|
||||
define command{
|
||||
command_name check_ping
|
||||
command_line /usr/lib/nagios/plugins/check_ping -H $HOSTADDRESS$ -w $ARG1$ -c $ARG2$
|
||||
}
|
||||
|
||||
|
||||
# 'check-host-alive' command definition
|
||||
define command{
|
||||
command_name check-host-alive
|
||||
command_line /usr/lib/nagios/plugins/check_ping -H $HOSTADDRESS$ -w 5000,100% -c 5000,100% -p 1
|
||||
}
|
||||
|
||||
|
||||
# 'check-printer-alive' command definition
|
||||
define command{
|
||||
command_name check-printer-alive
|
||||
command_line /usr/lib/nagios/plugins/check_ping -H $HOSTADDRESS$ -w 5000,100% -c 5000,100% -p 1
|
||||
}
|
||||
|
||||
|
||||
# 'check-switch-alive' command definition
|
||||
define command{
|
||||
command_name check-switch-alive
|
||||
command_line /usr/lib/nagios/plugins/check_ping $HOSTADDRESS$ -w 5000,100% -c 5000,100% -p 1
|
||||
}
|
||||
|
||||
|
||||
# 'check-router-alive' command definition
|
||||
define command{
|
||||
command_name check-router-alive
|
||||
command_line /usr/lib/nagios/plugins/check_ping -H $HOSTADDRESS$ -w 5000,100% -c 5000,100% -p 1
|
||||
}
|
||||
|
||||
|
||||
# 'check-fast-alive' command definition
|
||||
define command{
|
||||
command_name check-fast-alive
|
||||
command_line /usr/lib/nagios/plugins/check_fping -H $HOSTADDRESS$
|
||||
}
|
||||
|
20
debian/pluginconfig/procs.cfg
vendored
Normal file
20
debian/pluginconfig/procs.cfg
vendored
Normal file
|
@ -0,0 +1,20 @@
|
|||
# 'check_procs' command definition
|
||||
define command{
|
||||
command_name check_procs
|
||||
command_line /usr/lib/nagios/plugins/check_procs -w $ARG1$ -c $ARG2$
|
||||
}
|
||||
|
||||
|
||||
# 'check_procs_zombie' command definition
|
||||
define command{
|
||||
command_name check_procs_zombie
|
||||
command_line /usr/lib/nagios/plugins/check_procs -w $ARG1$ -c $ARG2$ -s Z
|
||||
}
|
||||
|
||||
|
||||
# 'check_procs_httpd' command definition
|
||||
define command{
|
||||
command_name check_procs_httpd
|
||||
command_line /usr/lib/nagios/plugins/check_procs -w 5:$ARG1$ -c 1:$ARG2$ -C httpd
|
||||
}
|
||||
|
6
debian/pluginconfig/radius.cfg
vendored
Normal file
6
debian/pluginconfig/radius.cfg
vendored
Normal file
|
@ -0,0 +1,6 @@
|
|||
# 'check_radius' command definition
|
||||
define command{
|
||||
command_name check_radius
|
||||
command_line /usr/lib/nagios/plugins/check_radius $ARG1$ $ARG2$ $HOSTADDRESS$ 1812 $ARG3$
|
||||
}
|
||||
|
13
debian/pluginconfig/real.cfg
vendored
Normal file
13
debian/pluginconfig/real.cfg
vendored
Normal file
|
@ -0,0 +1,13 @@
|
|||
# 'check_real_url' command definition
|
||||
define command{
|
||||
command_name check_real_url
|
||||
command_line /usr/lib/nagios/plugins/check_real $HOSTADDRESS$ -p $ARG1$ -wt $ARG2$ -ct $ARG3$ -to 5 -u $ARG4$
|
||||
}
|
||||
|
||||
|
||||
# 'check_real' command definition
|
||||
define command{
|
||||
command_name check_real
|
||||
command_line /usr/lib/nagios/plugins/check_real $HOSTADDRESS$ -p $ARG1$ -wt $ARG2$ -ct $ARG3$ -to 5
|
||||
}
|
||||
|
14
debian/pluginconfig/rpc-nfs.cfg
vendored
Normal file
14
debian/pluginconfig/rpc-nfs.cfg
vendored
Normal file
|
@ -0,0 +1,14 @@
|
|||
|
||||
# 'check-rpc' command definition
|
||||
define command{
|
||||
command_name check-rpc
|
||||
command_line /usr/lib/nagios/plugins/check_rpc -H $HOSTADDRESS$ -C $ARG1$
|
||||
}
|
||||
|
||||
|
||||
# 'check-nfs' command definition
|
||||
define command{
|
||||
command_name check-nfs
|
||||
command_line /usr/lib/nagios/plugins/check_rpc -H $HOSTADDRESS$ -C nfs -c2,3
|
||||
}
|
||||
|
139
debian/pluginconfig/snmp.cfg
vendored
Normal file
139
debian/pluginconfig/snmp.cfg
vendored
Normal file
|
@ -0,0 +1,139 @@
|
|||
# 'snmp_load' command definition
|
||||
define command{
|
||||
command_name snmp_load
|
||||
command_line /usr/lib/nagios/plugins/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$ -c :$ARG5$,:$ARG6$,:$ARG7$ -l load
|
||||
}
|
||||
|
||||
|
||||
# 'snmp_cpustats' command definition
|
||||
define command{
|
||||
command_name snmp_cpustats
|
||||
command_line /usr/lib/nagios/plugins/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 '%'
|
||||
}
|
||||
|
||||
|
||||
# 'snmp_procname' command definition
|
||||
define command{
|
||||
command_name snmp_procname
|
||||
command_line /usr/lib/nagios/plugins/check_snmp -H $HOSTADDRESS$ -C $ARG1$ -o .1.3.6.1.4.1.2021.2.1.5.$ARG2$ -w $ARG3$:$ARG4$ -c $ARG5$:$ARG6$
|
||||
}
|
||||
|
||||
|
||||
# 'snmp_disk' command definition
|
||||
define command{
|
||||
command_name snmp_disk
|
||||
command_line /usr/lib/nagios/plugins/check_snmp -H $HOSTADDRESS$ -C $ARG1$ -o .1.3.6.1.4.1.2021.9.1.7.$ARG2$,.1.3.6.1.4.1.2021.9.1.9.$ARG2$ -w $ARG3$:,:$ARG4$ -c $ARG5$:,:$ARG6$ -u 'kB free (','% used)' -l 'disk space'
|
||||
}
|
||||
|
||||
|
||||
# 'snmp_mem' command definition
|
||||
define command{
|
||||
command_name snmp_mem
|
||||
command_line /usr/lib/nagios/plugins/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$:
|
||||
}
|
||||
|
||||
|
||||
# 'snmp_swap' command definition
|
||||
define command{
|
||||
command_name snmp_swap
|
||||
command_line /usr/lib/nagios/plugins/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$:
|
||||
}
|
||||
|
||||
|
||||
# 'snmp_procs' command definition
|
||||
define command{
|
||||
command_name snmp_procs
|
||||
command_line /usr/lib/nagios/plugins/check_snmp -H $HOSTADDRESS$ -C $ARG1$ -o host.hrSystem.hrSystemProcesses -w :$ARG2$ -c :$ARG3$ -l processes
|
||||
}
|
||||
|
||||
|
||||
# 'snmp_users' command definition
|
||||
define command{
|
||||
command_name snmp_users
|
||||
command_line /usr/lib/nagios/plugins/check_snmp -H $HOSTADDRESS$ -C $ARG1$ -o host.hrSystem.hrSystemNumUsers -w :$ARG2$ -c :$ARG3$ -l users
|
||||
}
|
||||
|
||||
|
||||
# 'snmp_mem2' command definition
|
||||
define command{
|
||||
command_name snmp_mem2
|
||||
command_line /usr/lib/nagios/plugins/check_snmp -H $HOSTADDRESS$ -C $ARG1$ -o host.hrStorage.hrStorageTable.hrStorageEntry.hrStorageUsed.$ARG2$,host.hrStorage.hrStorageTable.hrStorageEntry.hrStorageSize.$ARG2$ -w $ARG3$ -c $ARG4$
|
||||
}
|
||||
|
||||
|
||||
# 'snmp_swap2' command definition
|
||||
define command{
|
||||
command_name snmp_swap2
|
||||
command_line /usr/lib/nagios/plugins/check_snmp -H $HOSTADDRESS$ -C $ARG1$ -o host.hrStorage.hrStorageTable.hrStorageEntry.hrStorageUsed.$ARG2$,host.hrStorage.hrStorageTable.hrStorageEntry.hrStorageSize.$ARG2$ -w $ARG3$ -c $ARG4$
|
||||
}
|
||||
|
||||
|
||||
# 'snmp_mem3' command definition
|
||||
define command{
|
||||
command_name snmp_mem3
|
||||
command_line /usr/lib/nagios/plugins/check_snmp -H $HOSTADDRESS$ -C $ARG1$ -o host.hrStorage.hrStorageTable.hrStorageEntry.hrStorageUsed.$ARG2$,host.hrStorage.hrStorageTable.hrStorageEntry.hrStorageSize.$ARG2$ -w $ARG3$ -c $ARG4$
|
||||
}
|
||||
|
||||
|
||||
# 'snmp_swap3' command definition
|
||||
define command{
|
||||
command_name snmp_swap3
|
||||
command_line /usr/lib/nagios/plugins/check_snmp -H $HOSTADDRESS$ -C $ARG1$ -o host.hrStorage.hrStorageTable.hrStorageEntry.hrStorageUsed.$ARG2$,host.hrStorage.hrStorageTable.hrStorageEntry.hrStorageSize.$ARG2$ -w $ARG3$ -c $ARG4$
|
||||
}
|
||||
|
||||
|
||||
# 'snmp_disk2' command definition
|
||||
define command{
|
||||
command_name snmp_disk2
|
||||
command_line /usr/lib/nagios/plugins/check_snmp -H $HOSTADDRESS$ -C $ARG1$ -o host.hrStorage.hrStorageTable.hrStorageEntry.hrStorageUsed.$ARG2$ -w $ARG3$ -c $ARG4$
|
||||
}
|
||||
|
||||
|
||||
# 'snmp_tcpopen' command definition
|
||||
define command{
|
||||
command_name snmp_tcpopen
|
||||
command_line /usr/lib/nagios/plugins/check_snmp -H $HOSTADDRESS$ -C $ARG1$ -o tcp.tcpCurrEstab.0 -w $ARG2$ -c $ARG3$
|
||||
}
|
||||
|
||||
|
||||
# 'snmp_tcpstats' command definition
|
||||
define command{
|
||||
command_name snmp_tcpstats
|
||||
command_line /usr/lib/nagios/plugins/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'
|
||||
}
|
||||
|
||||
|
||||
# 'check_snmp_bgpstate' command definition
|
||||
define command{
|
||||
command_name check_snmp_bgpstate
|
||||
command_line /usr/lib/nagios/plugins/check_bgpstate -H $HOSTADDRESS$ -C public
|
||||
}
|
||||
|
||||
|
||||
# 'check_netapp_uptime' command definition
|
||||
define command{
|
||||
command_name check_netapp_uptime
|
||||
command_line /usr/lib/nagios/plugins/check_snmp -H $HOSTADDRESS$ -C $ARG1$ -o .1.3.6.1.2.1.1.3.0 --delimiter=')' -l "Uptime is"
|
||||
}
|
||||
|
||||
|
||||
# 'check_netapp_cpuload' command definition
|
||||
define command{
|
||||
command_name check_netapp_cpuload
|
||||
command_line /usr/lib/nagios/plugins/check_snmp -H $HOSTADDRESS$ -C $ARG1$ -o .1.3.6.1.4.1.789.1.2.1.3.0 -w 90 -c 95 -u '%' -l "CPU LOAD "
|
||||
}
|
||||
|
||||
|
||||
# 'check_netapp_numdisks' command definition
|
||||
define command{
|
||||
command_name check_netapp_numdisks
|
||||
command_line /usr/lib/nagios/plugins/check_snmp -H $HOSTADDRESS$ -C $ARG1$ -o .1.3.6.1.4.1.789.1.6.4.1.0,.1.3.6.1.4.1.789.1.6.4.2.0,.1.3.6.1.4.1.789.1.6.4.8.0,.1.3.6.1.4.1.789.1.6.4.7.0 -u 'Total Disks','Active','Spare','Failed' -l ""
|
||||
}
|
||||
|
||||
|
||||
# 'check_compaq_thermalCondition' command definition
|
||||
define command{
|
||||
command_name check_compaq_thermalCondition
|
||||
command_line /usr/lib/nagios/plugins/check_snmp -H $HOSTADDRESS$ -C $ARG1$ -o .1.3.6.1.4.1.232.6.2.1.0,.1.3.6.1.4.1.232.6.2.2.0,.1.3.6.1.4.1.232.6.2.3.0,.1.3.6.1.4.1.232.6.2.4.0 -u 'ThermalCondition','ThermalTemp','ThermalSystem','ThermalCPUFan' -w 2:2,2:2,2:2,2:2 -c 1:2,1:2,1:2,1:2 -l "Thermal status "
|
||||
}
|
||||
|
5
debian/pluginconfig/ssh.cfg
vendored
Normal file
5
debian/pluginconfig/ssh.cfg
vendored
Normal file
|
@ -0,0 +1,5 @@
|
|||
# 'check_ssh' command definition
|
||||
define command{
|
||||
command_name check_ssh
|
||||
command_line /usr/lib/nagios/plugins/check_ssh $HOSTADDRESS$
|
||||
}
|
13
debian/pluginconfig/tcp_udp.cfg
vendored
Normal file
13
debian/pluginconfig/tcp_udp.cfg
vendored
Normal file
|
@ -0,0 +1,13 @@
|
|||
# 'check_tcp' command definition
|
||||
define command{
|
||||
command_name check_tcp
|
||||
command_line /usr/lib/nagios/plugins/check_tcp -H $HOSTADDRESS$ -p $ARG1$
|
||||
}
|
||||
|
||||
|
||||
# 'check_udp' command definition
|
||||
define command{
|
||||
command_name check_udp
|
||||
command_line /usr/lib/nagios/plugins/check_udp -H $HOSTADDRESS$ -p $ARG1$
|
||||
}
|
||||
|
6
debian/pluginconfig/telnet.cfg
vendored
Normal file
6
debian/pluginconfig/telnet.cfg
vendored
Normal file
|
@ -0,0 +1,6 @@
|
|||
# 'check_telnet' command definition
|
||||
define command{
|
||||
command_name check_telnet
|
||||
command_line /usr/lib/nagios/plugins/check_tcp -H $HOSTADDRESS$ -p 23
|
||||
}
|
||||
|
6
debian/pluginconfig/users.cfg
vendored
Normal file
6
debian/pluginconfig/users.cfg
vendored
Normal file
|
@ -0,0 +1,6 @@
|
|||
# 'check_users' command definition
|
||||
define command{
|
||||
command_name check_users
|
||||
command_line /usr/lib/nagios/plugins/check_users -w $ARG1$ -c $ARG2$
|
||||
}
|
||||
|
6
debian/pluginconfig/vsz.cfg
vendored
Normal file
6
debian/pluginconfig/vsz.cfg
vendored
Normal file
|
@ -0,0 +1,6 @@
|
|||
# 'check_vsz' command definition
|
||||
define command{
|
||||
command_name check_vsz
|
||||
command_line /usr/lib/nagios/plugins/check_vsz -w 8096 -c 16182 -C httpd
|
||||
}
|
||||
|
130
debian/rules
vendored
Executable file
130
debian/rules
vendored
Executable file
|
@ -0,0 +1,130 @@
|
|||
#!/usr/bin/make -f
|
||||
# -*- makefile -*-
|
||||
# Sample debian/rules that uses debhelper.
|
||||
# GNU copyright 1997 to 1999 by Joey Hess.
|
||||
|
||||
# Uncomment this to turn on verbose mode.
|
||||
#export DH_VERBOSE=1
|
||||
|
||||
PACKAGE = nagios-plugins
|
||||
|
||||
include /usr/share/dpatch/dpatch.make
|
||||
|
||||
# These are used for cross-compiling and for saving the configure script
|
||||
# from having to guess our platform (since we know it already)
|
||||
DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
|
||||
DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
|
||||
|
||||
CFLAGS = -Wall -g
|
||||
|
||||
NP_LIBEXEC:=/usr/lib/nagios/plugins
|
||||
NP_ETC:=/etc/nagios-plugins/config
|
||||
NP_BASIC_DIR:=$(CURDIR)/debian/nagios-plugins-basic
|
||||
NP_STD_DIR:=$(CURDIR)/debian/nagios-plugins-standard
|
||||
std_plugins:=check_breeze check_ifoperstatus check_hpjd check_ifstatus \
|
||||
check_rpc check_snmp check_wave check_fping check_game \
|
||||
check_radius check_mysql check_pgsql check_disk_smb check_ldap \
|
||||
check_ping check_dns check_flexlm check_ntp check_oracle
|
||||
std_plugin_cfgs:=breeze dns flexlm games hppjd ifstatus ldap mrtg mysql \
|
||||
netware nt ntp pgsql ping radius snmp
|
||||
|
||||
|
||||
PATH = /bin:/sbin:/usr/bin:/usr/sbin
|
||||
|
||||
|
||||
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
|
||||
CFLAGS += -O0
|
||||
else
|
||||
CFLAGS += -O2
|
||||
endif
|
||||
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
|
||||
INSTALL_PROGRAM += -s
|
||||
endif
|
||||
|
||||
config.status: configure
|
||||
export PATH=$(PATH)
|
||||
dh_testdir
|
||||
# Add here commands to configure the package.
|
||||
EXTRAS="check_game check_fping check_by_ssh" CFLAGS="$(CFLAGS)" ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --libexecdir=${NP_LIBEXEC} --with-nagios-user=nagios --with-nagios-group=nagios --with-trusted-path=/bin:/sbin:/usr/bin:/usr/sbin --with-df-command="/bin/df -Pk"
|
||||
|
||||
build: patch-stamp build-stamp
|
||||
|
||||
build-stamp: config.status
|
||||
dh_testdir
|
||||
|
||||
# Add here commands to compile the package.
|
||||
$(MAKE)
|
||||
#/usr/bin/docbook-to-man debian/nagios-plugins.sgml > nagios-plugins.1
|
||||
|
||||
touch build-stamp
|
||||
|
||||
clean: really-clean unpatch
|
||||
|
||||
really-clean:
|
||||
dh_testdir
|
||||
dh_testroot
|
||||
rm -f build-stamp
|
||||
|
||||
# Add here commands to clean up after the build process.
|
||||
-$(MAKE) distclean
|
||||
dh_clean
|
||||
|
||||
install: build
|
||||
dh_testdir
|
||||
dh_testroot
|
||||
dh_clean -k
|
||||
dh_installdirs
|
||||
|
||||
# Add here commands to install the package into debian/nagios-plugins.
|
||||
$(MAKE) install DESTDIR=${NP_BASIC_DIR}
|
||||
chmod 644 ${NP_BASIC_DIR}/usr/lib/nagios/plugins/utils.pm
|
||||
cp $(CURDIR)/debian/pluginconfig/*.cfg ${NP_BASIC_DIR}/${NP_ETC}
|
||||
# split up basic vs. standard plugins
|
||||
for p in ${std_plugins}; do \
|
||||
mv ${NP_BASIC_DIR}/${NP_LIBEXEC}/$$p ${NP_STD_DIR}/${NP_LIBEXEC}; \
|
||||
done
|
||||
# now do the same for their configs
|
||||
for c in ${std_plugin_cfgs}; do \
|
||||
mv ${NP_BASIC_DIR}/${NP_ETC}/$${c}.cfg ${NP_STD_DIR}/${NP_ETC}; \
|
||||
done
|
||||
# XXX upstream breakage
|
||||
ln -s check_ldap ${NP_STD_DIR}/${NP_LIBEXEC}/check_ldaps
|
||||
|
||||
|
||||
# Build architecture-independent files here.
|
||||
binary-indep: build install
|
||||
# We have nothing to do by default.
|
||||
|
||||
# Build architecture-dependent files here.
|
||||
binary-arch: build install
|
||||
dh_testdir
|
||||
dh_testroot
|
||||
dh_installchangelogs ChangeLog
|
||||
dh_installdocs
|
||||
dh_installexamples command.cfg
|
||||
# dh_install
|
||||
# dh_installmenu
|
||||
# dh_installdebconf
|
||||
# dh_installlogrotate
|
||||
# dh_installemacsen
|
||||
# dh_installpam
|
||||
# dh_installmime
|
||||
# dh_installinit
|
||||
# dh_installcron
|
||||
# dh_installinfo
|
||||
dh_installman
|
||||
# dh_link
|
||||
dh_strip
|
||||
dh_compress
|
||||
dh_fixperms -X utils.pm
|
||||
# dh_perl
|
||||
# dh_python
|
||||
# dh_makeshlibs
|
||||
dh_installdeb
|
||||
dh_shlibdeps
|
||||
dh_gencontrol
|
||||
dh_md5sums
|
||||
dh_builddeb
|
||||
|
||||
binary: binary-indep binary-arch
|
||||
.PHONY: build clean binary-indep binary-arch binary install
|
2
debian/watch
vendored
Normal file
2
debian/watch
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
version=2
|
||||
http://prdownloads.sourceforge.net/nagiosplug/nagios-plugins-([\d+\.a-z]+|\d+)\.tar\.gz
|
Loading…
Add table
Add a link
Reference in a new issue