Commit graph

2149 commits

Author SHA1 Message Date
Thomas Guyot-Sionnest
956b504e68 Update French translations with extra-opts change 2010-04-21 23:40:09 -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
tonvoon
b63e92f8ba Updated Nagios::Plugin library 2010-04-15 10:44:01 +00:00
Holger Weiss
ee06edc646 git-notify: Fix the ordering of commits
If notifications for multiple commits are created, sort them
chronologically instead of in reverse chronological order.
2010-04-14 16:22:21 +02: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
Thomas Guyot-Sionnest
e7cefa7be4 Typo 2010-04-14 03:16:07 -04:00
Thomas Guyot-Sionnest
c326b4dc1d pst3.c must not use nagiosplug/gnulib includes 2010-04-14 03:02:38 -04:00
Thomas Guyot-Sionnest
74da141e61 Sync with the latest Gnulib code (177f525)
Signed-off-by: Thomas Guyot-Sionnest <dermoth@aei.ca>
2010-04-12 21:26:35 -04:00
Holger Weiss
c63a4f726a Fix typo 2010-04-13 01:02:07 +02:00
Holger Weiss
753b884088 Fix Debian bug #574612: Return WARNING on rebuild
Let check_linux_raid return a WARNING instead of an OK state during
volume recovery.

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

(Fixed by Christoph Martin, forwarded by Jan Wagner.)
2010-04-12 15:55:18 +02:00
Holger Weiss
933918ce5d Fix Debian bug #534604: Checking md10 and above
| check_linux_raid malfunctions if system has software RAID devices with
| two or more digits.  For example, for system having /dev/md10,
| /dev/md11 etc, the plugin returns 'UNKNOWN' in automatic mode (if RAID
| devices are manually specified it works).  Also, if system has both
| one-digit, and two-digit RAID devices, the two-digit devices are
| silently ignored in checks, which is even more problematic.

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

(Fixed by Matija Nalis, forwarded by Jan Wagner.)
2010-04-12 15:49:24 +02:00
Holger Weiss
7a661c7aed Fix Debian bug #545940: Failure when run via ePN
If Perl's "shift" function is called outside of a subroutine and without
any argument, it usually shifts @ARGV.  However, if a plugin is executed
via ePN, such a call will shift @_ instead, so we must explicitly
specify @ARGV for this to work as expected.

This fixes Debian bug #545940, see: http://bugs.debian.org/545940

Commit de7191e342 fixed the same issue for
check_disk_smb.

(Reported by Hendrik Jaeger, forwarded by Jan Wagner.)
2010-04-12 15:36:33 +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
614e9dec5e Fix Debian bug #478942: Fragile argument passing
Fix some problems regarding the way check_disk_smb passes command line
arguments to smbclient(1).

| It runs:
|
| 	$res = qx/$smbclient "\/\/$host\/$share" $pass -W $workgroup \
| 	       -U $user $smbclientoptions -I $address -c ls/;
|
| [...]
|
| The documentation says that if the password is not passed, it
| defaults to "".  That is not true above, as $pass expands to
| nothing which leaves no argument at all (instead of an empty
| argument) so is different from providing with an empty password
| or with the -N option.
|
| Also, if the password starts with "-", you're in trouble, that's
| why -U $user%$pass may be prefered.
|
| Also, the doc says that if $user is not provided, then it
| defaults to "guest" but the problem is that if it is provided
| but empty, it is changed to "guest" as well, which prevents us
| from querying hosts that don't do user authentication.

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

(Fixed by Stephane Chazelas, forwarded by Jan Wagner.)
2010-04-11 10:54:44 +02:00
Holger Weiss
de7191e342 Fix Debian bug #478906: Failure when run via ePN
| When perl plugin scripts are run with the embedded perl interpreter in
| nagios3, the "shift" perl command doesn't shift @ARGV, but @_ (which
| happens to contain the same thing as @ARGV at the time the script was
| started).
|
| [...]
|
| A fix is to replace all the instances of "shift" with "shift @ARGV".

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

(Fixed by Stephane Chazelas, forwarded by Jan Wagner.)
2010-04-11 09:54:10 +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
e461341003 Fix Debian bug #425129: SMB guest mode won't work
| The check_disk_smb plugin purports to support guest users, but it
| doesn't work out, because it doesn't specify the -N command line
| option to smbclient when no password is specified, making smbclient
| stop and ask.

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

