summaryrefslogtreecommitdiffstats
path: root/collectors/proc.plugin/sys_fs_btrfs.c
diff options
context:
space:
mode:
Diffstat (limited to 'collectors/proc.plugin/sys_fs_btrfs.c')
-rw-r--r--collectors/proc.plugin/sys_fs_btrfs.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/collectors/proc.plugin/sys_fs_btrfs.c b/collectors/proc.plugin/sys_fs_btrfs.c
index 158587a8f..3b9841fec 100644
--- a/collectors/proc.plugin/sys_fs_btrfs.c
+++ b/collectors/proc.plugin/sys_fs_btrfs.c
@@ -449,8 +449,8 @@ static inline int find_all_btrfs_pools(const char *path) {
}
static void add_labels_to_btrfs(BTRFS_NODE *n, RRDSET *st) {
- rrdlabels_add(st->state->chart_labels, "device", n->id, RRDLABEL_SRC_AUTO);
- rrdlabels_add(st->state->chart_labels, "device_label", n->label, RRDLABEL_SRC_AUTO);
+ rrdlabels_add(st->rrdlabels, "device", n->id, RRDLABEL_SRC_AUTO);
+ rrdlabels_add(st->rrdlabels, "device_label", n->label, RRDLABEL_SRC_AUTO);
}
int do_sys_fs_btrfs(int update_every, usec_t dt) {
@@ -587,7 +587,6 @@ int do_sys_fs_btrfs(int update_every, usec_t dt) {
add_labels_to_btrfs(node, node->st_allocation_disks);
}
- else rrdset_next(node->st_allocation_disks);
// unsigned long long disk_used = node->allocation_data_disk_used + node->allocation_metadata_disk_used + node->allocation_system_disk_used;
unsigned long long disk_total = node->allocation_data_disk_total + node->allocation_metadata_disk_total + node->allocation_system_disk_total;
@@ -642,7 +641,6 @@ int do_sys_fs_btrfs(int update_every, usec_t dt) {
add_labels_to_btrfs(node, node->st_allocation_data);
}
- else rrdset_next(node->st_allocation_data);
rrddim_set_by_pointer(node->st_allocation_data, node->rd_allocation_data_free, node->allocation_data_total_bytes - node->allocation_data_bytes_used);
rrddim_set_by_pointer(node->st_allocation_data, node->rd_allocation_data_used, node->allocation_data_bytes_used);
@@ -688,7 +686,6 @@ int do_sys_fs_btrfs(int update_every, usec_t dt) {
add_labels_to_btrfs(node, node->st_allocation_metadata);
}
- else rrdset_next(node->st_allocation_metadata);
rrddim_set_by_pointer(node->st_allocation_metadata, node->rd_allocation_metadata_free, node->allocation_metadata_total_bytes - node->allocation_metadata_bytes_used - node->allocation_global_rsv_size);
rrddim_set_by_pointer(node->st_allocation_metadata, node->rd_allocation_metadata_used, node->allocation_metadata_bytes_used);
@@ -734,7 +731,6 @@ int do_sys_fs_btrfs(int update_every, usec_t dt) {
add_labels_to_btrfs(node, node->st_allocation_system);
}
- else rrdset_next(node->st_allocation_system);
rrddim_set_by_pointer(node->st_allocation_system, node->rd_allocation_system_free, node->allocation_system_total_bytes - node->allocation_system_bytes_used);
rrddim_set_by_pointer(node->st_allocation_system, node->rd_allocation_system_used, node->allocation_system_bytes_used);