27 lines
1.1 KiB
Plaintext
27 lines
1.1 KiB
Plaintext
#! /bin/sh /usr/share/dpatch/dpatch-run
|
|
## 40_check_http_status_line.dpatch by Jan Wagner <waja@cyconet.org>
|
|
## patch provided by Josip Rodin <joy@debbugs.entuzijast.net>
|
|
##
|
|
## DP: adds status_line to check_http output
|
|
|
|
@DPATCH@
|
|
diff -urNad nagios-plugins-1.4.12~/plugins/check_http.c nagios-plugins-1.4.12/plugins/check_http.c
|
|
--- nagios-plugins-1.4.12~/plugins/check_http.c 2008-08-23 15:34:17.000000000 +0200
|
|
+++ nagios-plugins-1.4.12/plugins/check_http.c 2008-08-23 15:36:20.000000000 +0200
|
|
@@ -879,11 +879,12 @@
|
|
if (!strstr (status_line, server_expect)) {
|
|
if (server_port == HTTP_PORT)
|
|
asprintf (&msg,
|
|
- _("Invalid HTTP response received from host\n"));
|
|
+ _("Invalid HTTP response received from host: %s\n"),
|
|
+ status_line);
|
|
else
|
|
asprintf (&msg,
|
|
- _("Invalid HTTP response received from host on port %d\n"),
|
|
- server_port);
|
|
+ _("Invalid HTTP response received from host on port %d: %s\n"),
|
|
+ server_port, status_line);
|
|
die (STATE_CRITICAL, "HTTP CRITICAL - %s", msg);
|
|
}
|
|
|