diff options
author | Ilya Mashchenko <ilya@netdata.cloud> | 2022-06-22 11:47:26 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-22 11:47:26 +0300 |
commit | 7b48097e0d87af876d7d805a8675c48925e3220b (patch) | |
tree | 6a699d75c2ae0fbc2567903bf10ea3f40269619b /collectors | |
parent | 3bc0e3355492b57b11e0bb47547d8a41d9cacc02 (diff) |
feat(python.d/smartd_log): add 2nd job that tries to read from '/var/lib/smartmontools/' (#13188)
Diffstat (limited to 'collectors')
-rw-r--r-- | collectors/python.d.plugin/python_modules/bases/FrameworkServices/SimpleService.py | 5 | ||||
-rw-r--r-- | collectors/python.d.plugin/smartd_log/smartd_log.conf | 8 |
2 files changed, 11 insertions, 2 deletions
diff --git a/collectors/python.d.plugin/python_modules/bases/FrameworkServices/SimpleService.py b/collectors/python.d.plugin/python_modules/bases/FrameworkServices/SimpleService.py index c304ccec21..ed1b2e6695 100644 --- a/collectors/python.d.plugin/python_modules/bases/FrameworkServices/SimpleService.py +++ b/collectors/python.d.plugin/python_modules/bases/FrameworkServices/SimpleService.py @@ -95,8 +95,9 @@ class SimpleService(PythonDLimitedLogger, object): @property def name(self): - if self.job_name and self.job_name != self.module_name: - return '_'.join([self.module_name, self.override_name or self.job_name]) + name = self.override_name or self.job_name + if name and name != self.module_name: + return '_'.join([self.module_name, name]) return self.module_name def actual_name(self): diff --git a/collectors/python.d.plugin/smartd_log/smartd_log.conf b/collectors/python.d.plugin/smartd_log/smartd_log.conf index 4f138d17ad..6c01d953bd 100644 --- a/collectors/python.d.plugin/smartd_log/smartd_log.conf +++ b/collectors/python.d.plugin/smartd_log/smartd_log.conf @@ -65,3 +65,11 @@ # exclude_disks: 'PATTERN1 PATTERN2' # space separated patterns. If the pattern is in the drive name, the module will not collect data for it. # # ---------------------------------------------------------------------- + +custom: + name: smartd_log + log_path: '/var/log/smartd/' + +debian: + name: smartd_log + log_path: '/var/lib/smartmontools/' |