Module: monitoring-plugins
Branch: master
Commit: 6e67b638f8adeec91ff27bc5b82e5c9d755bc79e
Author: Michael Kraus <[email protected]>
Committer: GitHub <[email protected]>
Date: Mon Sep 4 16:36:19 2017 +0200
URL:
https://www.monitoring-plugins.org/repositories/monitoring-plugins/commit/?id=6e67b63
Output plugin's stderr to stderr
Output plugin's stderr to stderr and do not exit with WARNING in that case
---
plugins/negate.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/plugins/negate.c b/plugins/negate.c
index b320e35..50f62d3 100644
--- a/plugins/negate.c
+++ b/plugins/negate.c
@@ -86,11 +86,9 @@ main (int argc, char **argv)
result = cmd_run_array (command_line, &chld_out, &chld_err, 0);
}
if (chld_err.lines > 0) {
- printf ("Error output from command:\n");
for (i = 0; i < chld_err.lines; i++) {
- printf ("%s\n", chld_err.line[i]);
+ fprintf (stderr, "%s\n", chld_err.line[i]);
}
- exit (STATE_WARNING);
}
/* Return UNKNOWN or worse if no output is returned */