Skip to content

Commit f5c6ae3

Browse files
authored
fix(health/dyncfg): add mising "repeat" in userconfig response (#21181)
1 parent 8e0ec6d commit f5c6ae3

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/health/health_dyncfg.c

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -493,10 +493,12 @@ int dyncfg_health_prototype_to_conf(BUFFER *wb, RRD_ALERT_PROTOTYPE *ap, const c
493493
buffer_strcat(wb, "\n");
494494
}
495495

496-
if(nap->config.has_custom_repeat_config) {
497-
if(!nap->config.crit_repeat_every && !nap->config.warn_repeat_every)
498-
buffer_sprintf(wb, "%13s: off\n", "repeat");
499-
else {
496+
if (nap->config.has_custom_repeat_config) {
497+
buffer_sprintf(wb, "%13s:", "repeat");
498+
499+
if (!nap->config.crit_repeat_every && !nap->config.warn_repeat_every) {
500+
buffer_strcat(wb, " off\n");
501+
} else {
500502
dyncfg_user_config_print_duration(wb, " warning ", (int)nap->config.warn_repeat_every);
501503
dyncfg_user_config_print_duration(wb, " critical ", (int)nap->config.crit_repeat_every);
502504
buffer_strcat(wb, "\n");

0 commit comments

Comments
 (0)