summaryrefslogtreecommitdiffstats
path: root/plugins/check_http.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/check_http.c')
-rw-r--r--plugins/check_http.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/plugins/check_http.c b/plugins/check_http.c
index 748ca46..f5a6c2b 100644
--- a/plugins/check_http.c
+++ b/plugins/check_http.c
@@ -145,7 +145,7 @@ main (int argc, char **argv)
145 asprintf (&user_agent, "User-Agent: check_http/%s (nagios-plugins %s)", 145 asprintf (&user_agent, "User-Agent: check_http/%s (nagios-plugins %s)",
146 clean_revstring (revision), VERSION); 146 clean_revstring (revision), VERSION);
147 147
148 if (process_arguments (argc, argv) == ERROR) 148 if (process_arguments (argc, argv) != OK)
149 usage (_("check_http: could not parse arguments\n")); 149 usage (_("check_http: could not parse arguments\n"));
150 150
151 if (strstr (timestamp, ":")) { 151 if (strstr (timestamp, ":")) {
@@ -174,7 +174,7 @@ main (int argc, char **argv)
174 X509_free (server_cert); 174 X509_free (server_cert);
175 } 175 }
176 else { 176 else {
177 printf (_("ERROR: Cannot retrieve server certificate.\n")); 177 printf (_("CRITICAL - Cannot retrieve server certificate.\n"));
178 result = STATE_CRITICAL; 178 result = STATE_CRITICAL;
179 } 179 }
180 SSL_shutdown (ssl); 180 SSL_shutdown (ssl);
@@ -738,7 +738,7 @@ check_http (void)
738 X509_free (server_cert); 738 X509_free (server_cert);
739 } 739 }
740 else { 740 else {
741 printf (_("ERROR: Cannot retrieve server certificate.\n")); 741 printf (_("CRITICAL - Cannot retrieve server certificate.\n"));
742 return STATE_CRITICAL; 742 return STATE_CRITICAL;
743 } 743 }
744 744
@@ -1049,11 +1049,11 @@ redir (char *pos, char *status_line)
1049 1049
1050 addr = malloc (MAX_IPV4_HOSTLENGTH + 1); 1050 addr = malloc (MAX_IPV4_HOSTLENGTH + 1);
1051 if (addr == NULL) 1051 if (addr == NULL)
1052 die (STATE_UNKNOWN, _("ERROR: could not allocate addr\n")); 1052 die (STATE_UNKNOWN, _("could not allocate addr\n"));
1053 1053
1054 url = malloc (strcspn (pos, "\r\n")); 1054 url = malloc (strcspn (pos, "\r\n"));
1055 if (url == NULL) 1055 if (url == NULL)
1056 die (STATE_UNKNOWN, _("ERROR: could not allocate url\n")); 1056 die (STATE_UNKNOWN, _("could not allocate url\n"));
1057 1057
1058 while (pos) { 1058 while (pos) {
1059 1059
@@ -1073,7 +1073,7 @@ redir (char *pos, char *status_line)
1073 1073
1074 url = realloc (url, strcspn (pos, "\r\n")); 1074 url = realloc (url, strcspn (pos, "\r\n"));
1075 if (url == NULL) 1075 if (url == NULL)
1076 die (STATE_UNKNOWN, _("ERROR: could not allocate url\n")); 1076 die (STATE_UNKNOWN, _("could not allocate url\n"));
1077 1077
1078 /* URI_HTTP, URI_HOST, URI_PORT, URI_PATH */ 1078 /* URI_HTTP, URI_HOST, URI_PORT, URI_PATH */
1079 if (sscanf (pos, HD1, type, addr, port, url) == 4) { 1079 if (sscanf (pos, HD1, type, addr, port, url) == 4) {