(Fixed by Josip Rodin, forwarded by Jan Wagner.)
2010-04-11 09:39:24 +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
Holger Weiss
5a1babdae8 check_disk_smb: Allow for specifying an IP address
Add the "-a, --address option" which allows for specifying the IP
address of the server to connect to.  If this option is used, the IP
address will be handed over to smbclient(1)'s "-I" option.  (Contributed
by Sean Finney, forwarded by Jan Wagner.)
2010-04-11 01:57:11 +02:00
Thomas Guyot-Sionnest
18d4306d23 check_http: Add warning about SNI not enabled by default anymore 2010-04-06 10:17:45 -04: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
Thomas Guyot-Sionnest
f95cb118de Typo in NEWS 2010-03-16 03:42:05 -04:00
Ton Voon
b8dacf1c94 Corrected example 2010-03-15 19:44:25 +00:00
Ton Voon
6b782ebfd4 Fix memory leak in check_http for large pages (Jimmy Bergman - #2957455) 2010-02-26 12:47:38 +00:00
Holger Weiss
45e205f4a6 git-notify: Pipe e-mails directly to sendmail(8)
Use sendmail(8) instead of mail(1) in order to be able to set the
"Content-Type" header field on systems where the available mail(1)
command doesn't allow for setting it.  This makes the "-H" flag (cf.
commit 71350c5a) unnecessary.
2009-12-07 01:58:21 +01:00
Holger Weiss
78fc8f4909 Enable CIA's commit notifications
We now use CIA's service to send commit notifications to IRC.  They are
currently sent to the #Nagios-Devel channel on Freenode.  See:

	http://cia.vc/stats/project/nagiosplug/
	http://cia.vc/account/bots/15699/
2009-12-06 01:23:41 +01:00
Thomas Guyot-Sionnest
96a23a4c11 Detect arguments passed via --with-ping[6]-command (#2908236) 2009-12-05 01:27:47 -05:00
Thomas Guyot-Sionnest
96f22d97ec Whitespace fixes 2009-12-04 15:05:55 -05: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
Ton Voon
4b2265d20c Updated link to sfsnapshotgit 2009-11-19 21:55:18 +00:00
Thomas Guyot-Sionnest
181107290e Update developer guideline regarding CVS Commits
(mostly for testing my snapshot script, though it had to be updated anyway)
2009-11-18 07:25:52 -05:00
Thomas Guyot-Sionnest
175b2c8703 Fix fetching of remote branches 2009-11-11 09:53:35 -05:00
dermoth
bb193973a8 Many fixes to snapshot scripts
sfsnapshotgit:
  - Use fetch/reset instead to pull to avoid merges on forced updates

sfsnapshot-upload:
  - Fix link deletion walking the entire home dir
	- Allow CLEAN_TIME=0 (no retention)
	- Re-add per-branch links when CLEAN_TIME > 0
	- Add many comments
2009-11-11 10:34:22 +00:00
Holger Weiss
2b442ff177 Git commit notifications via post-receive hook
Now that we moved our Git repositories to SourceForge, we don't need to
maintain local clones for generating commit notifications anymore, as
SourceForge provides shell access to the repositories.  Instead, we now
run git-notify as a post-receive hook on the SourceForge server.
Actually, we use a wrapper which executes git-notify with the desired
options and which makes it easy to add other post-receive hooks in the
future.
2009-11-07 10:40:22 +01:00
Holger Weiss
c3e2186b15 git-notify: Support SourceForge repositories
The Gitweb URLs for repositories hosted by SourceForge are slightly
different than other Gitweb URLs.  The correct URL cannot be specified
via "-u" if we append "/$repos_name.git/?" to that URL as we usually do.
If the new "-S" flag is specified or "notify.sourceforge" is set, we'll
append "/$repos_name;" instead, which makes the "-u" option usable for
SourceForge repositories.
2009-11-07 10:40:22 +01:00
Holger Weiss
71351c5a4d git-notify: Optionally call mail(1) without "-a"
Not all mail(1) implementations support specifying additional header
fields via "-a": with some, this flag is used for attaching files,
others don't provide an "-a" flag at all (this is true for the /bin/mail
utility currently installed on the SourceForge servers, for example).
We now provide the "-H" flag and the "notify.legacyMail" configuration
key for these cases.
2009-11-07 10:40:22 +01:00
Holger Weiss
600fecab6a git-notify: Polish up the "tag notifications"
Use better labels for the tag ref and the SHA1 name of the tag object.
2009-11-07 10:40:22 +01:00
Holger Weiss
ecdb5aa53f git-notify: Distinguish between tag types
Distinguish between annotated tags and lightweight tags.  In the former
case, send an annotated "tag notification", in the latter case, send a
"ref change notification" (as we did in both cases before).
2009-11-07 10:40:22 +01:00
Holger Weiss
73141bfd92 git-notify: Fix "global" notifications
If the number of commits included with a single push exceeds the maximum
specified via "-n", a single notification will be generated instead of
individual e-mails.  For listing the commits within such a notification,
git-rev-list(1)'s "--pretty" option is used.  This yields output which
the git_rev_list() subroutine didn't accept.  That's now fixed.
2009-11-07 10:40:00 +01:00