Commit graph

2777 commits

Author SHA1 Message Date
Sven Nierlein
df08974bf0 check_ntp_peer: do not use uninitialized results for max state
s/t/jresult are not initialized if there is no corresponding threshold
supplied. So we shouldn't use them for calculating our result.

Signed-off-by: Sven Nierlein <sven@nierlein.de>
2014-07-31 11:28:30 +02:00
Holger Weiss
a3dcdb8723 NEWS: Mention --with-qmail-qstat-command option 2014-07-31 00:18:08 +02:00
awiddersheim
4940a77aed Fix PATH_TO_QMAIL_QSTAT in configure
When configuring PATH_TO_QMAIL_QSTAT the PATH_TO_MAILQ would get applied
instead after tests had passed. Also made --with-qmail-qstat-command a
configuration option.
2014-07-31 00:16:50 +02:00
Jan Wagner
8775edcb10 Merge pull request #1164 from waja/github981 2014-07-30 23:33:57 +02:00
Jan Wagner
3b640c32b9 adding to THANKS 2014-07-30 23:31:14 +02:00
Jan Wagner
b7ce241ba6 check_dns: Use strchr instead of index 2014-07-30 23:30:59 +02:00
Jan Wagner
fe066559f2 Merge pull request #1182 from waja/github984 2014-07-30 21:36:19 +02:00
Jan Wagner
b43030cdd4 Merge pull request #1278 from waja/github1227 2014-07-30 21:06:10 +02:00
Jan Wagner
ee7b68050c Merge pull request #1281 from waja/github1218 2014-07-30 15:39:39 +02:00
Sven Nierlein
eaedbc260b Merge pull request #1280 from sni/fix-generate-change-log
Fix generate change log
2014-07-30 15:34:19 +02:00
Jan Wagner
f28dc3ba20 Adding Alexander Wittig to THANKS.in
---
Closes #1218
Closes #1281
2014-07-30 15:33:38 +02:00
Alexander Wittig
8d50765653 check_dig: takes into account the -4 and -6 switch
Fix automatic DNS server name detection to honor -4 and -6 switches
(default to 127.0.0.1 or ::1 respectively, i.e. if -6 is given ::1
is used instead of 127.0.0.1)
2014-07-30 15:25:20 +02:00
Alexander Wittig
8c623b1a43 check_dig: Fix to work with dig and drill tool
FreeBSD starting with version 10 is shipped with ldns instead of bind as
resolver. Consequently the dig tool in base is replaced by drill. While dig can
still be installed as a third party application, it would be nice to make do
with the tools available in the system already.
This patch rearranges the command line used to invoke dig slightly so that it
can be used with both dig and drill (tested with dig 9.8.3-P1 and 9.9.4 as well
as drill 1.6.16). It would be really neat if the configure script could be
changed to automatically pick up drill when dig is not available (or the other
way around), but my autotools-foo is not good enough for that.
This part of the patch is an extended version of the locally maintained patch
currently deployed in the FreeBSD ports tree by Dmitry Sivachenko.
2014-07-30 15:22:33 +02:00
Sven Nierlein
15f8dab30e tools/generate-change-log: workaround for broken Text::Wrap
workaround for broken Text::Wrap:
"This shouldn't happen at /usr/share/perl/5.18/Text/Wrap.pm line 84."
changing huge to overflow make generating changelogs work again at
the price of not having changelog strictly cut of at 80 columns
anymore. Words longer than 80 characters will now printed in one
line. This mainly affects old sf.net urls.

Signed-off-by: Sven Nierlein <Sven.Nierlein@consol.de>
2014-07-30 15:21:27 +02:00
Sven Nierlein
de6f3dddf6 no need for the signed off messages in our changelog
Signed-off-by: Sven Nierlein <Sven.Nierlein@consol.de>
2014-07-30 15:21:22 +02:00
Jan Wagner
a143739ed2 Make use of xasprintf instead of asprintf
---
Closes #1278
2014-07-30 14:53:07 +02:00
Ricardo Maraschini
15d14d28bb lib/utils_base.c: if asprintf fails, string is undefined
if asprintf fails, string content becomes invalid. we need
to check if it ran OK by checking the returned value.

in case of fail, asprintf returns -1, otherwise the number
of writen bytes is returned.

also, on ubuntu 13.10 i've receiving a lot of warnings:

