From fac75b0b5794e968f4f51cabfc720722504f6498 Mon Sep 17 00:00:00 2001 From: Vitaliy Filippov Date: Fri, 22 May 2020 12:52:27 +0300 Subject: [PATCH] Handle reweights in mon --- lp/mon.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lp/mon.js b/lp/mon.js index 6d26ccf4..758cbb94 100644 --- a/lp/mon.js +++ b/lp/mon.js @@ -271,9 +271,10 @@ class Mon if (stat.size && (this.state.osd.state[osd_num] || Number(stat.time) >= down_time)) { // Numeric IDs are reserved for OSDs + const reweight = this.state.config.osd[osd_num] && Number(this.state.config.osd[osd_num].reweight) || 1; tree[osd_num] = tree[osd_num] || { id: osd_num, parent: stat.host }; tree[osd_num].level = 'osd'; - tree[osd_num].size = stat.size / 1024 / 1024 / 1024 / 1024; // terabytes + tree[osd_num].size = reweight * stat.size / 1024 / 1024 / 1024 / 1024; // terabytes delete tree[osd_num].children; } }