Commit graph

3065 commits

Author SHA1 Message Date
Oliver Skibbe
fce769d942 Merge pull request #1446 from monitoring-plugins/revert-1436-check_disk_iss1420
Revert "check_disk - show all disks if state is ok and option error only is used"
2016-11-21 13:49:38 +01:00
Oliver Skibbe
d03a2a82b3 Revert "check_disk - show all disks if state is ok and option error only is used" 2016-11-21 13:26:28 +01:00
Holger Weiss
8b727baec5 sslutils: Address compiler warning
SSLv23_client_method() and friends return a pointer to a const-qualified
SSL_METHOD.
2016-11-21 09:31:08 +01:00
Jan Wagner
6d0c111631 Creating and mounting randisk to make use of check_disk tests 2016-11-20 20:38:41 +01:00
Oliver Skibbe
6438fec788 Merge pull request #1382 from riskersen/smtp_tls_expec
check_smtp: extended support for expect option
2016-11-19 16:38:07 +01:00
Oliver Skibbe
099bd86f1c Merge pull request #1376 from riskersen/check_mssql
check_mssql.pl: switched alarm timeout
2016-11-19 16:37:27 +01:00
Oliver Skibbe
6026ff5c18 Merge pull request #1374 from riskersen/check_http_perfdata_timeo
check_http: added timeout to perfdata as max val

Resolves #1350
2016-11-19 16:36:26 +01:00
Oliver Skibbe
4430b63b0f Merge pull request #1436 from riskersen/check_disk_iss1420
check_disk - show all disks if state is ok and option error only is used
2016-11-19 16:35:50 +01:00
Holger Weiss
303acfc64f Merge remote-tracking branch 'monitoring-plugins/pr/1443'
* monitoring-plugins/pr/1443:
  add openssl 1.1 support
2016-11-18 11:51:12 +01:00
Jan Wagner
1723a3c761 It's useful to use 'useful' instead of 'usefull' 2016-11-18 11:47:20 +01:00
Holger Weiss
9f6ad74aaf Document radcli support in NEWS and REQUIREMENTS 2016-11-17 17:45:21 +01:00
Holger Weiss
487a9d0a8b check_radius: Replace functions removed in radcli
The radcli library no longer offers the rc_get_ipaddr(),
rc_good_ipaddr(), and rc_own_ipaddress() functions.
2016-11-17 17:22:37 +01:00
Holger Weiss
bfc745a79d check_radius: Fix rc_send_server() call for radcli
With radcli, the rc_send_server() function expects an additional
argument.
2016-11-17 00:03:50 +01:00
Holger Weiss
14929f2687 check_radius: Remove unused variable
The radcli library doesn't define the ENV type, and we don't use it
anyway.
2016-11-15 23:36:59 +01:00
Jan Wagner
2c898cf23f This patch adds support for using the readcli lib.
http://radcli.github.io/radcli/

