Module: monitoring-plugins
Branch: master
Commit: 7ab5b3ba34128949902cb966ab73d84f8fb4113f
Author: Lorenz Kästle <[email protected]>
Committer: GitHub <[email protected]>
Date: Thu Dec 4 15:31:22 2025 +0100
URL:
https://www.monitoring-plugins.org/repositories/monitoring-plugins/commit/?id=7ab5b3ba
lib: properly separate perfdata from different sub subchecks (#2197)
Previously there was a space missing between perfdata from differen sub
subchecks which irritated my monitoring system and caused it to interpet two
data points as one.
This puts the space back in there.
---
lib/output.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/output.c b/lib/output.c
index f283969f..62e1366d 100644
--- a/lib/output.c
+++ b/lib/output.c
@@ -42,7 +42,7 @@ static inline char *fmt_subcheck_perfdata(mp_subcheck check) {
while (subchecks != NULL) {
if (added > 0) {
- added = asprintf(&result, "%s%s", result,
fmt_subcheck_perfdata(subchecks->subcheck));
+ added = asprintf(&result, "%s %s", result,
fmt_subcheck_perfdata(subchecks->subcheck));
} else {
// TODO free previous result here?
added = asprintf(&result, "%s",
fmt_subcheck_perfdata(subchecks->subcheck));