Commit graph

170 commits

Author SHA1 Message Date
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
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
Thomas Guyot-Sionnest
884aee0667 Standardize the extra-opts notes 2010-04-21 23:29:18 -04: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
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
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
Ton Voon
6b782ebfd4 Fix memory leak in check_http for large pages (Jimmy Bergman - #2957455) 2010-02-26 12:47:38 +00: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
Thomas Guyot-Sionnest
08199792ba Add proxy-authorization option to check_http (Peter Doherty - #2863772, Bryan Irvine - #2863925) 2009-09-21 21:20:33 -04:00
Thomas Guyot-Sionnest
0489df95fc check_http: Add SSL/TLS hostname extension support (SNI) - (#1939022 - Joe Presbrey) 2009-05-20 01:05:35 -04:00
Thomas Guyot-Sionnest
8aa84840bb Update check_http short help with new stycky and stickyport options. 2009-03-21 02:56:35 -04:00
Thomas Guyot-Sionnest
795277d9b1 check_http: die when an invalid --onredirect option is specified 2009-03-21 02:39:49 -04:00
Thomas Guyot-Sionnest
e7cdcfee2a check_http: add --onredirect=stickyport - also follow the same port 2009-03-21 02:32:50 -04:00
Thomas Guyot-Sionnest thomas@aei.ca
3dd27fb063 Fixed check_http not timing-out on redirects 2009-03-19 13:59:43 -07:00
Thomas Guyot-Sionnest
16030bc497 Fix check_http sending HTTP/1.0 with v1.1 headers (#2638765) 2009-03-17 01:53:00 -04:00
Thomas Guyot-Sionnest
6b8502bee6 check_http fixes:
- Fix broken printf on 500 errors
- Add bytes to normal output (accidentally removed in 0d78171)
2009-03-16 03:06:33 -04:00
Ton Voon
5324544855 Typo fixes (Jan Wagner - SF 1878971) 2009-02-20 00:00:13 +00:00
Thomas Guyot-Sionnest
d00a53dd1e check_http --onredirect=sticky follows using the same IP address (sf.net #2550208). 2009-02-05 00:47:07 -05:00
Thomas Guyot-Sionnest
0d781712d7 Fix aberrant behaviours in check_http:
check_http used to ignore many parameters with check combinations - sometimes
even time thresholds(!!)

With this commit as long as a response is received *all* checks are performed
on it.

This fixes #1460312 plus a number of other issues I discovered over time.
2009-02-03 04:50:47 -05:00
Thomas Guyot-Sionnest
6fbd14fea5 Removing CVS/SVN tags and replacing with git-based versioning
For contrib/, full tags have been imported from subversion


git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@2091 f882894a-f735-0410-b71e-b25c423dba1c
2008-11-23 05:38:47 +00:00
Thomas Guyot-Sionnest
caa8bd6423 Bulk EOL cleanup
$ git diff --ignore-space-change|diffstat
 0 files changed


git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@2087 f882894a-f735-0410-b71e-b25c423dba1c
2008-11-19 06:45:18 +00:00
Ton Voon
6c5f781bc5 Fixed bug where extra headers and redirect caused segfault (Dieter Van de Walle - 2089159)
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@2076 f882894a-f735-0410-b71e-b25c423dba1c
2008-11-08 02:32:03 +00:00
Ton Voon
288b742ed6 check_http now has options to specify the HTTP method (Jan - 2155152)
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@2075 f882894a-f735-0410-b71e-b25c423dba1c
2008-11-08 02:08:56 +00:00
Holger Weiss
8430be0b4b Some HTTP server applications/configurations cause trouble if the port is
explicitly specified in our "Host:" header line.  Therefore, we now specify the
port only if we're using a non-default port (Erik Wasser - 2082501).


git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@2053 f882894a-f735-0410-b71e-b25c423dba1c
2008-09-02 11:26:31 +00:00
Thomas Guyot-Sionnest
e9f976fbf3 Revert "Re-structure the HTTP 1.1 headers to prevent 301s on servers with virtual hosts"
This reverts commit 2030


git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@2050 f882894a-f735-0410-b71e-b25c423dba1c
2008-09-01 14:04:04 +00:00
Holger Weiss
e8c7d1b3d1 Under some circumstances, the 'url' path of a redirection target missed
a leading slash.  While this was fixed later on, the incomplete 'url'
was used for redirection loop detection and error messages.  This is now
fixed by adding the missing slash immediately.


git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@2049 f882894a-f735-0410-b71e-b25c423dba1c
2008-09-01 12:20:32 +00:00
Holger Weiss
c349438e32 The "-e" option now accepts a comma-delimited list of expected status
lines (Sven Nierlein - 1894496).


git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@2046 f882894a-f735-0410-b71e-b25c423dba1c
2008-08-25 11:42:57 +00:00
Thomas Guyot-Sionnest
0378f34d85 Re-structure the HTTP 1.1 headers to prevent 301s on servers with virtual hosts
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@2030 f882894a-f735-0410-b71e-b25c423dba1c
2008-08-08 02:25:47 +00:00
Thomas Guyot-Sionnest
8883581220 Fix Debian bug #460097: check_http --max-age broken (Hilko Bengen)
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@2008 f882894a-f735-0410-b71e-b25c423dba1c
2008-05-30 23:38:00 +00:00
Thomas Guyot-Sionnest
44f8455b2c Added support for --extra-opts in all C plugins (disabled by default, see configure --help)
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1991 f882894a-f735-0410-b71e-b25c423dba1c
2008-05-07 10:02:42 +00:00
Thomas Guyot-Sionnest
ed62784a0b --help output cleanup (plus removal of spaces on blank lines)
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1984 f882894a-f735-0410-b71e-b25c423dba1c
2008-04-27 14:35:26 +00:00