enable different path for `/sys/devices` in `cpufreq.chart.py`
paulfantom committed
Jul 7, 2016 at 15:36 UTC
7f801f557a25f61ee63c38b6d0377c662130a426
2 files changed
+6
conf.d/python.d/cpufreq.conf
+1
@@ -2,3 +2,4 @@
2
# YAML format
3
4
update_every : 2
5
+sys_dir: "/sys/devices"
python.d/cpufreq.chart.py
+5
@@ -41,6 +41,11 @@ class Service(SimpleService):
41
return data
42
43
def check(self):
44
+ try:
45
+ self.sys_dir = str(self.configuration['sys_dir'])
46
+ except (KeyError, TypeError):
47
+ self.error("No path to log specified. Using: '" + self.sys_dir + "'")
48
+
49
self._orig_name = self.chart_name
50
51
for dirpath, _, filenames in os.walk(self.sys_dir):