]> arthur.barton.de Git - netdata.git/blobdiff - python.d/phpfpm.chart.py
fixing bugs in UrlService.
[netdata.git] / python.d / phpfpm.chart.py
index da8eea3932c6ad7ff7c0423c83fa43b50ca39310..2e7ef6b7dc5b06c7beb5c9db2b48a3ebef34c488 100755 (executable)
@@ -50,15 +50,18 @@ CHARTS = {
 
 
 class Service(UrlService):
-    url = "http://localhost/status"
-    order = ORDER
-    charts = CHARTS
-    assignment = {"active processes": 'active',
-                  "max active processes": 'maxActive',
-                  "idle processes": 'idle',
-                  "accepted conn": 'requests',
-                  "max children reached": 'reached',
-                  "slow requests": 'slow'}
+    def __init__(self, configuration=None, name=None):
+        UrlService.__init__(self, configuration=configuration, name=name)
+        if len(self.url) == 0:
+            self.url = "http://localhost/status"
+        self.order = ORDER
+        self.charts = CHARTS
+        self.assignment = {"active processes": 'active',
+                           "max active processes": 'maxActive',
+                           "idle processes": 'idle',
+                           "accepted conn": 'requests',
+                           "max children reached": 'reached',
+                           "slow requests": 'slow'}
 
     def _formatted_data(self):
         """