megacli: rename command => megacli
lgz committed
Jul 5, 2018 at 20:18 UTC
c026b9c12933d8edccdc40455c262f7fd0f7a014
1 file changed
+5
-5
python.d/megacli.chart.py
+5
-5
@@ -120,14 +120,14 @@ class Service(ExecutableService):
120
ExecutableService.__init__(self, configuration=configuration, name=name)
121
self.order = list()
122
self.definitions = dict()
123
- self.command = Command()
123
+ self.megacli = Command()
124
125
def check(self):
126
- if not self.command:
126
+ if not self.megacli:
127
self.error("can't locate \"megacli\" binary or binary is not executable by netdata")
128
return None
129
130
- d = self._get_raw_data(command=self.command.disk_info)
130
+ d = self._get_raw_data(command=self.megacli.disk_info)
131
132
if not d:
133
return None
@@ -136,7 +136,7 @@ class Service(ExecutableService):
136
pds = find_pds(d)
137
138
if not (ads and pds):
139
- self.error('failed to parse "{0}" output'.format(' '.join(self.command.disk_info)))
139
+ self.error('failed to parse "{0}" output'.format(' '.join(self.megacli.disk_info)))
140
return None
141
142
self.create_charts(ads, pds)
@@ -146,7 +146,7 @@ class Service(ExecutableService):
146
return self.get_adapter_pd_data()
147
148
def get_adapter_pd_data(self):
149
- raw = self._get_raw_data(command=self.command.disk_info)
149
+ raw = self._get_raw_data(command=self.megacli.disk_info)
150
151
if not raw:
152
return None