Commit graph

2244 commits

Author SHA1 Message Date
Holger Weiss
bf7c4f95ae Merge remote-tracking branch 'github/waja/master'
Conflicts:
	NEWS
2012-06-25 01:14:12 +02:00
Holger Weiss
991054fa6e check_ping: Ignore ping(1)'s exit status
Don't return a WARNING state if the number of lost packets is greater
than zero but below the specified warning threshold.  This happened
because the check_ping plugin used the exit status of the ping(1)
utility.  (#3535140 - Tobias Brox)
2012-06-24 15:51:56 +02:00
Holger Weiss
d61a3056c5 check_disk_smb: Add performance data
(Debian #654259 - Charles-Henri Larose)
2012-06-23 10:22:08 +02:00
Holger Weiss
e6df238350 Fix check_by_ssh test for non-Bash login shells
In the C shell and in the Z shell, the "?" character must be quoted or
backslash-escaped in order to use it verbatim.  Therefore, a command
such as

	check_by_ssh -H test.example.com -l joe echo huh?

might fail, depending on joe's login shell on test.example.com.

Just to make sure, this commit removes most punctuation characters from
our test strings.
2012-06-22 17:11:18 +02:00
Holger Weiss
4d52762732 check_dhcp: Don't misinterpret the "siaddr" field
RFC 2131 (2.) says: "DHCP clarifies the interpretation of the 'siaddr'
field as the address of the server to use in the next step of the
client's bootstrap process."  So, we shouldn't interpret this field as
the DHCP server's own address.  (#3503921 - Jason Ellison)
2012-06-14 00:39:55 +02:00
Holger Weiss
f091d59e0f check_dhcp: Fix handling of "pad" options
Don't let "pad" options[*] terminate the parsing of DHCP options.  This
bug was triggered by using check_dhcp against Windows 2003 DHCP servers
(see #3503921).

[*] Cf. RFC 2132, 3.1.
2012-06-13 12:36:42 +02:00
Holger Weiss
a80eafbf9c Improve parsing of ping6(1) output
The ping6(1) implementation provided by Debian's iputils-ping package
may produce output such as the following:

| 3 packets transmitted, 0 received, +3 errors, 100% packet loss, time 2009ms

There's a corresponding pattern in check_ping.c:458:

| "%*d packets transmitted, %*d received, +%*d errors, %d%% packet loss"

Without this fix, the pattern in check_ping.c:456 matched first (as
sscanf(3) interprets "+3" as a match for "%d"):

| "%*d packets transmitted, %*d received, %d%% loss, time"

(#1894850 - Debian bug report #514588 - Matej Vela)
2012-06-11 23:40:04 +02:00
Holger Weiss
4e9eedc8de Fix whitespace and capitalization issues
Fix indentation and whitespace issues, and correct some capitalization
errors in error messages.  The behaviour is unchanged.
2012-06-11 23:34:15 +02:00
Holger Weiss
3fd1bd97ca Don't use SSLv2 when compiling against GnuTLS
GnuTLS doesn't support SSL version 2.
2012-06-11 23:23:40 +02:00
Holger Weiss
094a6fa2f3 check_users: Whitespace fixes, etc. 2012-06-07 10:43:15 +02:00
Holger Weiss
e4d9abc4e2 Update NEWS and THANKS w.r.t. check_users change 2012-06-07 10:33:57 +02:00
M. Remy
3e622f3a47 check_users: improve performance
This patch use the utxent function family to collect the user data. It improve the check speed.
Need a system conforming to POSIX.1-2001.
2012-06-07 10:14:16 +02:00
Sebastian Harl
679a229606 sslutils: Check if OpenSSL supports SSLv2.
Recent versions/builds seem to disable that feature.
2012-06-06 13:48:52 +02:00
Holger Weiss
804e7d878c Mention the check_range function in NEWS, etc. 2012-05-29 14:27:58 +02:00
Alex Griffin
aab6b8a16c Added check_range shell function to utils.sh.in 2012-05-29 14:07:37 +02:00
Holger Weiss
252ae618fc check_http: Fix -C/--certificate option handling
The support for specifying the desired SSL protocol version via an
optional -S/--ssl argument broke the -C/--certificate option.  This is
fixed now.
2012-05-29 12:59:16 +02:00
Holger Weiss
ec2596b92d check_http: Don't ignore SSL initialization errors
SSL initialization errors are now handled properly by check_http
(#3095106 - Eric Schoeller).
2012-05-28 21:42:48 +02:00
Holger Weiss
bc3307ed6e Add support for specifying SSL protocol version
The check_http -S/--ssl option now takes an optional argument which
specifies the desired SSL/TLS protocol version (#3285367 - Jason Lunn).
2012-05-28 17:16:04 +02:00
Holger Weiss
5a5d3d7013 Disable stateless SSL session resumption
Some versions of OpenSSL fail to negotiate the SSL connection with at
least some versions of Tomcat if stateless SSL session resumption
support (see RFC4507) is enabled:

| CRITICAL - Cannot make SSL connection
| 140099330348712:error:140943F2:SSL routines:SSL3_READ_BYTES:sslv3 alert unexpected message:s3_pkt.c:1195:SSL alert number 10

The problem is reproducible with OpenSSL 1.0.0h, but not with OpenSSL
0.9.8o-4squeeze12 (as shipped with Debian 6.0.4).  We work around it by
disabling the RFC4507 functionality when using OpenSSL versions which
support it.

Thanks to Dag Bakke for reporting the issue and for giving me access to
a server I could use to reproduce the problem.
2012-05-07 12:11:48 +02:00
Holger Weiss
efa2a32a16 Add nagios-plugins.spec file to .gitignore
The nagios-plugins.spec file is created from nagios-plugins.spec.in and
should be ignored by Git.
2012-04-17 13:37:46 +02:00
Jan Wagner
c69890a4b4 Fix check_ping where output of ping6 when unreachable (Debian #662638) 2012-04-17 11:46:16 +02:00
Matthias Eble
4c30935850 Merge branch 'master' of ssh://nagiosplug.git.sourceforge.net/gitroot/nagiosplug/nagiosplug 2012-04-10 22:49:24 +02:00
Holger Weiss
8c7e2b636c Mention check_by_ssh -F option in NEWS file 2012-04-09 23:04:55 +02:00
Sven Nierlein
83655083af check_by_ssh: added -F config file to specify alternative ssh config 2012-04-09 22:16:39 +02:00
Eric Stanley
019c926370 Merge branch 'master' of ssh://nagiosplug.git.sourceforge.net/gitroot/nagiosplug/nagiosplug 2012-04-06 10:22:05 -05:00
Eric Stanley
9cdd9a149c Updated to support compiling and building RPM on AIX. 2012-04-06 10:18:47 -05:00
Holger Weiss
d796c16327 Clarify that check_http won't verify certificates
Add a note to the --help output which clarifies that check_http doesn't
perform certificate verification (beyond what the "-C" option does).

(Suggested by Michael Renner in Debian bug report #644627, forwarded by
Jan Wagner.)
2012-02-24 13:24:56 +01:00
Holger Weiss
b93c8eebc7 Cosmetic change
Replace all occurrences of "strstr(s, "c") == s" with "s[0] == 'c'".
2012-02-24 12:31:20 +01:00
Holger Weiss
0e3fa54782 Accept multiple labels specified with "-l"
Fix the code which accepts a comma-separated list of labels specified
via the "-l" option.

(Spotted by Oskar Liljeblad in Debian bug report #647020, forwarded by
Jan Wagner.)
2012-02-24 12:29:00 +01:00
Eric Stanley
4011599466 Enable compiling on AIX 6.1 2012-02-10 10:27:24 -06:00
Eric Stanley
355ad150eb Added pst3 to Solaris package. 2012-01-20 06:49:49 -06:00
Holger Weiss
d287ca27be Updated Nagios::Plugin library 2011-12-25 16:40:58 +01:00
Eric Stanley
48b42a6d1d Commit files which were inadvertently omitted from the previous commit. 2011-12-16 10:29:48 -06:00
Eric Stanley
ce7d5f1a3a Updated Solaris package creation to newer standards
The Solaris package creation has been updated to newer standards to match those
of the NRPE package. The following changes have been made:
    - the plugins now install under /opt/nagios
    - the name of package is now NGOSplugin
    - the files installed are now owned by the nagios user
    - the package includes a pre-installation script that creates a nagios user
        and a nagios group if one did not previously exist
2011-12-16 10:25:44 -06:00
Eric Stanley
55fb4097cd Fixed issue for compiling mysql plugin on Solaris
On Solaris, in the case where the mysql libraries were compiled using a
non-gcc compiler, but the plugins are being compiled with gcc, the configure
process would incorrectly determine the MYSQLCFLAGS. This has been corrected
in the m4/np_mysqlclient.m4 file.
2011-12-16 10:18:41 -06:00
Holger Weiss
5532dbe48a check_sensors: Use symbolic exit codes
Specify the exit codes by using the constants from utils.sh.
2011-09-07 14:04:01 +02:00
Holger Weiss
f720f4a3c0 check_sensors: Minor whitespace fixes 2011-09-07 13:57:38 +02:00
Holger Weiss
276c5b98bf check_sensors: Detect FAULT status
Return an UNKNOWN status if a faulty sensor is detected.  This can be
suppressed with the new "--ignore-fault" option.

(Fixes Debian bug #615133, patch suggested by Jan Wagner.)
2011-09-07 13:55:53 +02:00
Thomas Guyot-Sionnest
f917244ab5 Make GCC happy
It won't trust us about msg containing no format string, and fail miserably
when compiled with -Werror=format-security. Reported by spy6 on IRC.
2011-09-06 23:20:21 -04:00
Matthias Eble
9978b3ca74 Fix: check_ldap now correctly handles the long option --hostname for -H
The undocumented --host has been changed to --hostname which is actually
mentioned in --help. Thanks to lgarrett (#3191388)
2011-08-13 03:44:27 +02:00
Ton Voon
4d06603060 Fix check_smtp and check_tcp where duplicate messages were displayed for certificate errors (Opsview team) 2011-07-15 21:19:15 +01:00
Ton Voon
e7f6da0211 New option to check_smtp to ignore failures when sending QUIT (#3358348 - Duncan Ferguson) 2011-07-15 16:48:45 +01:00
Sebastian Harl
5ebe25fc24 check_host: Allocate a large-enough buffer for the host table.
When specifying a host-name on the command line, each of its IPs is added to
the host table (and each one is pinged). So, the buffer has to be large enough
to hold all of the respective host objects. (argc - 1) only fits hosts with a
single IP.

Thanks to Max Kosmach <max@tcen.ru> for reporting this in Debian bug #623702.
2011-04-28 20:42:53 -04:00
Thomas Guyot-Sionnest
1bc7a4a198 Add perfdata to check_ssh (#3244097 - Marco Beck) 2011-03-26 15:44:38 -04:00
Holger Weiss
d16f3fb0a9 check_smtp: Abort on missing/unexpected greeting
Abort immediately if we don't receive a server greeting or if the
greeting doesn't contain the "--expect"ed string (by default: "220")
instead of blindly sending the EHLO/HELO line.

Spotted by Daniel Piddock, see Debian bug report #611914.
2011-02-08 17:07:52 +01:00
Thomas Guyot-Sionnest
4611e41bc5 check_http: check for and print the certificate cn
This patch adds a check for the certificate cn (hostname) to normal
certificate checks. It returns CRITICAL if th cn is missing, otherwise it
prints it in the normal output.

Patch by Stéphane Urbanovski
2011-02-04 00:54:52 -05:00
Ton Voon
1a5a83bb82 Fix for regex input of '|', being output causing problems with Nagios' parsing of
performance data. Now replaced with ','
2011-01-21 13:14:33 +00:00
Thomas Guyot-Sionnest
ae2a669137 Test updates...
1. Timetick test could fail with uptime > 115 days. Thresholds are
double type, so it's safe to put a large number even for 32bit systems.
2. Add a test based on an invalid bug report, worthy anyway.
2011-01-05 23:09:54 -05:00
Thomas Guyot-Sionnest
fdd0028be1 Update the README text 2011-01-01 16:21:56 -05:00
Thomas Guyot-Sionnest
890e0ae000 Make check_http use standard threshold functions
This enables floating point and ranges, and make the code more standard.
2011-01-01 15:29:43 -05:00