diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2019-08-04 08:57:13 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2019-08-04 08:57:13 +0000 |
commit | cbf70980c060bde02906a8e9de2064459bacc93c (patch) | |
tree | 5b9ade02e0ed32a4b33f5e8647092d0c02ea586d /collectors/python.d.plugin/smartd_log | |
parent | Releasing debian version 1.16.0-1. (diff) | |
download | netdata-cbf70980c060bde02906a8e9de2064459bacc93c.tar.xz netdata-cbf70980c060bde02906a8e9de2064459bacc93c.zip |
Merging upstream version 1.16.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'collectors/python.d.plugin/smartd_log')
-rw-r--r-- | collectors/python.d.plugin/smartd_log/smartd_log.chart.py | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/collectors/python.d.plugin/smartd_log/smartd_log.chart.py b/collectors/python.d.plugin/smartd_log/smartd_log.chart.py index 12f756c58..f121ab2e0 100644 --- a/collectors/python.d.plugin/smartd_log/smartd_log.chart.py +++ b/collectors/python.d.plugin/smartd_log/smartd_log.chart.py @@ -558,6 +558,7 @@ class DiskLogFile: class BaseDisk: def __init__(self, name, log_file): + self.raw_name = name self.name = re.sub(r'_+', '_', name) self.log_file = log_file self.attrs = list() @@ -566,8 +567,8 @@ class BaseDisk: def __eq__(self, other): if isinstance(other, BaseDisk): - return self.name == other.name - return self.name == other + return self.raw_name == other.raw_name + return self.raw_name == other def __ne__(self, other): return not self == other @@ -657,7 +658,7 @@ class Service(SimpleService): not disk.log_file.is_active(current_time, self.age), ] ): - self.disks.remove(disk.name) + self.disks.remove(disk.raw_name) self.remove_disk_from_charts(disk) def scan(self): @@ -681,9 +682,11 @@ class Service(SimpleService): path = os.path.join(self.log_path, full_name) if name in self.disks: + self.debug('skipping {0}: already in disks'.format(full_name)) return None if [p for p in self.exclude if p in name]: + self.debug('skipping {0}: filtered by `exclude` option'.format(full_name)) return None if not os.access(path, os.R_OK): @@ -747,5 +750,4 @@ class Service(SimpleService): if not chart_id or chart_id not in self.charts: continue - # TODO: can't delete dimension - self.charts[chart_id].hide_dimension('{0}_{1}'.format(disk.name, attr.name)) + self.charts[chart_id].del_dimension('{0}_{1}'.format(disk.name, attr.name)) |