diff options
Diffstat (limited to 'plugins/check_ping.c')
-rw-r--r-- | plugins/check_ping.c | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/plugins/check_ping.c b/plugins/check_ping.c index 1903678d..a7b7d902 100644 --- a/plugins/check_ping.c +++ b/plugins/check_ping.c | |||
@@ -452,9 +452,22 @@ run_ping (const char *cmd, const char *addr) | |||
452 | rta = crta; | 452 | rta = crta; |
453 | 453 | ||
454 | /* check stderr, setting at least WARNING if there is output here */ | 454 | /* check stderr, setting at least WARNING if there is output here */ |
455 | while (fgets (buf, MAX_INPUT_BUFFER - 1, child_stderr)) | 455 | /* Add warning into warn_text */ |
456 | if (! strstr(buf,"WARNING - no SO_TIMESTAMP support, falling back to SIOCGSTAMP")) | 456 | while (fgets (buf, MAX_INPUT_BUFFER - 1, child_stderr)) { |
457 | result = max_state (STATE_WARNING, error_scan (buf, addr)); | 457 | if (! strstr(buf,"WARNING - no SO_TIMESTAMP support, falling back to SIOCGSTAMP")) { |
458 | if (verbose >= 3) { | ||
459 | printf("Got stderr: %s", buf); | ||
460 | } | ||
461 | if ((result=error_scan(buf, addr)) == STATE_OK) { | ||
462 | result = STATE_WARNING; | ||
463 | if (warn_text == NULL) { | ||
464 | warn_text = strdup(_("System call sent warnings to stderr ")); | ||
465 | } else { | ||
466 | asprintf(&warn_text, "%s %s", warn_text, _("System call sent warnings to stderr ")); | ||
467 | } | ||
468 | } | ||
469 | } | ||
470 | } | ||
458 | 471 | ||
459 | (void) fclose (child_stderr); | 472 | (void) fclose (child_stderr); |
460 | 473 | ||