diff options
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/check_dig.c | 2 | ||||
-rw-r--r-- | plugins/check_http.c | 6 | ||||
-rw-r--r-- | plugins/check_ldap.c | 10 | ||||
-rw-r--r-- | plugins/check_udp.c | 5 |
4 files changed, 11 insertions, 12 deletions
diff --git a/plugins/check_dig.c b/plugins/check_dig.c index 59c3b7c..8eb2b9b 100644 --- a/plugins/check_dig.c +++ b/plugins/check_dig.c | |||
@@ -128,7 +128,7 @@ main (int argc, char **argv) | |||
128 | asprintf (&output, " Probably a non-existent host/domain"); | 128 | asprintf (&output, " Probably a non-existent host/domain"); |
129 | 129 | ||
130 | if (result == STATE_OK) | 130 | if (result == STATE_OK) |
131 | printf ("DNS ok - %d seconds response time (%s)\n", | 131 | printf ("DNS OK - %d seconds response time (%s)\n", |
132 | (int) (end_time - start_time), output); | 132 | (int) (end_time - start_time), output); |
133 | else if (result == STATE_WARNING) | 133 | else if (result == STATE_WARNING) |
134 | printf ("DNS WARNING - %s\n", output); | 134 | printf ("DNS WARNING - %s\n", output); |
diff --git a/plugins/check_http.c b/plugins/check_http.c index d6f2c15..c947bd8 100644 --- a/plugins/check_http.c +++ b/plugins/check_http.c | |||
@@ -820,7 +820,7 @@ check_http (void) | |||
820 | 820 | ||
821 | if (strlen (string_expect)) { | 821 | if (strlen (string_expect)) { |
822 | if (strstr (page, string_expect)) { | 822 | if (strstr (page, string_expect)) { |
823 | printf ("HTTP ok: %s - %7.3f second response time %s%s|time=%7.3f\n", | 823 | printf ("HTTP OK %s - %7.3f second response time %s%s|time=%7.3f\n", |
824 | status_line, elapsed_time, | 824 | status_line, elapsed_time, |
825 | timestamp, (display_html ? "</A>" : ""), elapsed_time); | 825 | timestamp, (display_html ? "</A>" : ""), elapsed_time); |
826 | exit (STATE_OK); | 826 | exit (STATE_OK); |
@@ -835,7 +835,7 @@ check_http (void) | |||
835 | if (strlen (regexp)) { | 835 | if (strlen (regexp)) { |
836 | errcode = regexec (&preg, page, REGS, pmatch, 0); | 836 | errcode = regexec (&preg, page, REGS, pmatch, 0); |
837 | if (errcode == 0) { | 837 | if (errcode == 0) { |
838 | printf ("HTTP ok: %s - %7.3f second response time %s%s|time=%7.3f\n", | 838 | printf ("HTTP OK %s - %7.3f second response time %s%s|time=%7.3f\n", |
839 | status_line, elapsed_time, | 839 | status_line, elapsed_time, |
840 | timestamp, (display_html ? "</A>" : ""), elapsed_time); | 840 | timestamp, (display_html ? "</A>" : ""), elapsed_time); |
841 | exit (STATE_OK); | 841 | exit (STATE_OK); |
@@ -863,7 +863,7 @@ check_http (void) | |||
863 | exit (STATE_WARNING); | 863 | exit (STATE_WARNING); |
864 | } | 864 | } |
865 | /* We only get here if all tests have been passed */ | 865 | /* We only get here if all tests have been passed */ |
866 | asprintf (&msg, "HTTP ok: %s - %7.3f second response time %s%s|time=%7.3f\n", | 866 | asprintf (&msg, "HTTP OK %s - %7.3f second response time %s%s|time=%7.3f\n", |
867 | status_line, (float)elapsed_time, | 867 | status_line, (float)elapsed_time, |
868 | timestamp, (display_html ? "</A>" : ""), elapsed_time); | 868 | timestamp, (display_html ? "</A>" : ""), elapsed_time); |
869 | terminate (STATE_OK, msg); | 869 | terminate (STATE_OK, msg); |
diff --git a/plugins/check_ldap.c b/plugins/check_ldap.c index 90fe622..5b983f4 100644 --- a/plugins/check_ldap.c +++ b/plugins/check_ldap.c | |||
@@ -7,7 +7,7 @@ | |||
7 | * | 7 | * |
8 | * Last Modified: $Date$ | 8 | * Last Modified: $Date$ |
9 | * | 9 | * |
10 | * Command line: check_ldap -h <host> -b <base_dn> -p <port> -w <warn_time> -w <crit_time> | 10 | * Command line: check_ldap -H <host> -b <base_dn> -p <port> -w <warn_time> -w <crit_time> |
11 | * | 11 | * |
12 | * Description: | 12 | * Description: |
13 | * | 13 | * |
@@ -109,17 +109,17 @@ main (int argc, char *argv[]) | |||
109 | t_diff = time1 - time0; | 109 | t_diff = time1 - time0; |
110 | 110 | ||
111 | if (crit_time!=UNDEFINED && t_diff>=crit_time) { | 111 | if (crit_time!=UNDEFINED && t_diff>=crit_time) { |
112 | printf ("LDAP critical - %i seconds response time\n", t_diff); | 112 | printf ("LDAP CRITICAL - %i seconds response time\n", t_diff); |
113 | return STATE_CRITICAL; | 113 | return STATE_CRITICAL; |
114 | } | 114 | } |
115 | 115 | ||
116 | if (warn_time!=UNDEFINED && t_diff>=warn_time) { | 116 | if (warn_time!=UNDEFINED && t_diff>=warn_time) { |
117 | printf ("LDAP warning - %i seconds response time\n", t_diff); | 117 | printf ("LDAP WARNING - %i seconds response time\n", t_diff); |
118 | return STATE_WARNING; | 118 | return STATE_WARNING; |
119 | } | 119 | } |
120 | 120 | ||
121 | /* print out the result */ | 121 | /* print out the result */ |
122 | printf ("LDAP ok - %i seconds response time\n", t_diff); | 122 | printf ("LDAP OK - %i seconds response time\n", t_diff); |
123 | 123 | ||
124 | return STATE_OK; | 124 | return STATE_OK; |
125 | } | 125 | } |
@@ -198,7 +198,7 @@ process_arguments (int argc, char **argv) | |||
198 | crit_time = atoi (optarg); | 198 | crit_time = atoi (optarg); |
199 | break; | 199 | break; |
200 | default: | 200 | default: |
201 | usage ("check_ldap: could not parse arguments\n"); | 201 | usage ("check_ldap: could not parse unknown arguments\n"); |
202 | break; | 202 | break; |
203 | } | 203 | } |
204 | } | 204 | } |
diff --git a/plugins/check_udp.c b/plugins/check_udp.c index ac22102..da9a142 100644 --- a/plugins/check_udp.c +++ b/plugins/check_udp.c | |||
@@ -74,9 +74,8 @@ main (int argc, char **argv) | |||
74 | alarm (socket_timeout); | 74 | alarm (socket_timeout); |
75 | 75 | ||
76 | time (&start_time); | 76 | time (&start_time); |
77 | result = | 77 | result = process_udp_request (server_address, server_port, server_send, |
78 | process_udp_request (server_address, server_port, server_send, | 78 | recv_buffer, MAX_INPUT_BUFFER - 1); |
79 | recv_buffer, MAX_INPUT_BUFFER - 1); | ||
80 | time (&end_time); | 79 | time (&end_time); |
81 | 80 | ||
82 | if (result != STATE_OK) { | 81 | if (result != STATE_OK) { |