summaryrefslogtreecommitdiffstats
path: root/collectors/python.d.plugin/smartd_log/smartd_log.chart.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2022-08-12 07:26:11 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2022-08-12 07:26:11 +0000
commit3c315f0fff93aa072472abc10815963ac0035268 (patch)
treea95f6a96e0e7bd139c010f8dc60b40e5b3062a99 /collectors/python.d.plugin/smartd_log/smartd_log.chart.py
parentAdding upstream version 1.35.1. (diff)
downloadnetdata-8ee42cb3e03178db97e68c43291395145b5d548e.tar.xz
netdata-8ee42cb3e03178db97e68c43291395145b5d548e.zip
Adding upstream version 1.36.0.upstream/1.36.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'collectors/python.d.plugin/smartd_log/smartd_log.chart.py')
-rw-r--r--collectors/python.d.plugin/smartd_log/smartd_log.chart.py6
1 files changed, 5 insertions, 1 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 75b8c8c40..dc4e95dec 100644
--- a/collectors/python.d.plugin/smartd_log/smartd_log.chart.py
+++ b/collectors/python.d.plugin/smartd_log/smartd_log.chart.py
@@ -630,6 +630,7 @@ class Service(SimpleService):
self.exclude = configuration.get('exclude_disks', str()).split()
self.disks = list()
self.runs = 0
+ self.do_force_rescan = False
def check(self):
return self.scan() > 0
@@ -637,9 +638,10 @@ class Service(SimpleService):
def get_data(self):
self.runs += 1
- if self.runs % DEF_RESCAN_INTERVAL == 0:
+ if self.do_force_rescan or self.runs % DEF_RESCAN_INTERVAL == 0:
self.cleanup()
self.scan()
+ self.do_force_rescan = False
data = dict()
@@ -654,10 +656,12 @@ class Service(SimpleService):
if changed is None:
disk.alive = False
+ self.do_force_rescan = True
continue
if changed and disk.populate_attrs() is None:
disk.alive = False
+ self.do_force_rescan = True
continue
data.update(disk.data())