diff options
Diffstat (limited to 'plugins/check_fping.c')
| -rw-r--r-- | plugins/check_fping.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/plugins/check_fping.c b/plugins/check_fping.c index 16e177ce..7e4049c8 100644 --- a/plugins/check_fping.c +++ b/plugins/check_fping.c | |||
| @@ -173,16 +173,16 @@ textscan (char *buf) | |||
| 173 | int status = STATE_UNKNOWN; | 173 | int status = STATE_UNKNOWN; |
| 174 | 174 | ||
| 175 | if (strstr (buf, "not found")) { | 175 | if (strstr (buf, "not found")) { |
| 176 | terminate (STATE_CRITICAL, _("FPING unknown - %s not found\n"), server_name); | 176 | die (STATE_CRITICAL, _("FPING unknown - %s not found\n"), server_name); |
| 177 | 177 | ||
| 178 | } | 178 | } |
| 179 | else if (strstr (buf, "is unreachable") || strstr (buf, "Unreachable")) { | 179 | else if (strstr (buf, "is unreachable") || strstr (buf, "Unreachable")) { |
| 180 | terminate (STATE_CRITICAL, _("FPING critical - %s is unreachable\n"), | 180 | die (STATE_CRITICAL, _("FPING critical - %s is unreachable\n"), |
| 181 | "host"); | 181 | "host"); |
| 182 | 182 | ||
| 183 | } | 183 | } |
| 184 | else if (strstr (buf, "is down")) { | 184 | else if (strstr (buf, "is down")) { |
| 185 | terminate (STATE_CRITICAL, _("FPING critical - %s is down\n"), server_name); | 185 | die (STATE_CRITICAL, _("FPING critical - %s is down\n"), server_name); |
| 186 | 186 | ||
| 187 | } | 187 | } |
| 188 | else if (strstr (buf, "is alive")) { | 188 | else if (strstr (buf, "is alive")) { |
| @@ -208,7 +208,7 @@ textscan (char *buf) | |||
| 208 | status = STATE_WARNING; | 208 | status = STATE_WARNING; |
| 209 | else | 209 | else |
| 210 | status = STATE_OK; | 210 | status = STATE_OK; |
| 211 | terminate (status, _("FPING %s - %s (loss=%f%%, rta=%f ms)\n"), | 211 | die (status, _("FPING %s - %s (loss=%f%%, rta=%f ms)\n"), |
| 212 | state_text (status), server_name, loss, rta); | 212 | state_text (status), server_name, loss, rta); |
| 213 | 213 | ||
| 214 | } | 214 | } |
| @@ -227,7 +227,7 @@ textscan (char *buf) | |||
| 227 | else | 227 | else |
| 228 | status = STATE_OK; | 228 | status = STATE_OK; |
| 229 | 229 | ||
| 230 | terminate (status, _("FPING %s - %s (loss=%f%% )\n"), | 230 | die (status, _("FPING %s - %s (loss=%f%% )\n"), |
| 231 | state_text (status), server_name, loss ); | 231 | state_text (status), server_name, loss ); |
| 232 | 232 | ||
| 233 | } | 233 | } |
| @@ -363,11 +363,11 @@ get_threshold (char *arg, char *rv[2]) | |||
| 363 | if (arg2) { | 363 | if (arg2) { |
| 364 | arg1[strcspn (arg1, ",:")] = 0; | 364 | arg1[strcspn (arg1, ",:")] = 0; |
| 365 | if (strstr (arg1, "%") && strstr (arg2, "%")) | 365 | if (strstr (arg1, "%") && strstr (arg2, "%")) |
| 366 | terminate (STATE_UNKNOWN, | 366 | die (STATE_UNKNOWN, |
| 367 | _("%s: Only one threshold may be packet loss (%s)\n"), progname, | 367 | _("%s: Only one threshold may be packet loss (%s)\n"), progname, |
| 368 | arg); | 368 | arg); |
| 369 | if (!strstr (arg1, "%") && !strstr (arg2, "%")) | 369 | if (!strstr (arg1, "%") && !strstr (arg2, "%")) |
| 370 | terminate (STATE_UNKNOWN, | 370 | die (STATE_UNKNOWN, |
| 371 | _("%s: Only one threshold must be packet loss (%s)\n"), | 371 | _("%s: Only one threshold must be packet loss (%s)\n"), |
| 372 | progname, arg); | 372 | progname, arg); |
| 373 | } | 373 | } |
