Module: monitoring-plugins Branch: feature_check_curl Commit: 3de22e2dc38a098271b999581360d808f2e421da Author: Andreas Baumann <m...@andreasbaumann.cc> Committer: Sven Nierlein <s...@nierlein.de> Date: Thu Jan 19 20:42:57 2017 +0100 URL: https://www.monitoring-plugins.org/repositories/monitoring-plugins/commit/?id=3de22e2
fixed curl error message --- plugins/check_curl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/check_curl.c b/plugins/check_curl.c index 4a62c1d..8ef48d0 100644 --- a/plugins/check_curl.c +++ b/plugins/check_curl.c @@ -268,8 +268,8 @@ main (int argc, char **argv) /* Curl errors, result in critical Nagios state */ if (res != CURLE_OK) { remove_newlines (errbuf); - snprintf (msg, DEFAULT_BUFFER_SIZE, _("Invalid HTTP response received from host on port %d: %s\n"), - server_port, status_line.msg, status_line.msg); + snprintf (msg, DEFAULT_BUFFER_SIZE, _("Invalid HTTP response received from host on port %d: cURL returned %d - %s\n"), + server_port, res, curl_easy_strerror(res)); die (STATE_CRITICAL, "HTTP CRITICAL - %s\n", msg); }