Commit graph

2486 commits

Author SHA1 Message Date
Sven Nierlein
32ec6265a4 unified nc syntax
older netcats do not understand -p, they expect host and port as additional argument.
This is backwards compatibel to newer clients. Also support netcat instead of nc.
2013-09-13 23:08:07 +02:00
Sven Nierlein
8b1c574298 fping: some fping versions set loss to 0% by mistake
fping v2.4b2 returns
10.99.0.1 : xmt/rcv/%loss = 0/0/0%
for a failed host, so we assume the host is down if xmt is zero
2013-09-13 17:14:33 +02:00
Sven Nierlein
8f5e92e1ed NPTest: ensure all systems use same amount of whitespace 2013-09-13 13:37:41 +02:00
Sven Nierlein
4933146e00 check_snmp: add timeout handler befor running snmpget 2013-09-12 23:39:32 +02:00
Sven Nierlein
c0926c2b1e check_tcp: only test ipv6 if ping6 works 2013-09-12 23:39:31 +02:00
Sven Nierlein
38ef9b60a0 tests: sort cached settings before save 2013-09-12 23:39:31 +02:00
Sven Nierlein
07f9a0f627 tests: make sure tests don't hang 2013-09-12 23:39:31 +02:00
Holger Weiss
ffad261eab check_tcp: Fix checks without --expect string
Commit e8044713d4 broke check_tcp checks
without --expect string, this commit fixes that regression.
2013-09-12 22:36:35 +02:00
Holger Weiss
7573aa1616 Minor cosmetic changes 2013-09-12 21:50:18 +02:00
Holger Weiss
e8044713d4 check_tcp: Properly deal will partial recv(3)s
The np_expect_match() function now returns one of three possible states
instead of just TRUE or FALSE:

- NP_MATCH_SUCCESS
- NP_MATCH_FAILURE
- NP_MATCH_RETRY

The NP_MATCH_RETRY state indicates that matching might succeed if
np_expect_match() is called with a longer input string.  This allows
check_tcp to decide whether it makes sense to wait for additional data
from the server.
2013-09-12 21:37:20 +02:00
Holger Weiss
662997251d Improve interface of np_expect_match() function
Replace the three boolean parameters of lib/utils_tcp.c's
np_expect_match() function with a single "flags" parameter.
2013-09-12 17:42:10 +02:00
Holger Weiss
ca9ce71576 Don't mark SSL_METHOD variable as "const"
The SSL_CTX_new(3) function expects a non-"const" SSL_METHOD value.
2013-09-10 22:49:03 +02:00
Holger Weiss
5b0e00782d Move global variables from .h to .c files
Simplify things by moving the definition of global variables into .c
files, where they belong.
2013-09-10 22:45:45 +02:00
Holger Weiss
b48cb1f130 Fix GCC's -Wimplicit-function-declaration warnings
Fix the issues found by GCC when the -Wimplicit-function-declaration
flag is specified.
2013-09-10 22:29:46 +02:00
Holger Weiss
d4a781817c Fix GCC's -Wuninitialized warnings
Fix the issues found by GCC when the -Wuninitialized flag is specified.
2013-09-10 20:52:13 +02:00
juliopedreira
cfb50add53 check_tcp: Don't close connection too early
Closing the connection because the bytes received are less than the
buffer size assumes that all the bytes will be received in one go.  This
is not always true!
2013-09-10 12:16:46 +02:00
Holger Weiss
5bfca4b34d s/--proxy_authorization/--proxy-authorization/
The check_http option "--proxy_authorization" is now called
"--proxy-authorization" instead.  It was always documented this way, and
we don't usually use underscores in option names.
2013-09-10 00:46:06 +02:00
Holger Weiss
e8594f461d check_snmp: Initialize size_t value to 0, not NULL 2013-09-05 00:19:36 +02:00
Holger Weiss
8230bbd4a4 Update bundled libtool files
Import the current libtool version 2.4.2.
2013-09-05 00:03:00 +02:00
Holger Weiss
317d2896dc check_icmp: Minor whitespace/indentation fixes 2013-09-04 22:28:50 +02:00
Holger Weiss
a480681cb7 check_icmp: Support "--help" and "--version"
Let check_icmp provide "--help" and "--version" flags (in addition to
"-h" and "-V"), just as the other plugins do.
2013-09-04 22:20:26 +02:00
Holger Weiss
b15adb7762 Remove "contrib" plugins
These days, sites such as "Nagios Exchange" are a much better place for
publishing plugins not maintained by the Plugins Development Team.
2013-09-02 13:16:24 +02:00
Holger Weiss
c4d5882b9e Remove the outdated "command.cfg" file 2013-09-02 13:09:24 +02:00
Holger Weiss
ba7615631a Merge branch 'hw/update-pm'
* hw/update-pm:
  Use own variable instead of ENV
  Updated with last working copy of build_perl_modules used by Opsview

Conflicts:
	tools/build_perl_modules
2013-08-30 18:15:00 +02:00
Holger Weiss
5789548373 developer-guidelines.sgml: Update copyright year
We touched the Development Guidelines this year.
2013-08-27 18:42:51 +02:00
Holger Weiss
8e9abad8e6 NEWS: Mention that check_snmp now supports >8 OIDs
Closes #37.
2013-08-27 18:38:18 +02:00
Holger Weiss
92fdab87b2 Partially revert "check_snmp: Close potential for using uninitialized memory"
This reverts the changes to plugins/common.h applied by commit
a20611d435.

