Skip to content

Commit 6d758c5

Browse files
committed
change name from _format_data to _get_data.
1 parent ba417a2 commit 6d758c5

6 files changed

Lines changed: 13 additions & 13 deletions

File tree

python.d/apache.chart.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ def __init__(self, configuration=None, name=None):
8686
"ConnsAsyncClosing": 'closing',
8787
"ConnsAsyncWriting": 'writing'}
8888

89-
def _format_data(self):
89+
def _get_data(self):
9090
"""
9191
Format data received from http request
9292
:return: dict

python.d/apache_cache.chart.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def __init__(self, configuration=None, name=None):
2828
self.order = ORDER
2929
self.definitions = CHARTS
3030

31-
def _format_data(self):
31+
def _get_data(self):
3232
"""
3333
Parse new log lines
3434
:return: dict

python.d/mysql.chart.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ def _connect(self):
355355
self.error("problem connecting to server:", e)
356356
raise RuntimeError
357357

358-
def _format_data(self):
358+
def _get_data(self):
359359
"""
360360
Get raw data from MySQL server
361361
:return: dict

python.d/nginx.chart.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ def __init__(self, configuration=None, name=None):
5555
self.order = ORDER
5656
self.definitions = CHARTS
5757

58-
def _format_data(self):
58+
def _get_data(self):
5959
"""
6060
Format data received from http request
6161
:return: dict

python.d/phpfpm.chart.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def __init__(self, configuration=None, name=None):
5656
"max children reached": 'reached',
5757
"slow requests": 'slow'}
5858

59-
def _format_data(self):
59+
def _get_data(self):
6060
"""
6161
Format data received from http request
6262
:return: dict

python.d/python_modules/base.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -303,16 +303,16 @@ def __init__(self, configuration=None, name=None):
303303
self.definitions = {}
304304
BaseService.__init__(self, configuration=configuration, name=name)
305305

306-
def _get_data(self):
306+
def _get_raw_data(self):
307307
"""
308308
Get raw data from http request
309309
:return: str
310310
"""
311311
return ""
312312

313-
def _format_data(self):
313+
def _get_data(self):
314314
"""
315-
Format data received from http request
315+
Format data received from request
316316
:return: dict
317317
"""
318318
return {}
@@ -328,7 +328,7 @@ def create(self):
328328
Create charts
329329
:return: boolean
330330
"""
331-
data = self._format_data()
331+
data = self._get_data()
332332
if data is None:
333333
return False
334334

@@ -351,7 +351,7 @@ def update(self, interval):
351351
:param interval: int
352352
:return: boolean
353353
"""
354-
data = self._format_data()
354+
data = self._get_data()
355355
if data is None:
356356
return False
357357

@@ -380,7 +380,7 @@ def __init__(self, configuration=None, name=None):
380380
self.url = ""
381381
SimpleService.__init__(self, configuration=configuration, name=name)
382382

383-
def _get_data(self):
383+
def _get_raw_data(self):
384384
"""
385385
Get raw data from http request
386386
:return: str
@@ -412,7 +412,7 @@ def check(self):
412412
except (KeyError, TypeError):
413413
pass
414414

415-
if self._format_data() is not None:
415+
if self._get_data() is not None:
416416
return True
417417
else:
418418
return False
@@ -430,7 +430,7 @@ def __init__(self, configuration=None, name=None):
430430
SimpleService.__init__(self, configuration=configuration, name=name)
431431
self.retries = 100000 # basically always retry
432432

433-
def _get_data(self):
433+
def _get_raw_data(self):
434434
lines = []
435435
try:
436436
if os.path.getsize(self.log_path) < self._last_position:

0 commit comments

Comments
 (0)