@cryptotaxi247 / netdata-1 / commits / 3f5345f32

fixed some issues from previous commits

paulfantom committed Jun 22, 2016 at 15:09 UTC 3f5345f32294ea57037b24fec765079ddeb6270b
7 files changed +23 -14
conf.d/Makefile.am
+1
@@ -21,6 +21,7 @@ pythonconfigdir=$(configdir)/python.d
21 dist_pythonconfig_DATA = \
22 python.d/example.conf \
23 python.d/mysql.conf \
24 + python.d/phpfpm.conf \
25 $(NULL)
26
27
conf.d/python.d.conf
+2
@@ -8,3 +8,5 @@ enabled: no
8 example: yes
9 mysql: yes
10 phpfpm: yes
11 +apache: yes
12 +nginx: yes
plugins.d/python.d.plugin
+4 -3
@@ -198,8 +198,8 @@ class PythonCharts(object):
198 # scan directory specified in path and load all modules from there
199 names = os.listdir(path)
200 for mod in names:
201 - if mod.strip(MODULE_EXTENSION) in disabled:
202 - error(mod + ": disabled module ", mod.strip(MODULE_EXTENSION))
201 + if mod.replace(MODULE_EXTENSION,"") in disabled:
202 + error(mod + ": disabled module ", mod.replace(MODULE_EXTENSION,""))
203 continue
204 m = self._import_module(path + mod)
205 if m is not None:
@@ -526,7 +526,7 @@ def parse_cmdline(directory, *commands):
526 pass
527 if changed_update and DEBUG_FLAG:
528 OVERRIDE_UPDATE_EVERY = True
529 - debug(PROGRAM, "overriding update interval to", str(int(cmd)))
529 + debug(PROGRAM, "overriding update interval to", str(BASE_CONFIG['update_every']))
530
531 debug("started from", commands[0], "with options:", *commands[1:])
532
@@ -576,6 +576,7 @@ def run():
576 ", ONLY_MODULES=" + str(modules))
577
578 # run plugins
579 + modules = ['apache', 'nginx']
580 charts = PythonCharts(modules, MODULES_DIR, CONFIG_DIR + "python.d/", disabled)
581 charts.check()
582 charts.create()
python.d/Makefile.am
+3
@@ -7,6 +7,9 @@ SUFFIXES = .in
7 dist_python_SCRIPTS = \
8 example.chart.py \
9 mysql.chart.py \
10 + phpfpm.chart.py \
11 + apache.chart.py \
12 + nginx.chart.py \
13 python-modules-installer.sh \
14 $(NULL)
15
python.d/apache.chart.py
+7 -6
@@ -6,8 +6,8 @@ from base import UrlService
6
7 # default module values (can be overridden per job in `config`)
8 # update_every = 2
9 -# priority = 60000
10 -# retries = 5
9 +priority = 60000
10 +retries = 5
11
12 # default job configuration (overridden by python.d.plugin)
13 # config = {'local': {
@@ -25,7 +25,7 @@ CHARTS = {
25 'options': "'' 'apache Lifetime Avg. Response Size' 'bytes/request' statistics apache.bytesperreq area",
26 'lines': [
27 {"name": "size_req",
28 - "options": "'' absolute 1"},
28 + "options": "'' absolute 1"}
29 ]},
30 'workers': {
31 'options': "'' 'apache Workers' 'workers' workers apache.workers stacked",
@@ -45,7 +45,7 @@ CHARTS = {
45 'options': "'' 'apache Lifetime Avg. Response Size' 'bytes/request' statistics apache.bytesperreq area",
46 'lines': [
47 {"name": "size_sec",
48 - "options": "'' absolute 8 1000000*1000"}
48 + "options": "'' absolute 8 1000000000"}
49 ]},
50 'requests': {
51 'options': "''' 'apache Requests' 'requests/s' requests apache.requests line",
@@ -73,13 +73,14 @@ CHARTS = {
73 {"name": "closing",
74 "options": "'' absolute 1 1"},
75 {"name": "writing",
76 - "options": "'' absolute 1 1"},
76 + "options": "'' absolute 1 1"}
77 ]}
78 }
79
80
81 class Service(UrlService):
82 - url = "http://localhost/server-status?auto"
82 + # url = "http://localhost/server-status?auto"
83 + url = "http://www.apache.org/server-status?auto"
84 order = ORDER
85 charts = CHARTS
86 assignment = {"BytesPerReq": 'size_req',
python.d/nginx.chart.py
+4 -3
@@ -6,8 +6,8 @@ from base import UrlService
6
7 # default module values (can be overridden per job in `config`)
8 # update_every = 2
9 -# priority = 60000
10 -# retries = 5
9 +priority = 60000
10 +retries = 5
11
12 # default job configuration (overridden by python.d.plugin)
13 # config = {'local': {
@@ -55,7 +55,8 @@ CHARTS = {
55
56
57 class Service(UrlService):
58 - url = "http://localhost/stub_status"
58 + # url = "http://localhost/stub_status"
59 + url = "http://toothless.dragon/stub_status"
60 order = ORDER
61 charts = CHARTS
62
python.d/phpfpm.chart.py
+2 -2
@@ -6,8 +6,8 @@ from base import UrlService
6
7 # default module values (can be overridden per job in `config`)
8 # update_every = 2
9 -# priority = 60000
10 -# retries = 5
9 +priority = 60000
10 +retries = 5
11
12 # default job configuration (overridden by python.d.plugin)
13 # config = {'local': {