@cryptotaxi247 / netdata-1 / commits / df7179f5a

btrfs physical disk allocation chart color improvements; fixes #3719

Costa Tsaousis (ktsaou) committed Jun 11, 2018 at 01:16 UTC df7179f5a0a783b0571e001e4fdfd388081b9464
3 files changed +10 -9
src/sys_fs_btrfs.c
+7 -7
@@ -543,7 +543,7 @@ int do_sys_fs_btrfs(int update_every, usec_t dt) {
543
544 snprintf(id, RRD_ID_LENGTH_MAX, "disk_%s", node->id);
545 snprintf(name, RRD_ID_LENGTH_MAX, "disk_%s", node->label);
546 - snprintf(title, 200, "BTRFS Disk Allocation for %s", node->label);
546 + snprintf(title, 200, "BTRFS Physical Disk Allocation for %s", node->label);
547
548 netdata_fix_chart_id(id);
549 netdata_fix_chart_name(name);
@@ -563,13 +563,13 @@ int do_sys_fs_btrfs(int update_every, usec_t dt) {
563 , RRDSET_TYPE_STACKED
564 );
565
566 - node->rd_allocation_disks_unallocated = rrddim_add(node->st_allocation_disks, "unallocated", NULL, 1, 1024 * 1024, RRD_ALGORITHM_ABSOLUTE);
567 - node->rd_allocation_disks_data_used = rrddim_add(node->st_allocation_disks, "data_used", "data used", 1, 1024 * 1024, RRD_ALGORITHM_ABSOLUTE);
568 - node->rd_allocation_disks_data_free = rrddim_add(node->st_allocation_disks, "data_free", "data free", 1, 1024 * 1024, RRD_ALGORITHM_ABSOLUTE);
569 - node->rd_allocation_disks_metadata_used = rrddim_add(node->st_allocation_disks, "meta_used", "meta used", 1, 1024 * 1024, RRD_ALGORITHM_ABSOLUTE);
566 + node->rd_allocation_disks_unallocated = rrddim_add(node->st_allocation_disks, "unallocated", NULL, 1, 1024 * 1024, RRD_ALGORITHM_ABSOLUTE);
567 + node->rd_allocation_disks_data_free = rrddim_add(node->st_allocation_disks, "data_free", "data free", 1, 1024 * 1024, RRD_ALGORITHM_ABSOLUTE);
568 + node->rd_allocation_disks_data_used = rrddim_add(node->st_allocation_disks, "data_used", "data used", 1, 1024 * 1024, RRD_ALGORITHM_ABSOLUTE);
569 node->rd_allocation_disks_metadata_free = rrddim_add(node->st_allocation_disks, "meta_free", "meta free", 1, 1024 * 1024, RRD_ALGORITHM_ABSOLUTE);
571 - node->rd_allocation_disks_system_used = rrddim_add(node->st_allocation_disks, "sys_used", "sys used", 1, 1024 * 1024, RRD_ALGORITHM_ABSOLUTE);
572 - node->rd_allocation_disks_system_free = rrddim_add(node->st_allocation_disks, "sys_free", "sys free", 1, 1024 * 1024, RRD_ALGORITHM_ABSOLUTE);
570 + node->rd_allocation_disks_metadata_used = rrddim_add(node->st_allocation_disks, "meta_used", "meta used", 1, 1024 * 1024, RRD_ALGORITHM_ABSOLUTE);
571 + node->rd_allocation_disks_system_free = rrddim_add(node->st_allocation_disks, "sys_free", "sys free", 1, 1024 * 1024, RRD_ALGORITHM_ABSOLUTE);
572 + node->rd_allocation_disks_system_used = rrddim_add(node->st_allocation_disks, "sys_used", "sys used", 1, 1024 * 1024, RRD_ALGORITHM_ABSOLUTE);
573 }
574 else rrdset_next(node->st_allocation_disks);
575
web/dashboard_info.js
+2 -1
@@ -1923,7 +1923,8 @@ netdataDashboard.context = {
1923 },
1924
1925 'btrfs.disk': {
1926 - info: 'Physical disk usage of BTRFS. The disk space reported here is the raw physical disk space assigned to the BTRFS volume (i.e. <b>before any RAID levels</b>). BTRFS uses a two-stage allocator, first allocating large regions of disk space for one type of block (data, metadata, or system), and then using a regular block allocator inside those regions. <code>unallocated</code> is the physical disk space that is not allocated yet and is available to become data, metdata or system on demand. When <code>unallocated</code> is zero, all available disk space has been allocated to a specific function. Healthy volumes should ideally have at least five percent of their total space <code>unallocated</code>. You can keep your volume healthy by running the <code>btrfs balance</code> command on it regularly (check <code>man btrfs-balance</code> for more info). Note that some of the spac elisted as <code>unallocated</code> may not actually be usable if the volume uses devices of different sizes.'
1926 + info: 'Physical disk usage of BTRFS. The disk space reported here is the raw physical disk space assigned to the BTRFS volume (i.e. <b>before any RAID levels</b>). BTRFS uses a two-stage allocator, first allocating large regions of disk space for one type of block (data, metadata, or system), and then using a regular block allocator inside those regions. <code>unallocated</code> is the physical disk space that is not allocated yet and is available to become data, metdata or system on demand. When <code>unallocated</code> is zero, all available disk space has been allocated to a specific function. Healthy volumes should ideally have at least five percent of their total space <code>unallocated</code>. You can keep your volume healthy by running the <code>btrfs balance</code> command on it regularly (check <code>man btrfs-balance</code> for more info). Note that some of the spac elisted as <code>unallocated</code> may not actually be usable if the volume uses devices of different sizes.',
1927 + colors: [ NETDATA.colors[12] ]
1928 },
1929
1930 'btrfs.data': {
web/index.html
+1 -1
@@ -4406,7 +4406,7 @@
4406 });
4407
4408 NETDATA.requiredJs.push({
4409 - url: NETDATA.serverStatic + 'dashboard_info.js?v20180610-1',
4409 + url: NETDATA.serverStatic + 'dashboard_info.js?v20180611-1',
4410 async: false,
4411 isAlreadyLoaded: function() { return false; }
4412 });