Commit graph

199 commits

Author SHA1 Message Date
Jan Wagner
dbb92c347e Spelling fixes suggested by lintian 2016-12-01 12:49:40 +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
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
Christopher Odenbach
2233b7aa75 patch to support the concept of virtual ports 2016-11-11 09:33:37 +01:00
Gerhard Lausser
8727768834 Update check_http.c
If a web page contains a nul character, check_http reads the complete page but --expect does not search beyond this character.
2015-11-04 16:18:37 +01:00
Oliver Skibbe
d9d82309e2 * check_http: added timeout to perfdata as max val 2015-10-07 09:14:28 +02:00
Holger Weiss
5029714a9d Merge branch 'pr/1373'
* pr/1373:
  check_http: Allow for requesting TLSv1.1/TLSv1.2
2015-10-06 12:57:29 +02:00
Holger Weiss
f43083c6a9 check_http: Allow for requesting TLSv1.1/TLSv1.2
check_http's -S/--ssl option now allows for requesting the TLSv1.1 and
TLSv1.2 protocols.  Apart from that, a '+' suffix can be appended in
oder to also accept newer protocols than the specified version.

Closes #1338, and closes #1354, and closes #1359.
2015-10-04 23:28:35 +02:00
Sven Nierlein
edca257e20 use unknown exit code for help/version in plugins
Signed-off-by: Sven Nierlein <sven@nierlein.de>
2015-10-04 19:24:30 +02:00
Laurent Licour
1861e6a2d9 plugins/check_http.c - fix regression introduced in commit 388ea928 (Host header) 2015-10-02 21:12:58 +02:00
LAURENT LICOUR
44ba1f7064 plugins/check_http.c - fix Host header if explicitly set with -k 2015-10-02 21:12:58 +02:00
Michael Melcher
342dd1b97f check_http: Adding support for checking SSL-Websites through Proxies
Ported the fix from Frank4dd to the latest git version. See also http://nagios.frank4dd.com/howto/monitor-ssl-web
sites-through-proxy.htm
2015-10-01 17:20:01 +02:00
Spenser Reinhardt
5866cb0a09 plugins/check_http.c - leakage fix
Coverity 66514 - Possible leakage and overflow with addr in redirect functionality. Not confirmed as null terminated, and externally gathered. Restrict string comparisons and duplications by size. - SR
2014-06-28 18:21:26 +02:00
Holger Weiss
7ee3525423 Merge branch 'maint'
* maint:
  check_ssh: Get rid of sshd: Read from socket failed: Connection reset by peer
  fixed tests when there is no direct internet connection
  NEWS: Mention fix for check_http's -S option
  Fix for SSL Versioning when multiple options are used.
  Fix #1217 spec file fails to build due to duplicate files and unused files
  check_http: Don't let "-N" expect an argument
  README: Change GitHub URL
  README: Clarify license notice
  Update URLs and mailing list addresses
  Just using the posix conform extended regular expression grep
  check_oracle: --db +ASM bad string matching check_oracle doesn't correctly check for pmon +ASM instance from at least Oracle 11 as the pmon proces was renamed from ora_pmon_.* to asm_pmon_.*. -- Just turning attached patch of github issue #1207 into a push request. (Closes #1207)
  Update web site URLs

Conflicts:
	FAQ
	NEWS
	README
	SUPPORT
	configure.in
	monitoring-plugins.spec.in
	pkg/solaris/pkginfo.in
	plugins-root/check_dhcp.c
	plugins-root/check_icmp.c
	plugins-scripts/check_ifoperstatus.pl
	plugins-scripts/check_mssql.pl
	plugins/check_apt.c
	plugins/check_by_ssh.c
	plugins/check_cluster.c
	plugins/check_dbi.c
	plugins/check_dig.c
	plugins/check_disk.c
	plugins/check_dns.c
	plugins/check_dummy.c
	plugins/check_fping.c
	plugins/check_game.c
	plugins/check_hpjd.c
	plugins/check_http.c
	plugins/check_ide_smart.c
	plugins/check_ldap.c
	plugins/check_load.c
	plugins/check_mrtg.c
	plugins/check_mrtgtraf.c
	plugins/check_mysql.c
	plugins/check_mysql_query.c
	plugins/check_nagios.c
	plugins/check_nt.c
	plugins/check_ntp.c
	plugins/check_ntp_peer.c
	plugins/check_ntp_time.c
	plugins/check_nwstat.c
	plugins/check_overcr.c
	plugins/check_pgsql.c
	plugins/check_ping.c
	plugins/check_procs.c
	plugins/check_radius.c
	plugins/check_real.c
	plugins/check_smtp.c
	plugins/check_snmp.c
	plugins/check_ssh.c
	plugins/check_swap.c
	plugins/check_tcp.c
	plugins/check_time.c
	plugins/check_ups.c
	plugins/check_users.c
	plugins/negate.c
	plugins/urlize.c
	plugins/utils.h
	po/Makevars
	po/de.po
	po/fr.po
	po/monitoring-plugins.pot