(Closes #1437)
2016-11-15 23:21:40 +01:00
vagrant
fe1c4bb0e5 add openssl 1.1 support
changes:
  - CRYPTO_lock detection replaced in configure.ac. We don't use that
    function anywhere, so just replace it with the suggested one from
    https://wiki.openssl.org/index.php/Library_Initialization#Autoconf
  - OPENSSL_NO_SSL2 is no longer defined while ssl2 is not included.
    Set it ourself using the suggested openssl 1.1 version check from
    https://wiki.openssl.org/index.php/1.1_API_Changes#Backward_compatibility
  - openssl 1.1 sends a sigpipe if the connection is still open when
    calling SSL_shutdown(), so move the close before the shutdown.

Signed-off-by: Sven Nierlein <sven@nierlein.de>
2016-11-13 21:14:02 +00:00
Sven Nierlein
2f845e9ebc Merge pull request #1391 from lausser/patch-1
If a web page contains a nul character, check_http reads the complete page but --string does not search beyond this character.
2016-11-11 11:14:37 +01:00
Sven Nierlein
f938327b49 Revert "adopt http test to changed ssl expire date output"
This reverts commit 6cd50bc42c.
2016-11-11 10:52:36 +01:00
Sven Nierlein
3bdf392ae5 tests: make tests reliable for forcing the locale to C
Signed-off-by: Sven Nierlein <sven@nierlein.de>
2016-11-11 10:52:19 +01:00
Sven Nierlein
6e7ea28cd4 clean cpan installation
HTTP::Daemon::SSL gets installed as pkg already.
2016-11-11 10:42:12 +01:00
Sven Nierlein
b2042f1d84 update news file
Signed-off-by: Sven Nierlein <sven@nierlein.de>
2016-11-11 10:36:52 +01:00
Sven Nierlein
9e02d0c3e6 check_http: add host header tests
Signed-off-by: Sven Nierlein <sven@nierlein.de>
2016-11-11 10:32:19 +01:00
Sven Nierlein
e118230903 travis: install HTTP::Daemon::SSL perl module
which is required for plugins/tests/check_http.t

Signed-off-by: Sven Nierlein <sven@nierlein.de>
2016-11-11 09:49:04 +01:00
Sven Nierlein
6cd50bc42c adopt http test to changed ssl expire date output
Signed-off-by: Sven Nierlein <sven@nierlein.de>
2016-11-11 09:43:13 +01:00
Christopher Odenbach
2233b7aa75 patch to support the concept of virtual ports 2016-11-11 09:33:37 +01:00
Sven Nierlein
b9f54f85f9 update thanks file 2016-11-08 10:30:48 +01:00
Sven Nierlein
9c7f34cb57 Merge pull request #1442 from waja/check_dig_use_retry_instead_tries
check_dig: use +retry instead of +tries
2016-11-08 10:30:06 +01:00
Sven Nierlein
efaeecc891 Merge pull request #1441 from waja/check_ide_smart_remove_unused_function
check_ide_smart: remove unused function
2016-11-08 10:26:52 +01:00
Christian Kujau
4195dc23d1 check_dig: use +retry instead of +tries
After upgrading from an Ubuntu/15.10 to 16.04 installation, I noticed that
check_dig is always returning a WARNING:

$ /usr/lib/nagios/plugins/check_dig -l localhost -v
/usr/bin/dig   -p 53 @127.0.0.1 localhost A +tries=3 +time=6
Looking for: 'localhost'
DNS WARNING - 0.008 seconds response time (dig returned an error status)|time=0.008274s;;;0.000000

The older Ubuntu installation got its check_dig from the
nagios-plugins-standard package[0] which did not include the +tries
option. The current Ubuntu version provides its check_dig from the
monitoring-plugins-standard package[1], which _does_ use the +tries
option that was introduced with df53473[2].

On my system, it so happens that /usr/bin/dig is provided not by the
(BIND) dnsutils package but by knot-dnsutils[3] from the Knot DNS project.
The Knot dig(1) command doesn't support the +tries option[4] but does
support +retry (which is also supported[5] by the BIND dig(1) command).

One way to fix that would be for me to install the BIND dnsutils package. But I did not
want to do that: it's so much larger in size and pulls in much more dependencies
than the knot-dnsutils package.

The patch below changes check_dig to use +retry instead of +tries. Both
options are similar, but not the same:

 +retry - Sets the number of times to retry UDP queries to server to T
          instead of the default, 2. Unlike +tries, this does not include
          the initial query

As number_tries seems to be hard coded to 3, I've lowered DEFAULT_TRIES to
2 so check_dig should behave as before (with +tries=3).

Thanks,
Christian.

[0] http://packages.ubuntu.com/wily/nagios-plugins-standard
[1] http://packages.ubuntu.com/xenial/monitoring-plugins-standard
[2] https://github.com/monitoring-plugins/monitoring-plugins/commit/df53473
[3] http://packages.ubuntu.com/xenial/knot-dnsutils
[4] https://www.knot-dns.cz/docs/2.x/html/man_kdig.html#notes
[5] https://ftp.isc.org/isc/bind9/cur/9.10/doc/arm/man.dig.html

Signed-off-by: Christian Kujau <lists@nerdbynature.de>
2016-11-08 09:54:46 +01:00
Sebastian Herbszt
2742e65798 check_ide_smart: remove unused function
Remove function unused since commit b5cc292.

Signed-off-by: Sebastian Herbszt <herbszt@gmx.de>
2016-11-08 09:52:04 +01:00
Sven Nierlein
85cfc7b1aa tests: enable snmp tests
Enabled snmp tests against snmpd on localhost. It was installed already
in the travis file, we just need to enable the tests by setting the
parameters in the answers file.

Signed-off-by: Sven Nierlein <sven@nierlein.de>
2016-11-08 00:50:03 +01:00
Sven Nierlein
b838b75366 check_snmp: fix number of tests skiped 2016-11-08 00:38:55 +01:00
Sven Nierlein
1d4874240a check_snmp: add testcase for no datatype
Signed-off-by: Sven Nierlein <sven@nierlein.de>
2016-11-08 00:29:42 +01:00
Sven Nierlein
d9999194e6 Revert "check_snmp: fix push request 1173 for SNMP responses without datatype indicator"
This reverts commit 3178c8c0ff.
2016-11-08 00:23:28 +01:00
Sven Nierlein
57a6858368 Revert "update thanks file"
This reverts commit 4403c402cb.
2016-11-08 00:23:19 +01:00
Sven Nierlein
4403c402cb update thanks file 2016-11-08 00:11:41 +01:00
Thomas Kurschel
3178c8c0ff check_snmp: fix push request 1173 for SNMP responses without datatype indicator 2016-11-08 00:11:04 +01:00
Sven Nierlein
0dc6537612 fix superfluous argument to printf (#fixes 1308)
Signed-off-by: Sven Nierlein <sven@nierlein.de>
2016-11-07 23:39:04 +01:00
Sven Nierlein
0bf64b356c Merge pull request #1311 from waja/check_ntp_remove_unused_variables
check_ntp: remove unused variables
2016-11-07 23:08:02 +01:00
Sven Nierlein
19972e99f8 Merge pull request #1309 from waja/negate_remove_unused_variables
negate: remove unused variables
2016-11-07 23:07:34 +01:00
Sven Nierlein
5ebc24d998 Merge pull request #1312 from waja/check_disk_remove_unused_variables
check_disk: remove unused variables
2016-11-07 23:07:16 +01:00
Sven Nierlein
06fdc55195 Merge pull request #1313 from waja/check_ntp_time_remove_unused_variables
check_ntp_time: remove unused variables
2016-11-07 23:06:38 +01:00
Sven Nierlein
28d4812860 Merge pull request #1307 from waja/check_dns_dead_code
check_dns: remove dead code
2016-11-07 23:05:26 +01:00
Sven Nierlein
d3cedfe305 update news and thanks file
Signed-off-by: Sven Nierlein <sven@nierlein.de>
2016-11-07 22:55:57 +01:00
Sven Nierlein
948db2e3a2 tests: adjust check_http to new output format
Signed-off-by: Sven Nierlein <sven@nierlein.de>
2016-11-07 22:46:06 +01:00
Peter (pir) Radcliffe
2f2b2f1987 GMT expiry display
Change solution to display GMT time in the local display format with
the offset number of hours from GMT to be clear about what timezone
this is if the local display format does not include offset.
2016-11-07 22:42:40 +01:00
Peter (pir) Radcliffe
06059ecd0e Revert "Fix check_http test time output"
This reverts commit 2d9e61a438.
2016-11-07 22:42:40 +01:00
Peter (pir) Radcliffe
2efad48e8c Fix check_http test time output
Tests need to match new output time and timezone.
2016-11-07 22:42:40 +01:00
Peter (pir) Radcliffe
a3a78795b2 Use GMT timezone in SSL certs
SSL certs are required to use times in GMT per
https://www.ietf.org/rfc/rfc5280.txt but the mktime() here assumes the
current timezone.

Fix the time_t conversion to be done assuming GMT with timegm() and
only do it once rather than twice.

Display the expiry date and time with ISO format years and give an
offset from GMT and a timezone to be very clear about exactly what time
is being displayed. Time given is correct and now in the machine’s
timezone.
2016-11-07 22:42:40 +01:00
abrist
7276ce77c7 check_snmp.c - Added IPv6 support
The "-6" optarg now prepends the server_address with "udp6:" for the
snmpget external command as per the net-snmp syntax at:
http://www.net-snmp.org/wiki/index.php/FAQ:Applications_28

Thanks to DrydenK (Roberto Greiner) for the heads up.
2016-11-07 22:13:07 +01:00