@cryptotaxi247 / netdata-1 / commits / 81e6fbbbc

fix exim.chart.py

paulfantom committed Jul 8, 2016 at 11:52 UTC 81e6fbbbcea5703d534438345ffa816fa08a0810
3 files changed +4 -6
conf.d/python.d/exim.conf
+1 -1
@@ -1,4 +1,4 @@
1 # Example configuration of exim.chart.py
2 # YAML format
3
4 -update_every : 2
4 +update_every : 8 # executing `exim -bpc` can be very slow
python.d/exim.chart.py
+1 -3
@@ -34,8 +34,6 @@ class Service(ExecutableService):
34 :return: dict
35 """
36 try:
37 - raw = self._get_raw_data()[-1].split(' ')
38 - return {'emails': raw[4],
39 - 'size': raw[1]}
37 + return {'emails': int(self._get_raw_data()[0])}
38 except (ValueError, AttributeError):
39 return None
python.d/python_modules/base.py
+2 -2
@@ -437,7 +437,7 @@ class SocketService(SimpleService):
437 self.host = "localhost"
438 self.port = None
439 self.sock = None
440 - self.unix_socket = ""
440 + self.unix_socket = None
441 self.request = ""
442 SimpleService.__init__(self, configuration=configuration, name=name)
443
@@ -448,7 +448,7 @@ class SocketService(SimpleService):
448 """
449 if self.sock is None:
450 try:
451 - if len(self.unix_socket) == 0:
451 + if self.unix_socket is None:
452 sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
453 sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
454 sock.settimeout(self.update_every)