@cryptotaxi247 / netdata-1 / commits / 7098be3bb

"samba" module update

lgz committed Oct 14, 2017 at 22:25 UTC 7098be3bbddee7d8d448dbc251f9cb28a8207dc3
1 file changed +5 -3
python.d/samba.chart.py
+5 -3
@@ -15,9 +15,11 @@
15 # a lot there, bring one or more out into its own chart and make it incremental
16 # (like find and notify... good examples).
17
18 -from base import ExecutableService
18 import re
19
20 +from bases.collection import find_binary
21 +from bases.FrameworkServices.ExecutableService import ExecutableService
22 +
23 # default module values (can be overridden per job in `config`)
24 update_every = 5
25 priority = 60000
@@ -94,10 +96,10 @@ class Service(ExecutableService):
96 self.rgx_smb2 = re.compile(r'(smb2_[^:]+|syscall_.*file_bytes):\s+(\d+)')
97
98 def check(self):
97 - sudo_binary, smbstatus_binary = self.find_binary('sudo'), self.find_binary('smbstatus')
99 + sudo_binary, smbstatus_binary = find_binary('sudo'), find_binary('smbstatus')
100
101 if not (sudo_binary and smbstatus_binary):
100 - self.error('Can\'t locate \'sudo\' or \'smbstatus\' binary')
102 + self.error("Can\'t locate 'sudo' or 'smbstatus' binary")
103 return False
104
105 self.command = [sudo_binary, '-v']