]> arthur.barton.de Git - netdata.git/commitdiff
fixed some issues from previous commits
authorpaulfantom <paulfantom@gmail.com>
Wed, 22 Jun 2016 13:09:29 +0000 (15:09 +0200)
committerpaulfantom <paulfantom@gmail.com>
Wed, 22 Jun 2016 13:09:29 +0000 (15:09 +0200)
conf.d/Makefile.am
conf.d/python.d.conf
plugins.d/python.d.plugin
python.d/Makefile.am
python.d/apache.chart.py
python.d/nginx.chart.py
python.d/phpfpm.chart.py

index f60faaa570a65af29ec793592c5a10714f6f4319..5dbc29e19c72fe1bf66013902a4fe41899f42a88 100644 (file)
@@ -21,6 +21,7 @@ pythonconfigdir=$(configdir)/python.d
 dist_pythonconfig_DATA = \
        python.d/example.conf \
        python.d/mysql.conf \
+       python.d/phpfpm.conf \
        $(NULL)
 
 
index b303cde4a88dc0bd80a879549174a85dfcf91c04..d416cf9c9eef071688cd5d62205952fea6f6a348 100644 (file)
@@ -8,3 +8,5 @@ enabled: no
 example: yes
 mysql: yes
 phpfpm: yes
+apache: yes
+nginx: yes
index 0a0e65ae2e0d1912ecb20a9b68eb6eb4cf48cfde..2fde6d2941fb3816df5e77f79444c8400aa03083 100755 (executable)
@@ -198,8 +198,8 @@ class PythonCharts(object):
             # scan directory specified in path and load all modules from there
             names = os.listdir(path)
             for mod in names:
-                if mod.strip(MODULE_EXTENSION) in disabled:
-                    error(mod + ": disabled module ", mod.strip(MODULE_EXTENSION))
+                if mod.replace(MODULE_EXTENSION,"") in disabled:
+                    error(mod + ": disabled module ", mod.replace(MODULE_EXTENSION,""))
                     continue
                 m = self._import_module(path + mod)
                 if m is not None:
@@ -526,7 +526,7 @@ def parse_cmdline(directory, *commands):
                 pass
     if changed_update and DEBUG_FLAG:
         OVERRIDE_UPDATE_EVERY = True
-        debug(PROGRAM, "overriding update interval to", str(int(cmd)))
+        debug(PROGRAM, "overriding update interval to", str(BASE_CONFIG['update_every']))
 
     debug("started from", commands[0], "with options:", *commands[1:])
 
@@ -576,6 +576,7 @@ def run():
          ", ONLY_MODULES=" + str(modules))
 
     # run plugins
+    modules = ['apache', 'nginx']
     charts = PythonCharts(modules, MODULES_DIR, CONFIG_DIR + "python.d/", disabled)
     charts.check()
     charts.create()
index eef6594bb2d056f27a758647dd9305678f24ac7f..b1de3ecc09981d08457a3b3ab223cd14134b89fa 100644 (file)
@@ -7,6 +7,9 @@ SUFFIXES = .in
 dist_python_SCRIPTS = \
        example.chart.py \
        mysql.chart.py \
+       phpfpm.chart.py \
+       apache.chart.py \
+       nginx.chart.py \
        python-modules-installer.sh \
        $(NULL)
 
index 9dfc52dccc3912264759b121c91462c736acc30f..140f80ae86f20d3e3c59bc1e3be84d1516ab74e3 100644 (file)
@@ -6,8 +6,8 @@ from base import UrlService
 
 # default module values (can be overridden per job in `config`)
 # update_every = 2
-priority = 60000
-retries = 5
+priority = 60000
+retries = 5
 
 # default job configuration (overridden by python.d.plugin)
 # config = {'local': {
@@ -25,7 +25,7 @@ CHARTS = {
         'options': "'' 'apache Lifetime Avg. Response Size' 'bytes/request' statistics apache.bytesperreq area",
         'lines': [
             {"name": "size_req",
-             "options": "'' absolute 1"},
+             "options": "'' absolute 1"}
         ]},
     'workers': {
         'options': "'' 'apache Workers' 'workers' workers apache.workers stacked",
@@ -45,7 +45,7 @@ CHARTS = {
         'options': "'' 'apache Lifetime Avg. Response Size' 'bytes/request' statistics apache.bytesperreq area",
         'lines': [
             {"name": "size_sec",
-             "options": "'' absolute 8 1000000*1000"}
+             "options": "'' absolute 8 1000000000"}
         ]},
     'requests': {
         'options': "''' 'apache Requests' 'requests/s' requests apache.requests line",
@@ -73,13 +73,14 @@ CHARTS = {
             {"name": "closing",
              "options": "'' absolute 1 1"},
             {"name": "writing",
-             "options": "'' absolute 1 1"},
+             "options": "'' absolute 1 1"}
         ]}
 }
 
 
 class Service(UrlService):
-    url = "http://localhost/server-status?auto"
+    # url = "http://localhost/server-status?auto"
+    url = "http://www.apache.org/server-status?auto"
     order = ORDER
     charts = CHARTS
     assignment = {"BytesPerReq": 'size_req',
index e0acdda0c0dc3f784a20773327d26eb2af041df8..6675a69d407bddf0d97204a037b776418289704e 100644 (file)
@@ -6,8 +6,8 @@ from base import UrlService
 
 # default module values (can be overridden per job in `config`)
 # update_every = 2
-priority = 60000
-retries = 5
+priority = 60000
+retries = 5
 
 # default job configuration (overridden by python.d.plugin)
 # config = {'local': {
@@ -55,7 +55,8 @@ CHARTS = {
 
 
 class Service(UrlService):
-    url = "http://localhost/stub_status"
+    # url = "http://localhost/stub_status"
+    url = "http://toothless.dragon/stub_status"
     order = ORDER
     charts = CHARTS
 
index 0ccf6800faf0c4dbb8029a5ff2fd63343d196d09..da8eea3932c6ad7ff7c0423c83fa43b50ca39310 100755 (executable)
@@ -6,8 +6,8 @@ from base import UrlService
 
 # default module values (can be overridden per job in `config`)
 # update_every = 2
-priority = 60000
-retries = 5
+priority = 60000
+retries = 5
 
 # default job configuration (overridden by python.d.plugin)
 # config = {'local': {