"warning: ignoring return value of ‘asprintf’"

this patches fixes some of them

Signed-off-by: Ricardo Maraschini <ricardo.maraschini@gmail.com>
---
Closes #1227
2014-07-30 14:48:09 +02:00
Jan Wagner
d0da78ced1 check_dns: returns incorrect state when specifying server
This patch verifies if the response is returned by the dns server we
are trying to check
---
Closes #981
Closes #982
Closes #1164
2014-07-30 13:16:37 +02:00
Jan Wagner
d8c20cc487 travis-ci: create MySQL database 'test' 2014-07-30 13:10:11 +02:00
Sven Nierlein
2acf9a63d3 check_dns: added test for nonresponsive dns server (#982)
Signed-off-by: Sven Nierlein <sven@nierlein.de>
2014-07-30 11:49:50 +02:00
Jan Wagner
29844037cc Adding Jason Benguerel 2014-07-29 22:06:38 +02:00
Jan Wagner
cbb507c89f check_disk: show troubled partition in verbose mode
I'm submitting a small patch to check_disk that will show which partitions are
actually causing the error state. This helps the human operator to quickly
identify the exact issue. I made it so a single -v flag is required so it
doesn't harm legacy code that may be parsing the original style of output.

Thanks to Jason Benguerel.
---
Closes #984
Closes #1182
2014-07-29 22:06:25 +02:00
abrist
6f3d5825b2 check_ntp_time.c - Cleaned up usage and added a note
Closes #907
Closes #1184
2014-07-29 14:24:21 +02:00
Jan Wagner
5dcbab6b7c Adding Patrick McAndrew to THANKS.in 2014-07-29 14:24:01 +02:00
Jan Wagner
a941219b41 check_ntp_time: adding offset option
Not sure if this is of use or not - we have a strange requirement to run
certain servers 5 minutes fast. I've added a switch to the check_ntp_time
to allow for this offset.

Thanks to Patrick McAndrew.
2014-07-29 14:23:17 +02:00
abrist
fc2c099d58 netutils.c - A few more changes
Changed bool to short.

Removed first instance of is_socket to avoid
redeclaration error.

Changed 'socket' to 'file socket' for verbosity.
2014-07-29 11:09:43 +02:00
Davide Madrisan
e85fcbd571 This patch will add the IP and port, or socket name, to the error message and
thus simplify the problem debugging: no need to check for this information in
the Nagios configuration.
This function is only used by 'check_tcp.c'.

Without the patch:

$ ./plugins/check_tcp -H 127.0.0.1 -p 21
Connection refused
$ ./plugins/check_tcp -H /var/spool/nagios/cmd/nagios.cmd
Permission denied

With the patch:

$ ./plugins/check_tcp -H 127.0.0.1 -p 21
connect to address 127.0.0.1 and port 21: Connection refused
$ ./plugins/check_tcp -H /var/spool/nagios/cmd/nagios.cmd
connect to socket /var/spool/nagios/cmd/nagios.cmd: Permission denied

Thanks to Davide Madrisan.
---
Closes  #1277
2014-07-29 11:08:44 +02:00
Jan Wagner
2e8d440e73 check_mysql: ignore authentication failure
This patch allows checking if MySQL server is running without providing valid
username and password. Similar to check_ssh plugin it returns MySQL server
version string and protocol number.

Example:
check_mysql -n -H aaa.bbb.ccc.ddd
MySQL OK - Version: 5.0.51a-24+lenny5 (protocol 10)

This is useful for monitoring servers where one does not have administrator
privileges or does not want to grant any privileges for the monitoring station.

To enable this functionality new option --ignore-auth (-n) is added to
check_mysql plugin.

Thanks to Julius Kriukas

Closes #1020
Closes #1178
2014-07-28 22:13:02 +02:00
Jan Wagner
98a670bf77 travis-ci: Installing libhttp-daemon-ssl-perl to make plugins/tests/check_http.t possible to run 2014-07-21 22:40:33 +02:00
Holger Weiss
b5611ea571 Use "C" locale when running test suite
Some of our tests check locale-dependent plugin output, so let's make
sure "make test" is always using the "C" locale.
2014-07-21 22:20:57 +02:00
Holger Weiss
b785a770e4 plugins/tests/check_http.t: Adjust date strings
Adjust the expected date strings to the now-localized output produced by
plugins/sslutils.c.

Closes #1275.
2014-07-21 21:52:33 +02:00
Jan Wagner
8f7b5a71c9 travis-ci: Using libfreeradius-client-dev as build-dep 2014-07-21 21:28:20 +02:00
Holger Weiss
c5a64eeef8 plugins/t/check_dns.t: Fix Perl warning
Perl said: "Unrecognized escape \d passed through at ./t/check_dns.t
line 57."
2014-07-21 13:59:22 +02:00
Jan Wagner
3bf812beae sslutils: expire time in local timezone format
sshutils prints the expiry time of certificates in US format
this patch uses the strftime %c, I don't know how portable that is

Thanks to Neil Prockter.

Closes #1188
Closes #1161
Closes #977
Closes #976
Closes #975
Closes #840
Closes #382
2014-07-21 13:32:20 +02:00
Jan Wagner
69b719aa2e check_ifstatus: perfdata bug
The perfdata output violates the current Nagios Plugin Development Guidelines
(http://nagiosplug.sourceforge.net/developer-guidelines.html#AEN202 :
"space separated list of label/value pairs").

Thus the Addon PNP did not read the perdata correctly.

The patch replaces the commas with spaces in the perfdata output.

Many thanks to Patric Wust.
---
Closes #1169 and #721.
2014-07-20 23:52:25 +02:00
Jan Wagner
71063655e5 travis-ci: Adding ports for check_hpjd 2014-07-20 23:36:18 +02:00
abrist
479509ad59 added tests for check_hpjd port options
---
Closes #1160 and #973
2014-07-20 23:36:05 +02:00
abrist
8e187dfefe Added check_hpjd port option to news and clarified the port usage error. 2014-07-20 23:35:54 +02:00
abrist
3c7d24478c check_hpjd - Added a switch for port specification. Defaults to 161. 2014-07-20 23:35:41 +02:00
abrist
78d00d338a check_ntp.t - fixed tests for new status output
closes #1236 and #1239
2014-07-20 23:35:03 +02:00
abrist
495cf3b2f8 check_ntp_peer - Added specific state output for each metric. It now should be easy to see which check caused the alert. 2014-07-20 23:34:41 +02:00
Holger Weiss
50cad9ae5d NEWS: Fix typo 2014-07-11 16:46:12 +02:00
Holger Weiss
017b523fa4 Prepare for the 2.0 release 2014-07-11 11:15:36 +02:00
Holger Weiss
e4e95c1d59 NEWS: Wrap overly long line 2014-07-11 09:49:59 +02:00
Holger Weiss
7e0661a093 Update THANKS.in file with latest author 2014-07-10 21:31:17 +02:00
Sam Kottler
222c1d45c0 Merge pull request #1272 from mfalkvidd/master
check_procs: Add delay after forking in test
2014-07-10 15:25:50 -04:00
Mikael Falkvidd
f54d10fe9b check_procs: Add delay after forking in test
Forking raises a race condition, where the parent might run the
test before the child has had time to fork. If that happens,
an error similar to this is produced:
 Failed test 'Output correct'
 at ./t/check_procs.t line 32.
                 'PROCS OK: 0 processes with args 'sleep 7' | processes=0;;;0;'
   doesn't match '/^PROCS OK: 1 process?/'

Sleeping a bit should avoid the problem. It might be enough to
sleep less than a second, but perl's built-in sleep function only
supports integer seconds.

In our build environment, the build failed 3 of 4 times before
this patch. After the patch it failed 0 of 7 times.

Signed-off-by: Mikael Falkvidd <mfalkvidd@op5.com>
2014-07-10 21:10:48 +02:00
Holger Weiss
43b66c06a9 NEWS: Add a warning regarding check_snmp
Tell users that check_snmp might now return CRITICAL in cases where it
used to return OK, and how to deal with that.
2014-07-07 21:02:52 +02:00
Holger Weiss
76d8a40cdd NEWS: Update version number
We're going to release version 2.0, not 1.6.
2014-07-07 16:49:32 +02:00
Holger Weiss
a2505f049d plugins/netutils.h: Adjust UNIX_PATH_MAX for BSD
On at least FreeBSD, NetBSD, OpenBSD, DragonFly, and OS X, this is
hard-coded at 104 bytes.

Closes #1267.
2014-07-07 11:33:39 +02:00