diff options
author | Lorenz Kästle <12514511+RincewindsHat@users.noreply.github.com> | 2025-09-15 00:22:08 +0200 |
---|---|---|
committer | Lorenz Kästle <12514511+RincewindsHat@users.noreply.github.com> | 2025-09-15 00:22:08 +0200 |
commit | def42dc686736107f95d66fe8f35d78528b77779 (patch) | |
tree | c41709ea4d05a29dec54164fa182f80bb38b3358 /plugins/check_curl.c | |
parent | 6ae8ba911018571afddcf51c08e3d32f5efa3b5a (diff) | |
download | monitoring-plugins-def42dc686736107f95d66fe8f35d78528b77779.tar.gz |
Improve error message
Diffstat (limited to 'plugins/check_curl.c')
-rw-r--r-- | plugins/check_curl.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/plugins/check_curl.c b/plugins/check_curl.c index 89173808..7cb9745f 100644 --- a/plugins/check_curl.c +++ b/plugins/check_curl.c | |||
@@ -230,9 +230,8 @@ mp_subcheck check_http(const check_curl_config config, check_curl_working_state | |||
230 | 230 | ||
231 | /* Curl errors, result in critical Nagios state */ | 231 | /* Curl errors, result in critical Nagios state */ |
232 | if (res != CURLE_OK) { | 232 | if (res != CURLE_OK) { |
233 | xasprintf(&sc_curl.output, | 233 | xasprintf(&sc_curl.output, _("Error while performing connectiion: cURL returned %d - %s"), |
234 | _("Invalid HTTP response received from host on port %d: cURL returned %d - %s"), | 234 | res, errbuf[0] ? errbuf : curl_easy_strerror(res)); |
235 | workingState.serverPort, res, errbuf[0] ? errbuf : curl_easy_strerror(res)); | ||
236 | sc_curl = mp_set_subcheck_state(sc_curl, STATE_CRITICAL); | 235 | sc_curl = mp_set_subcheck_state(sc_curl, STATE_CRITICAL); |
237 | mp_add_subcheck_to_subcheck(&sc_result, sc_curl); | 236 | mp_add_subcheck_to_subcheck(&sc_result, sc_curl); |
238 | return sc_result; | 237 | return sc_result; |