summaryrefslogtreecommitdiffstats
path: root/exporting/opentsdb
diff options
context:
space:
mode:
authorIlya Mashchenko <ilya@netdata.cloud>2020-12-14 17:27:55 +0300
committerGitHub <noreply@github.com>2020-12-14 17:27:55 +0300
commit0f8175dd3060691394e263cdab01c8f940b1b5d3 (patch)
tree4b14cd6b7e6ba7797eeec4c74b4c4c35cdad4494 /exporting/opentsdb
parent7bfa8c8eba72a109d940b1fa5c7acaed9cd7a52c (diff)
Kubernetes labels (#10107)
Co-authored-by: Markos Fountoulakis <markos.fountoulakis.senior@gmail.com> Co-authored-by: Vladimir Kobal <vlad@prokk.net>
Diffstat (limited to 'exporting/opentsdb')
-rw-r--r--exporting/opentsdb/opentsdb.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/exporting/opentsdb/opentsdb.c b/exporting/opentsdb/opentsdb.c
index 4d00f893e3..9f65926641 100644
--- a/exporting/opentsdb/opentsdb.c
+++ b/exporting/opentsdb/opentsdb.c
@@ -153,8 +153,8 @@ int format_host_labels_opentsdb_telnet(struct instance *instance, RRDHOST *host)
return 0;
rrdhost_check_rdlock(localhost);
- netdata_rwlock_rdlock(&host->labels_rwlock);
- for (struct label *label = host->labels; label; label = label->next) {
+ netdata_rwlock_rdlock(&host->labels.labels_rwlock);
+ for (struct label *label = host->labels.head; label; label = label->next) {
if (!should_send_label(instance, label))
continue;
@@ -164,7 +164,7 @@ int format_host_labels_opentsdb_telnet(struct instance *instance, RRDHOST *host)
if (*value)
buffer_sprintf(instance->labels, " %s=%s", label->key, value);
}
- netdata_rwlock_unlock(&host->labels_rwlock);
+ netdata_rwlock_unlock(&host->labels.labels_rwlock);
return 0;
}
@@ -294,8 +294,8 @@ int format_host_labels_opentsdb_http(struct instance *instance, RRDHOST *host)
return 0;
rrdhost_check_rdlock(host);
- netdata_rwlock_rdlock(&host->labels_rwlock);
- for (struct label *label = host->labels; label; label = label->next) {
+ netdata_rwlock_rdlock(&host->labels.labels_rwlock);
+ for (struct label *label = host->labels.head; label; label = label->next) {
if (!should_send_label(instance, label))
continue;
@@ -310,7 +310,7 @@ int format_host_labels_opentsdb_http(struct instance *instance, RRDHOST *host)
buffer_sprintf(instance->labels, "\"%s\":\"%s\"", label->key, value);
}
}
- netdata_rwlock_unlock(&host->labels_rwlock);
+ netdata_rwlock_unlock(&host->labels.labels_rwlock);
return 0;
}