summaryrefslogtreecommitdiffstats
path: root/daemon/commands.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2022-08-12 07:26:11 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2022-08-12 07:26:11 +0000
commit3c315f0fff93aa072472abc10815963ac0035268 (patch)
treea95f6a96e0e7bd139c010f8dc60b40e5b3062a99 /daemon/commands.c
parentAdding upstream version 1.35.1. (diff)
downloadnetdata-3c315f0fff93aa072472abc10815963ac0035268.tar.xz
netdata-3c315f0fff93aa072472abc10815963ac0035268.zip
Adding upstream version 1.36.0.upstream/1.36.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'daemon/commands.c')
-rw-r--r--daemon/commands.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/daemon/commands.c b/daemon/commands.c
index 6efc37c96..13d8dbd40 100644
--- a/daemon/commands.c
+++ b/daemon/commands.c
@@ -217,17 +217,7 @@ static cmd_status_t cmd_reload_labels_execute(char *args, char **message)
reload_host_labels();
BUFFER *wb = buffer_create(10);
-
- rrdhost_rdlock(localhost);
- netdata_rwlock_rdlock(&localhost->labels.labels_rwlock);
- struct label *l = localhost->labels.head;
- while (l != NULL) {
- buffer_sprintf(wb,"Label [source id=%s]: \"%s\" -> \"%s\"\n", translate_label_source(l->label_source), l->key, l->value);
- l = l->next;
- }
- netdata_rwlock_unlock(&localhost->labels.labels_rwlock);
- rrdhost_unlock(localhost);
-
+ rrdlabels_log_to_buffer(localhost->host_labels, wb);
(*message)=strdupz(buffer_tostring(wb));
buffer_free(wb);