- Clang defines __GNUC__.
- The new name of the __attribute__ parameter was misleading.
2013-08-27 18:32:38 +02:00
Holger Weiss
1cbc73bc8b check_snmp: Fix --help segfault 2013-08-27 16:08:49 +02:00
Holger Weiss
e9ede0f8e3 Merge branch 'master' of https://github.com/ozamosi/nagios-plugins
* 'master' of https://github.com/ozamosi/nagios-plugins:
  check_snmp: Close potential for using uninitialized memory
  check_snmp: Dynamically grow all data structures

Conflicts:
	plugins/check_snmp.c
2013-08-27 14:37:13 +02:00
Holger Weiss
69b1355286 NEWS: Mention new "check_disk -f" option
Closes #22.
2013-08-26 23:24:03 +02:00
Holger Weiss
efa9b0fc08 Merge branch 'master' of https://github.com/bugness-chl/nagios-plugins
* 'master' of https://github.com/bugness-chl/nagios-plugins:
  check_disk: option to ignore reserved space

Conflicts:
	plugins/check_disk.c
2013-08-26 23:23:55 +02:00
Ton Voon
af85216c79 Use own variable instead of ENV 2013-08-23 17:13:09 +01:00
Ton Voon
ed9a0f3a7b Updated with last working copy of build_perl_modules used by Opsview 2013-08-23 15:17:17 +01:00
Sven Nierlein
fae168a68b perlmods: fixed install_order
on older systems Module::Build is not available by default, therefore we have
to change the order of installation.
2013-08-23 12:40:55 +02:00
Holger Weiss
912a2eaf02 developer-guidelines.sgml: Multiline output
Document the multiline output format properly.

Thanks to Jochen Bern for providing this patch.
2013-08-22 20:45:53 +02:00
Holger Weiss
c542ca9136 developer-guidelines.sgml: Allow special value "U"
Allow a literal "U" to be specified in place of an actual value within
the performance data string.  An "U" corresponds to RRDtool's "UNKNOWN"
value; i.e., it's meant to indicate that data acquisition failed for
some reason.  PNP4Nagios already supports this extension.
2013-08-21 21:50:55 +02:00
Sven Nierlein
1609749226 removed duplicate entry 2013-08-21 22:20:59 +02:00
Sven Nierlein
817ea52cc0 fixed check_tcp test
A check with thresholds 9000,1 must exit with warning if the certificate expires in less
than 9000 but more than one day.
2013-08-21 17:48:14 +02:00
Sven Nierlein
43a913f281 no need to set verbose mode, thats what "make test-debug" is for 2013-08-21 17:23:22 +02:00
Sven Nierlein
d57941c4d2 check_snmp: added threshold tests 2013-08-21 15:59:56 +02:00
Holger Weiss
461cea4261 check_snmp: Fix support for inverse thresholds
Commit bd78299056 reintroduced support for
inverse threshold ranges such as "2:1", but it broke standard thresholds
such as "1:2" (by converting this range into "1") or "1:" (by converting
this range into "@:2").  This commit fixes those two bugs, plus an
off-by-one error while computing the number of bytes to allocate when
handling inverse thresholds (two additional bytes were allocated where
three were required to hold '@' and ':' and '\0').  While at it, we also
check whether malloc(3) succeeded.
2013-08-21 15:00:27 +02:00
Ton Voon
ae8ff32eac Updated perl modules 2013-08-21 00:20:30 +01:00
Holger Weiss
f7bc3a0965 Update the bundled Params::Validate module
Building the old version fails with recent Perl releases:

| Validate.xs: In function `get_type':
| Validate.xs:208:5: error: duplicate case value
| Validate.xs:205:5: error: previously used here
2013-08-20 23:47:01 +02:00
Holger Weiss
f4b90cabc0 Set SSL_MODE_AUTO_RETRY flag
We use OpenSSL (or GnuTLS) with blocking semantics, and we don't want
SSL_read(3) or SSL_write(3) calls to return SSL_ERROR_WANT_READ or
SSL_ERROR_WANT_WRITE (see #3614716).
2013-08-20 23:17:23 +02:00
Holger Weiss
7a80e27fb3 Ditch contrib/check_http-with-client-certificate.c
The standard check_http plugin now supports client certificate
authentication.
2013-08-20 23:11:38 +02:00
Holger Weiss
3a847fc60f Add new Gnulib files to .gitignore 2013-08-20 22:03:11 +02:00
Holger Weiss
1a329f250f Check for who(1) only if utmpx(5) isn't available
The who(1) command is only called by check_users if the system doesn't
provide an utmpx(5) interface.
2013-08-20 21:57:52 +02:00
Holger Weiss
92849a1a87 check_users: Use utmpx(5) only if available
For systems that don't provide an utmpx(5) interface, restore the code
that was replaced in commit 3e622f3a47.
2013-08-20 21:13:25 +02:00
Sven Nierlein
4083622f86 added missing header to fix build on freebsd 2013-08-20 17:02:02 +02:00
Holger Weiss
4eab02cdaf Merge branch 'master' of https://github.com/rafaeldriutti/nagios-plugins
* 'master' of https://github.com/rafaeldriutti/nagios-plugins:
  Changed the smbclient command used to fetch the free space available on the samba shares. Using du instead of ls, since it's much faster, specially with shares that have a lot of files.

Closes #63.
2013-08-20 16:50:52 +02:00