Commit graph

1136 commits

Author SHA1 Message Date
Ton Voon
6805fecd62 Fixed rate-multiplier option 2010-06-30 09:01:14 +01:00
tonvoon
b8e2850c1a Added option to invert search results 2010-06-23 15:56:29 +00:00
tonvoon
1252195ed5 Display missing search string and URL when failed (Duncan Ferguson #2999924) 2010-06-23 14:44:34 +00:00
Ton Voon
18f6835eda Added state retention APIs. Implemented for check_snmp with --rate option.
See http://nagiosplugin.org/c-api-private for more details on the API.

Also updated check_snmp -l option to change the perfdata label.
2010-06-23 13:30:34 +00:00
Thomas Guyot-Sionnest
4b42d5aff4 Add missing --fqdn help (Jan Wagner) 2010-05-08 17:41:14 -04:00
Thomas Guyot-Sionnest
a4bab0bb46 Update extra-opts help text based on ML agreement 2010-04-28 06:03:57 -04:00
Thomas Guyot-Sionnest
eaf3cb27f4 Add newline after "Usage:" in --help 2010-04-22 08:57:14 -04:00
Thomas Guyot-Sionnest
a46df94001 Split long line in check_cluster --help 2010-04-22 08:50:55 -04:00
Thomas Guyot-Sionnest
884aee0667 Standardize the extra-opts notes 2010-04-21 23:29:18 -04:00
Thomas Guyot-Sionnest
00bf32bb60 Fix tests and update NEWS file 2010-04-21 23:04:06 -04:00
Thomas Guyot-Sionnest
47d04677b7 Replace the lousy multiline parser with a robust one.
This one counts double quotes and backslashes so it should handle any
level of escaping.
2010-04-21 22:39:44 -04:00
Thomas Guyot-Sionnest
582034478b Attempt at fixing check_snmp multiline output:
This patch tries to detect and output nicely multi-line strings. This
method is broken by design; only a count of double-quotes and escapes
could work in every situation.
2010-04-21 22:04:28 -04:00
Thomas Guyot-Sionnest
25d1ee331d Fix translations when extra-opts aren't enabled
Bug #2832884 reported problem with translations outputting pot file
headers. This is caused by "" matching the header of the translation
files.

This patch moves gettext macros inside utils macros and update some
french translations.
2010-04-14 08:33:06 -04:00
Thomas Guyot-Sionnest
b649333321 Update french translation (fix all fuzzy's) 2010-04-14 05:48:41 -04:00
Thomas Guyot-Sionnest
a179737771 Fix check_radius returning OK on unexpected results
REJECT_RC is defined on some radiusclient versions and differenciates
between auth errors and bad responses. This patch will affect only the
behaviour of those clients exporting REJECT_RC.

In addition, unexpected return codes are now handled properly and
return UNKNOWN.
2010-04-14 03:38:52 -04:00
Holger Weiss
c63a4f726a Fix typo 2010-04-13 01:02:07 +02:00
Holger Weiss
08f8307204 Fix Debian bug #482947: No --nas-ip-address option
| check_radius doesn't seem to provide any way to modify the
| NAS-IP-Address attribute that it uses in the packets it sends, but it
| does so for NAS-Identifier.
|
| Instead, it hardcodes the IP address that it gets from the
| rc_own_ipaddress() library call, and that in turn translates into
| calling gethostbyname() on the result of uname(). This call can easily
| fail, and its result can easily be unsuitable - for example when the
| Nagios instance uses its own virtual host, and you don't want the
| original system hostname leaked to the RADIUS servers you monitor with
| this.
|
| Furthermore, this behaviour is inconsistent with RFC 2865, which
| defines the two attributes as analogous and never suggests hardcoding
| the value of either of them in client software.

Therefore, this commit adds the "-N, --nas-ip-address" option which
allows for specifying the value of the NAS-IP-Address attribute.

| I've also noticed that the original code for NAS-IP-Address hardcoding
| is broken in its error handling - it does "return (ERROR_PC)", which
| is meaningless in the context of check_radius.c. That actually seems
| to be copy&waste from radiusclient-0.3.2/src/radexample.c. :) I fixed
| that.
|
| While debugging, I also took the opportunity to decouple the
| nas-identifier rc_avpair_add() instance from the initial three,
| because this is just bad practice to lump a fourth optional attribute
| into the same block with the required attributes, the error handling
| for which is throwing the same daft message "Out of Memory?"...

[ http://bugs.debian.org/482947 ]

(Contributed by Josip Rodin, forwarded by Jan Wagner.)
2010-04-11 16:33:44 +02:00
Holger Weiss
ce3de90c9e Fix Debian bug #479984: Allow empty LDAP base
The check_ldap plugin did not allow for specifying an empty LDAP base.

See: http://bugs.debian.org/479984

(Fixed by Stephane Chazelas, forwarded by Jan Wagner.)
2010-04-11 11:28:02 +02:00
Holger Weiss
aef79b7f41 Fix Debian bug #460097: check_http -M broken
See: http://bugs.debian.org/460097

One instance of this bug has already been fixed in commit
8883581220.

(Fixed by Hilko Bengen, forwarded by Jan Wagner.)
2010-04-11 11:05:49 +02:00
Holger Weiss
1fe0f16d34 Fix Debian bug #463322: Use deprecated libldap API
| Our automated build log filter[1] detected a problem that is likely to
| cause your package to segfault on architectures where the size of a
| pointer is greater than the size of an integer, such as ia64 and
| amd64.
|
| This is often due to a missing function prototype definition.  For
| more information, see [2].
|
| 	Function `ldap_init' implicitly converted to pointer at
| 	check_ldap.c:124
|
| [1] http://people.debian.org/~dannf/check-implicit-pointer-functions
| [2] http://wiki.debian.org/ImplicitPointerConversions
|
| The libldap API has been updated and many functions used by the ldap
| plugin are now deprecated.  This package should either update to the
| new API or define LDAP_DEPRECATED to continue using the deprecated
| interfaces.
|
| This patch implements the lazy solution.

[ http://bugs.debian.org/463322 ]

(Contributed by Dann Frazier, forwarded by Jan Wagner.)
2010-04-11 09:51:21 +02:00
Holger Weiss
4bf27452ab Fix Debian bug #307905: Incorrect usage output
The usage output of check_game was wrong, see:

	http://bugs.debian.org/307905

(Fixed by Sean Finney, forwarded by Jan Wagner.)
2010-04-11 08:45:16 +02:00
Thomas Guyot-Sionnest
fe1c6106d9 Fix regression in check_http ssl checks on some servers
The fix is making SNI an option.
2010-04-05 21:06:22 -04:00
Thomas Guyot-Sionnest
e5690e3dda check_snmp: Update last patch to copy value verbatim
Rework last patch, copying the converted portion of the string rather
than re-converting it. This is safer for backwards-compatibility as the
value is never modified.
2010-03-31 19:55:47 -04:00
Thomas Guyot-Sionnest
120985853e check_snmp: Fix regression introduced in #1867716
Bug #1867716 fixed what it meant to fix: broken perfdata strings.
Unfortunately some users relied on half-broken perfdata string where at
least the first token was OK. This patch do a two-way conversion
(string to double then back to string) instead and use the conversion
result for the performance data.

A possible caveat is that the string may change where it normally
shouldn't but the result should be somewhat similar.
2010-03-30 22:31:20 -04:00
Thomas Guyot-Sionnest
08d8d11941 Fix compilation with GCC 2.96 (Konstantin Khomoutov - #2977105) 2010-03-27 00:13:38 -04:00
Holger Weiss
e11b67f620 Let check_ntp_peer check the number of truechimers
Add support for checking the number of usable time sources (i.e., the
number of peers which are classified as so-called "truechimers" by NTP's
intersection algorithm).  The new "-m" and "-n" options allow for
specifying the according WARNING and CRITICAL thresholds (and thereby
activating the truechimers check), respectively.
2010-03-18 00:34:14 +01:00
Ton Voon
6b782ebfd4 Fix memory leak in check_http for large pages (Jimmy Bergman - #2957455) 2010-02-26 12:47:38 +00:00
Thomas Guyot-Sionnest
88b9e75dee Fix short help using "warn" for the -f option instead of "warning" (onredirect). 2009-12-02 21:24:09 -05:00
Thomas Guyot-Sionnest
e7e9a99117 Fix usage of repeated -o options in check_snmp 2009-10-22 03:25:41 -04:00
nagiosplugins
43c187a944 Allow custom versions with the release file... 2009-09-25 09:31:04 +00:00
Thomas Guyot-Sionnest
08199792ba Add proxy-authorization option to check_http (Peter Doherty - #2863772, Bryan Irvine - #2863925) 2009-09-21 21:20:33 -04:00
Ton Voon
aa6563c75c Fix skip number 2009-09-11 23:58:41 +01:00
Thomas Guyot-Sionnest
181ac1e018 Add a test that succeeds on check_snmp v1.4.13. Newer versions skip additional
lines so this new test fails on the current head.

Note: check_snmp v1.4.13 with multi-line strings return somewhat v3 output;
      it's not exactly what the specs say but it doesn't appears to break them
      either. The fix could eventually supports both v2 and v3 output formats.
2009-09-05 03:16:54 -04:00
Thomas Guyot-Sionnest
b8a64210bd Fix segfault in check_snmp (definitive fix is still in the works - see bug #2832451) 2009-08-05 03:13:08 -04:00
Thomas Guyot-Sionnest
1295c93651 Fix check_snmp passing single-quotes as -m argument when it should be empty 2009-07-31 23:35:50 -04:00
Thomas Guyot-Sionnest
43571dba91 check_snmp: Add some verbose output and tests 2009-07-31 03:52:10 -04:00
Thomas Guyot-Sionnest
8a96ee4741 Add tests using custom snmp agent
Only multi-line string test for now (regression test), counter rollover
tests planed with my snmp_counters_new branch.

NB: 64bit counters are broken in NetSNMP::agent from NetSNMP version 5.4.1
    and lower, but might come in handy one day
2009-07-31 03:07:38 -04:00
Thomas Guyot-Sionnest
e0be2e6094 Fix check_snmp Timetick test with <1 day uptime 2009-07-31 01:41:03 -04:00
Ton Voon
9ff36ec7e3 Added example for check_cluster to alert if more than X non-OK states 2009-06-22 20:48:57 +01:00
Matthias Eble
38e20a1a33 Fixed testcases for check_snmp, check_ifstatus and check_ifoperstatus when no snmp community is specified
The checks for invalid/unavailable hosts need a complete command line.
They failed on hosts where no community was specified. Now, an invalid community is used so
the tests can run on hosts w/o snmp host/community in NPTest.cache. Execution will fail anyway.
2009-06-13 18:13:49 +02:00
Matthias Eble
aff6140989 Whitespace indent fixes for check_pgsql 2009-06-01 22:47:34 +02:00
Matthias Eble
28e1b836b1 Added verbose output to check_pgsql (#2799281 - Jun Kuriyama)
check_pgsql displayed the -v flag in help output, but didn't
accept the verbosity argument. Added -v and basic verbose output.
2009-06-01 22:08:07 +02:00
Matthias Eble
843c652768 check_fping now supports passing target timeout and interval to fping (#2347686 - Martin Foster)
Added support for passing timeout and interval length to check_fping.
To protect compatibility, both options use fping's defaults if they
are not specified on the command line.
2009-06-01 16:42:14 +02:00
Thomas Guyot-Sionnest
7cb3ae0933 check_snmp: Make use of standard threshold functions
This patch makes use of standard threshold functions. This allows using
	doubles as thresholds.

	Since SNMP supports only integers, double precision numbers are only
	printed when parsed from a STRING type.

	In addition, support for printing properly Timeticks type has been added,
	and the code has been thoroughly cleaned.
2009-05-28 08:10:49 -04:00
Thomas Guyot-Sionnest
34fe4d62fe Fix whitespaces in check_snmp 2009-05-27 01:38:28 -04:00
Thomas Guyot-Sionnest
fcc4db5aaa Fix check_by_ssh interpretation of quotes in -C parameter (#1985246, #2268675) 2009-05-26 04:28:41 -04:00
Matthias Eble
221cb49206 Fixed wrong perfdata label for output traffic in check_mrtgtraf
check_mrtgtraf used the label "in" for both input and output traffic.
This fixed, now.
2009-05-22 23:57:36 +02:00
Matthias Eble
6f0665719c Removed -n option in check_smtp's help and usage output (#2782784)
Check_smtp's help showed the -n/--nocommand options to not send an
SMTP command. This usage is covered by check_tcp and is thus not needed
in check_smtp.
2009-05-22 20:17:50 +02:00
Thomas Guyot-Sionnest
ecb33e787c Whitespace changes only 2009-05-20 14:06:29 -04:00
Thomas Guyot-Sionnest
0489df95fc check_http: Add SSL/TLS hostname extension support (SNI) - (#1939022 - Joe Presbrey) 2009-05-20 01:05:35 -04:00