diff options
author | lgz <lgz@loled2> | 2017-01-01 22:06:01 +0900 |
---|---|---|
committer | lgz <lgz@loled2> | 2017-01-01 22:06:01 +0900 |
commit | 4d99487f06b2309a2c2f74f38f27e12709106228 (patch) | |
tree | a30f80720f52455671c2780ede90fa242cb157e5 /python.d/mdstat.chart.py | |
parent | ff7fae21368bac6dca440108436fa6809a07f57c (diff) |
add precision to progress value of resync/check/recovery charts
Diffstat (limited to 'python.d/mdstat.chart.py')
-rw-r--r-- | python.d/mdstat.chart.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/python.d/mdstat.chart.py b/python.d/mdstat.chart.py index e9a041dfe9..5198dbd835 100644 --- a/python.d/mdstat.chart.py +++ b/python.d/mdstat.chart.py @@ -33,15 +33,16 @@ class Service(SimpleService): self.order.append(''.join([md, '_status'])) self.definitions['agr_health']['lines'].append([''.join([md, '_health']), md, 'absolute']) self.definitions[md] = {'options': - [None, 'MD disks stats', 'disks', md, 'md.stats', 'stacked'], + [None, 'MD disks stats', 'disks', md, 'md.disks', 'stacked'], 'lines': [[''.join([md, '_total']), 'total', 'absolute'], [''.join([md, '_inuse']), 'inuse', 'absolute']]} self.definitions[''.join([md, '_status'])] = {'options': [None, 'MD current status', 'percent', md, 'md.status', 'line'], - 'lines': [[''.join([md, '_resync']), 'resync', 'absolute'], - [''.join([md, '_recovery']), 'recovery', 'absolute'], - [''.join([md, '_check']), 'check', 'absolute']]} + 'lines': [[''.join([md, '_resync']), 'resync', 'absolute', 1, 100], + [''.join([md, '_recovery']), 'recovery', 'absolute', 1, 100], + [''.join([md, '_check']), 'check', 'absolute', 1, 100]]} self.info('Plugin was started successfully. MDs to monitor %s' % (md_list)) + to_netdata = {} return True @@ -78,6 +79,6 @@ class Service(SimpleService): to_netdata[''.join([md[0], '_recovery'])] = 0 for md in mdstat_status: - to_netdata[''.join([md[0], '_' + md[2]])] = round(float(md[3])) + to_netdata[''.join([md[0], '_' + md[2]])] = round(float(md[3]) * 100) return to_netdata |