2014-01-21 16:07:38 +01:00
Thomas Guyot-Sionnest
11cf54ca78 Merge branch 'rename' 2014-01-21 07:59:07 -05:00
Spenser Reinhardt
212575b858 plugins/*.c: Alterations for timeout messages.
.c file changes for misleading timeout messages in help functions. Solution to pull request #1209 tracker by awiddersheim.

Files: plugins/check_apt.c, plugins/check_by_ssh.c, plugins/check_dbi.c, plugins/check_dig.c, plugins/check_disk.c, plugins/check_dns.c, plugins/check_game.c, plugins/check_http.c, plugins/check_ldap.c, plugins/check_ntp.c, plugins/check_ntp_peer.c, plugins/check_ntp_time.c, plugins/check_nwstat.c, plugins/check_overcr.c, plugins/check_pgsql.c, plugins/check_ping.c, plugins/check_procs.c, plugins/check_radius.c, plugins/check_real.c, plugins/check_smtp.c, plugins/check_snmp.c, plugins/check_ssh.c, plugins/check_tcp.c, plugins/check_time.c, plugins/check_ups.c, plugins/negate.c
2014-01-21 11:33:45 +01:00
Holger Weiss
c3e756a855 Capitalize "Monitoring" when it's the first word 2014-01-20 03:12:50 +01:00
Monitoring Plugins Development Team
63734f52ab Project rename initial commit.
This is an initial take at renaming the project to Monitoring Plugins.
It's not expected to be fully complete, and it is expected to break
things (The perl module for instance). More testing will be required
before this goes mainline.
2014-01-19 14:18:47 -05:00
Joseph Gooch
cadf0d7ba8 Fix for SSL Versioning when multiple options are used.
If you specify -S1 -C 30... The -C option will reset the ssl_version to 0.  This is not a good thing.

Instead we set the default to 0 and retain the version when later args are passed.
2013-12-20 17:30:14 +01:00
Holger Weiss
c91ff7539a check_http: Don't let "-N" expect an argument
Fix the problem that check_http's "-N" option expects an argument
although it shouldn't.  The corresponding long option ("--no-body")
wasn't affected.

This error was introduced in ee3c4014d5.
Thanks to Kerry Hughes for reporting it on the devel@ list.
2013-12-05 20:13:31 +01:00
Holger Weiss
3c90a370ea Update URLs and mailing list addresses
Now that we moved our infrastructure away from SourceForge, update the
URLs and mailing list addresses accordingly.
2013-10-28 23:58:36 +01:00
awiddersheim
d4c5730464 Die on SSL initialization errors
Fixes issue where if an SSL initialization error occurs on a redirect
using -f follow the plugin still returns an OK state.

Closes #1159.
2013-09-26 17:01:28 +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
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
30aa7a63f1 check_http: Document the new -E option
Mention the -E/--extended-perfdata flag in the --help output.
2013-08-18 23:18:18 +02:00
Holger Weiss
64b4d1fb66 Abbreviate function name
Make a very long function name at least a little bit shorter.
2013-08-18 23:11:11 +02:00
Holger Weiss
8e444095e8 Merge branch 'master' of https://github.com/cern-mig/nagios-plugins
* 'master' of https://github.com/cern-mig/nagios-plugins:
  added support for client authentication via SSL

Conflicts:
	plugins/check_http.c
2013-08-18 23:10:31 +02:00
Holger Weiss
22519bced6 check_http: Use xasprintf instead of asprintf 2013-08-18 19:16:00 +02:00
Holger Weiss
ebb5572af3 check_http: s/--header_string/--header-string/
The name of the new option is "--header-string".
2013-08-18 19:14:22 +02:00
linkslice
2a8eab6b31 added ability to check regex against http headers. booyah! 2013-08-18 18:23:11 +02:00
Sven Nierlein
ec537bc463 cleanup after check_http patch (fixes #50)
- cleanup whitespace
  - added test cases
  - print time_ssl only if ssl is in use
  - updated news and thanks file
2013-08-15 17:28:49 +02:00
Sebastian Nohn
ee3c4014d5 log more perfdata in check_http 2013-08-15 17:03:31 +02:00
Richard Leitner
14225eb464 Fixed SF.net bug #3571331, check_http converts semicolon to newline in -k
This commit fixes sourceforge.net bug id 3571331.
The semicolon was defined as input delimiter for multiple values in the -k arguments.
Due to the fact the semicolon is a valid character for HTTP header fields this input delimiter function was removed.
It is still possible to pass multiple header fields via multiple -k (like described in helptext).
2013-05-29 15:02:15 +02:00
Lionel Cons
2f92d0dab7 added support for client authentication via SSL 2013-05-17 15:00:09 +02:00
Holger Weiss
4cdda35b6c check_http: Update description of -C option
Mention that the -C option now accepts two comma-separated values.
2012-08-10 13:07:44 +02:00
Holger Weiss
d3c9728ebf check_http: Add missing newline to --help output 2012-08-10 13:05:31 +02:00
William Leibzon
6b844aea9f fixing bug in certificate experiation patch checking for bad warning threshold data 2012-08-10 13:03:00 +02:00
Holger Weiss
3c10d84ea2 check_http: Fix whitespace issues
In check_http.c, tabs aren't used for indentation.
2012-07-18 23:39:05 +02:00
Holger Weiss
ea595f1371 check_http: Fix compilation without SSL support
The "ssl_version" variable was undeclared when the plugins were compiled
--without-openssl and --without-gnutls.

Bug reported by Michael LaCorte on the "nagiosplug-help" mailing list
(Message-ID: <CCD30C91-A2A8-463A-82A9-F99B54F741D3@gmail.com>).
2012-07-18 23:31:17 +02:00
Anders Kaseorg
028d50d6f9 Die when asprintf fails
Fixes many instances of
warning: ignoring return value of 'asprintf', declared with attribute warn_unused_result [-Wunused-result]

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2012-06-29 13:39:11 +02:00
William Leibzon
fa3d2a4074 applied patch that adds both critical and warning thresholds to certificate expiration checks of check_tcp, check_http, check_smtp 2012-06-25 12:05:16 +02:00
Holger Weiss
252ae618fc check_http: Fix -C/--certificate option handling
The support for specifying the desired SSL protocol version via an
optional -S/--ssl argument broke the -C/--certificate option.  This is
fixed now.
2012-05-29 12:59:16 +02:00
Holger Weiss
ec2596b92d check_http: Don't ignore SSL initialization errors
SSL initialization errors are now handled properly by check_http
(#3095106 - Eric Schoeller).
2012-05-28 21:42:48 +02:00
Holger Weiss
bc3307ed6e Add support for specifying SSL protocol version
The check_http -S/--ssl option now takes an optional argument which
specifies the desired SSL/TLS protocol version (#3285367 - Jason Lunn).
2012-05-28 17:16:04 +02:00
Holger Weiss
d796c16327 Clarify that check_http won't verify certificates
Add a note to the --help output which clarifies that check_http doesn't
perform certificate verification (beyond what the "-C" option does).

(Suggested by Michael Renner in Debian bug report #644627, forwarded by
Jan Wagner.)
2012-02-24 13:24:56 +01:00
Thomas Guyot-Sionnest
890e0ae000 Make check_http use standard threshold functions
This enables floating point and ranges, and make the code more standard.
2011-01-01 15:29:43 -05:00
Ton Voon
bfe20df4a5 Fix typos in -f help text 2010-08-31 15:54:19 +01:00
tonvoon
1252195ed5 Display missing search string and URL when failed (Duncan Ferguson #2999924) 2010-06-23 14:44:34 +00:00
Thomas Guyot-Sionnest
eaf3cb27f4 Add newline after "Usage:" in --help 2010-04-22 08:57:14 -04:00