diff --git a/daemon/call.c b/daemon/call.c index f4be027d9..7480dcd42 100644 --- a/daemon/call.c +++ b/daemon/call.c @@ -725,7 +725,8 @@ int call_init() { poller_add_timer(rtpe_poller, call_timer, NULL); - mqtt_timer_start(&global_mqtt_timer, NULL, NULL); + if (mqtt_publish_scope() != MPS_NONE) + mqtt_timer_start(&global_mqtt_timer, NULL, NULL); return 0; } diff --git a/daemon/mqtt.c b/daemon/mqtt.c index 9ebbe85f0..75effb9f3 100644 --- a/daemon/mqtt.c +++ b/daemon/mqtt.c @@ -388,6 +388,12 @@ static void mqtt_global_stats(JsonBuilder *json) { if (!m->label) continue; + if (m->is_bracket && l == metrics->head) // skip initial { + continue; + if (m->is_bracket && l == metrics->tail) // skip final } + continue; + + if (m->value_short) { json_builder_set_member_name(json, m->label); if (m->is_int)